// The global arg allows us to override the global-ness of the path (which
// actually means 'does the path start with `::`', rather than 'is the path
// semantically global). We use the override for `use` imports (etc.) where
// the syntax is non-global, but the semantics are global.
The global arg allows us to override the global-ness of the path (which
actually means 'does the path start with `::`', rather than 'is the path
semantically global). We use the override for `use` imports (etc.) where
the syntax is non-global, but the semantics are global.
The global arg allows us to override the global - ness of the path ( which actually means ' does the path start with ` :: ` ' rather than ' is the path semantically global ) . We use the override for ` use ` imports ( etc . ) where the syntax is non - global but the semantics are global .
fn write_sub_paths(&mut self, path: &ast::Path, global: bool) {
        let sub_paths = self.process_path_prefixes(path);
        for (i, &(ref span, ref qualname)) in sub_paths.iter().enumerate() {
            let qualname = if i == 0 && global && !path.global {
                format!("::{}", qualname)
            } else {
                qualname.clone()
            };
            self.dumper.mod_ref(ModRefData {
                span: *span,
                qualname: qualname,
                scope: self.cur_scope,
                ref_id: None
            }.lower(self.tcx));
        }
    }
fn write_sub_paths ( & mut self , path : & ast :: Path , global : bool ) { let sub_paths = self . process_path_prefixes ( path ) ; for ( i , & ( ref span , ref qualname ) ) in sub_paths . iter ( ) . enumerate ( ) { let qualname = if i == 0 && global && ! path . global { format ! ( " " qualname ) } else { qualname . clone ( ) } ; self . dumper . mod_ref ( ModRefData { span : * span , qualname : qualname , scope : self . cur_scope , ref_id : None } . lower ( self . tcx ) ) ; } }
The global arg allows us to override the global-ness of the path (which
actually means 'does the path start with `::`', rather than 'is the path
semantically global).
The global arg allows us to override the global - ness of the path ( which actually means ' does the path start with ` :: ` ' rather than ' is the path semantically global ) .
&mut self
path
&ast::Path
global
bool