// As write_sub_paths, but does not process the last ident in the path (assuming it
// will be processed elsewhere). See note on write_sub_paths about global.
As write_sub_paths, but does not process the last ident in the path (assuming it
will be processed elsewhere). See note on write_sub_paths about global.
As write_sub_paths but does not process the last ident in the path ( assuming it will be processed elsewhere ) . See note on write_sub_paths about global .
fn write_sub_paths_truncated(&mut self, path: &ast::Path, global: bool) {
        let sub_paths = self.process_path_prefixes(path);
        let len = sub_paths.len();
        if len <= 1 {
            return;
        }
        let sub_paths = &sub_paths[..len-1];
        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.fmt.sub_mod_ref_str(path.span,
                                     *span,
                                     &qualname,
                                     self.cur_scope);
        }
    }
fn write_sub_paths_truncated ( & mut self , path : & ast :: Path , global : bool ) { let sub_paths = self . process_path_prefixes ( path ) ; let len = sub_paths . len ( ) ; if len <= 1 { return ; } let sub_paths = & sub_paths [ .. len - 1 ] ; 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 . fmt . sub_mod_ref_str ( path . span , * span , & qualname , self . cur_scope ) ; } }
As write_sub_paths, but does not process the last ident in the path (assuming it
will be processed elsewhere).
As write_sub_paths but does not process the last ident in the path ( assuming it will be processed elsewhere ) .
&mut self
path
&ast::Path
global
bool