@@ -47,9 +47,9 @@ pub struct CrateLoader<'a> {
4747fn dump_crates ( cstore : & CStore ) {
4848 info ! ( "resolved crates:" ) ;
4949 cstore. iter_crate_data ( |cnum, data| {
50- info ! ( " name: {}" , data. root . name( ) ) ;
50+ info ! ( " name: {}" , data. name( ) ) ;
5151 info ! ( " cnum: {}" , cnum) ;
52- info ! ( " hash: {}" , data. root . hash( ) ) ;
52+ info ! ( " hash: {}" , data. hash( ) ) ;
5353 info ! ( " reqd: {:?}" , data. dep_kind( ) ) ;
5454 let CrateSource { dylib, rlib, rmeta } = data. source ( ) ;
5555 dylib. as_ref ( ) . map ( |dl| info ! ( " dylib: {}" , dl. 0 . display( ) ) ) ;
@@ -101,10 +101,10 @@ impl<'a> CrateLoader<'a> {
101101 -> Option < CrateNum > {
102102 let mut ret = None ;
103103 self . cstore . iter_crate_data ( |cnum, data| {
104- if data. root . name ( ) != name { return }
104+ if data. name ( ) != name { return }
105105
106106 match hash {
107- Some ( hash) if * hash == data. root . hash ( ) => { ret = Some ( cnum) ; return }
107+ Some ( hash) if * hash == data. hash ( ) => { ret = Some ( cnum) ; return }
108108 Some ( ..) => return ,
109109 None => { }
110110 }
@@ -164,9 +164,9 @@ impl<'a> CrateLoader<'a> {
164164
165165 // Check for conflicts with any crate loaded so far
166166 self . cstore . iter_crate_data ( |_, other| {
167- if other. root . name ( ) == root. name ( ) && // same crate-name
168- other. root . disambiguator ( ) == root. disambiguator ( ) && // same crate-disambiguator
169- other. root . hash ( ) != root. hash ( ) { // but different SVH
167+ if other. name ( ) == root. name ( ) && // same crate-name
168+ other. disambiguator ( ) == root. disambiguator ( ) && // same crate-disambiguator
169+ other. hash ( ) != root. hash ( ) { // but different SVH
170170 span_fatal ! ( self . sess, span, E0523 ,
171171 "found two different crates with name `{}` that are \
172172 not distinguished by differing `-C metadata`. This \
@@ -350,7 +350,7 @@ impl<'a> CrateLoader<'a> {
350350 match result {
351351 ( LoadResult :: Previous ( cnum) , None ) => {
352352 let data = self . cstore . get_crate_data ( cnum) ;
353- if data. root . is_proc_macro_crate ( ) {
353+ if data. is_proc_macro_crate ( ) {
354354 dep_kind = DepKind :: UnexportedMacrosOnly ;
355355 }
356356 data. update_dep_kind ( |data_dep_kind| cmp:: max ( data_dep_kind, dep_kind) ) ;
@@ -378,7 +378,7 @@ impl<'a> CrateLoader<'a> {
378378 if locator. triple == self . sess . opts . target_triple {
379379 let mut result = LoadResult :: Loaded ( library) ;
380380 self . cstore . iter_crate_data ( |cnum, data| {
381- if data. root . name ( ) == root. name ( ) && root. hash ( ) == data. root . hash ( ) {
381+ if data. name ( ) == root. name ( ) && root. hash ( ) == data. hash ( ) {
382382 assert ! ( locator. hash. is_none( ) ) ;
383383 info ! ( "load success, going to previous cnum: {}" , cnum) ;
384384 result = LoadResult :: Previous ( cnum) ;
@@ -621,7 +621,7 @@ impl<'a> CrateLoader<'a> {
621621
622622 let mut uses_std = false ;
623623 self . cstore . iter_crate_data ( |_, data| {
624- if data. root . name ( ) == sym:: std {
624+ if data. name ( ) == sym:: std {
625625 uses_std = true ;
626626 }
627627 } ) ;
@@ -731,14 +731,14 @@ impl<'a> CrateLoader<'a> {
731731 conflicts with this global \
732732 allocator in: {}",
733733 other_crate,
734- data. root . name( ) ) ) ;
734+ data. name( ) ) ) ;
735735 }
736736 Some ( None ) => {
737737 self . sess . err ( & format ! ( "the `#[global_allocator]` in this \
738738 crate conflicts with global \
739- allocator in: {}", data. root . name( ) ) ) ;
739+ allocator in: {}", data. name( ) ) ) ;
740740 }
741- None => global_allocator = Some ( Some ( data. root . name ( ) ) ) ,
741+ None => global_allocator = Some ( Some ( data. name ( ) ) ) ,
742742 }
743743 } ) ;
744744 if global_allocator. is_some ( ) {
@@ -786,9 +786,9 @@ impl<'a> CrateLoader<'a> {
786786 self . sess . err ( & format ! ( "the crate `{}` cannot depend \
787787 on a crate that needs {}, but \
788788 it depends on `{}`",
789- self . cstore. get_crate_data( krate) . root . name( ) ,
789+ self . cstore. get_crate_data( krate) . name( ) ,
790790 what,
791- data. root . name( ) ) ) ;
791+ data. name( ) ) ) ;
792792 }
793793 }
794794
0 commit comments