@@ -44,9 +44,7 @@ pub struct LoadedFile {
4444 pub kind : SourceKind ,
4545}
4646
47- /// Enumerates core, library, and explicit signature directories, parses
48- /// every `.rbs` file exactly once, and feeds the results into an
49- /// [`Environment`], mirroring `RBS::EnvironmentLoader`.
47+ /// Mirrors `RBS::EnvironmentLoader`.
5048///
5149/// Unlike the Ruby implementation, this does not resolve gem names or
5250/// versions to directories, and does not expand `manifest.yaml`
@@ -61,7 +59,6 @@ pub struct EnvironmentLoader {
6159}
6260
6361impl EnvironmentLoader {
64- /// `core_root` is `None` to skip core.
6562 pub fn new ( core_root : Option < PathBuf > ) -> Self {
6663 EnvironmentLoader {
6764 core_root,
@@ -70,14 +67,11 @@ impl EnvironmentLoader {
7067 }
7168 }
7269
73- /// Adds a library by name and its already-resolved signature directory.
7470 pub fn add_library ( mut self , name : & str , path : PathBuf ) -> Self {
7571 self . libs . push ( ( name. to_string ( ) , path) ) ;
7672 self
7773 }
7874
79- /// Adds an explicit signature directory. Unlike libraries, `_`-prefixed
80- /// subdirectories are not skipped.
8175 pub fn add_dir ( mut self , path : PathBuf ) -> Self {
8276 self . dirs . push ( path) ;
8377 self
@@ -113,8 +107,6 @@ impl EnvironmentLoader {
113107 Ok ( loaded)
114108 }
115109
116- /// Groups directories core → libs → dirs, matching
117- /// `RBS::EnvironmentLoader#each_dir`'s enumeration order.
118110 fn each_dir ( & self ) -> Vec < ( SourceKind , PathBuf ) > {
119111 let mut result = Vec :: new ( ) ;
120112
@@ -144,10 +136,6 @@ impl EnvironmentLoader {
144136/// can later be parallelised by handing each worker its own [`Interners`].
145137/// The parser's `SignatureNode` holds raw pointers and is not `Send`, so it
146138/// must not escape this function — only the owned `Source` does.
147- ///
148- /// Crate-private: a caller outside the crate has no way to merge its
149- /// worker-local [`Interners`] into the environment, so the `Source` it
150- /// produced would carry ids that environment cannot resolve.
151139pub ( crate ) fn parse_one (
152140 path : & Path ,
153141 kind : & SourceKind ,
0 commit comments