Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion and find-definition does not work for trait methods #1094

Open
guskovd opened this issue Feb 13, 2020 · 2 comments
Open

Autocompletion and find-definition does not work for trait methods #1094

guskovd opened this issue Feb 13, 2020 · 2 comments

Comments

@guskovd
Copy link

guskovd commented Feb 13, 2020

in main: dog.spea~

lib.rs

pub trait Animal {
    fn animal_type(&self) -> &str;
    fn noise(&self) -> &str;
}


pub struct Dog {}

impl Animal for Dog {
    fn animal_type(&self) -> &str {
        "dog"
    }
    
    fn noise(&self) -> &str {
	self.animal_type();
        "woof"
    }
}

main.rs

extern crate traits;
use crate::traits::{Dog, Animal};

pub trait Speaks {
     fn speak(&self);
}

impl Speaks for Dog {
    fn speak(&self) {
        println!("The {} said {}", self.animal_type(), self.noise());
    }
}

fn main() {
    let dog = Dog {};
    dog.speak();
}
@guskovd
Copy link
Author

guskovd commented Feb 13, 2020

racer find-definition 16 11 src/main.rs

racer: log:

DEBUG 2020-02-13T13:44:05.411694815Z: racer::util: Getting rust source path. Trying env var RUST_SRC_PATH.
PREFIX 595,600,speak
DEBUG 2020-02-13T13:44:05.412323396Z: racer::core: Field: contextstr is |dog|, searchstr is |speak|
DEBUG 2020-02-13T13:44:05.412758929Z: syntax::parse::lexer: try_next_token: Ident("dog")
DEBUG 2020-02-13T13:44:05.412789576Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:44:05.412857090Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.412873006Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.412882236Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.412916173Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(dog, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.412962493Z: syntax::parse::diagnostics: check_trailing_angle_brackets: parsed_angle_bracket_args=false
DEBUG 2020-02-13T13:44:05.413034402Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:44:05.413053181Z: syntax::print::pp: pp Begin(4)/buffer Vec<0,0>
DEBUG 2020-02-13T13:44:05.413057573Z: syntax::print::pp: scan_push 0
DEBUG 2020-02-13T13:44:05.413062702Z: syntax::print::pp: pp String('dog')/buffer Vec<0,0>
DEBUG 2020-02-13T13:44:05.413067380Z: syntax::print::pp: check_stream Vec<0, 1> with left_total=1, right_total=4
DEBUG 2020-02-13T13:44:05.413071892Z: syntax::print::pp: pp End/buffer Vec<0,1>
DEBUG 2020-02-13T13:44:05.413075446Z: syntax::print::pp: scan_push 2
DEBUG 2020-02-13T13:44:05.413082270Z: syntax::print::pp: advance_left Vec<0,2>, sizeof(0)=3
DEBUG 2020-02-13T13:44:05.413087371Z: syntax::print::pp: print BEGIN 3 (remaining line space=78)
DEBUG 2020-02-13T13:44:05.413094574Z: syntax::print::pp: [3=BEGIN, 3=STR(dog,3)]
DEBUG 2020-02-13T13:44:05.413098420Z: syntax::print::pp: print Begin -> push fitting block
DEBUG 2020-02-13T13:44:05.413103251Z: syntax::print::pp: print STR(dog,3) 3 (remaining line space=78)
DEBUG 2020-02-13T13:44:05.413109806Z: syntax::print::pp: [3=STR(dog,3)]
DEBUG 2020-02-13T13:44:05.413116453Z: syntax::print::pp: print String(dog)
DEBUG 2020-02-13T13:44:05.413124822Z: syntax::print::pp: print END 1 (remaining line space=75)
DEBUG 2020-02-13T13:44:05.413128725Z: syntax::print::pp: []
DEBUG 2020-02-13T13:44:05.413133355Z: syntax::print::pp: print End -> pop End
DEBUG 2020-02-13T13:44:05.413140470Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:44:05.413144291Z: syntax::print::pp: pp String('dog')/print Vec<0,0>
DEBUG 2020-02-13T13:44:05.413149155Z: syntax::print::pp: print String(dog)
DEBUG 2020-02-13T13:44:05.413013447Z: racer::ast: ExprTypeVisitor::visit_expr expr(4294967040: dog)(kind: Path(None, path(dog)))
DEBUG 2020-02-13T13:44:05.413156524Z: racer::ast: resolve_ast_path P[dog] Scope ["/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(600)]
DEBUG 2020-02-13T13:44:05.413169926Z: racer::nameres: resolve_path_with_primitive P[dog]
DEBUG 2020-02-13T13:44:05.413174642Z: racer::nameres: resolve_path P[dog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(600) ExactMatch
DEBUG 2020-02-13T13:44:05.413185037Z: racer::nameres: search_local_scopes PathSegment { name: "dog", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(600) ExactMatch Crate | Mod | Space | Enum | Str
uct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path
DEBUG 2020-02-13T13:44:05.413199494Z: racer::nameres: searching scope Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path start: BytePos(535
) point: Some(BytePos(600)) 'dog' "/home/guskov/prog/samples/rust/traits/src/main.rs" ExactMatch local: true
DEBUG 2020-02-13T13:44:05.413263530Z: syntax::parse::lexer: try_next_token: Ident("let")
DEBUG 2020-02-13T13:44:05.413267672Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:44:05.413270923Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413275118Z: syntax::parse::lexer: try_next_token: Ident("dog")
DEBUG 2020-02-13T13:44:05.413277298Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(7)
DEBUG 2020-02-13T13:44:05.413288258Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413291016Z: syntax::parse::lexer: try_next_token: Eq("=")
DEBUG 2020-02-13T13:44:05.413293835Z: syntax::parse::lexer: try_next_token: Whitespace("  ")
DEBUG 2020-02-13T13:44:05.413296226Z: syntax::parse::lexer: try_next_token: Ident("DogDog")
DEBUG 2020-02-13T13:44:05.413301542Z: syntax::parse::lexer: taking an ident from BytePos(11) to BytePos(17)
DEBUG 2020-02-13T13:44:05.413305974Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413309470Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:44:05.413313235Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:44:05.413317199Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:44:05.413322022Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.413325818Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.413329518Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.413333092Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(let, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.413351869Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(DogDog, false), span: Span { lo: BytePos(11), hi: BytePos(17), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.413361520Z: syntax::parse::diagnostics: check_trailing_angle_brackets: parsed_angle_bracket_args=false
DEBUG 2020-02-13T13:44:05.413375941Z: racer::matchers: match_pattern_let point is BytePos(544)
DEBUG 2020-02-13T13:44:05.413387155Z: racer::typeinf: get_type_of match Match ["dog", "/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(544), true, Let(BytePos(540)), |let dog =  DogDog {};|] 
DEBUG 2020-02-13T13:44:05.413397071Z: racer::typeinf: get_type_of_let_expr calling parse_let |let dog =  DogDog {};|
DEBUG 2020-02-13T13:44:05.413429721Z: syntax::parse::lexer: try_next_token: Ident("let")
DEBUG 2020-02-13T13:44:05.413433704Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:44:05.413437740Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413441243Z: syntax::parse::lexer: try_next_token: Ident("dog")
DEBUG 2020-02-13T13:44:05.413444523Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(7)
DEBUG 2020-02-13T13:44:05.413449544Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413453110Z: syntax::parse::lexer: try_next_token: Eq("=")
DEBUG 2020-02-13T13:44:05.413457062Z: syntax::parse::lexer: try_next_token: Whitespace("  ")
DEBUG 2020-02-13T13:44:05.413460471Z: syntax::parse::lexer: try_next_token: Ident("DogDog")
DEBUG 2020-02-13T13:44:05.413463884Z: syntax::parse::lexer: taking an ident from BytePos(11) to BytePos(17)
DEBUG 2020-02-13T13:44:05.413467996Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413471565Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:44:05.413475294Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:44:05.413478844Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:44:05.413483309Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.413486869Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.413490512Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.413493935Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(let, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.413501589Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(DogDog, false), span: Span { lo: BytePos(11), hi: BytePos(17), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.413508038Z: syntax::parse::diagnostics: check_trailing_angle_brackets: parsed_angle_bracket_args=false
DEBUG 2020-02-13T13:44:05.413515801Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:44:05.413521408Z: syntax::print::pp: pp String('DogDog')/print Vec<0,0>
DEBUG 2020-02-13T13:44:05.413526371Z: syntax::print::pp: print String(DogDog)
DEBUG 2020-02-13T13:44:05.413513624Z: racer::ast: [LetTypeVisitor] initexpr is Struct(path(DogDog), [], None)
DEBUG 2020-02-13T13:44:05.413536408Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:44:05.413541071Z: syntax::print::pp: pp Begin(4)/buffer Vec<0,0>
DEBUG 2020-02-13T13:44:05.413545834Z: syntax::print::pp: scan_push 0
DEBUG 2020-02-13T13:44:05.413550746Z: syntax::print::pp: pp String('DogDog')/buffer Vec<0,0>
DEBUG 2020-02-13T13:44:05.413555768Z: syntax::print::pp: check_stream Vec<0, 1> with left_total=1, right_total=7
DEBUG 2020-02-13T13:44:05.413560869Z: syntax::print::pp: pp String('{')/buffer Vec<0,1>
DEBUG 2020-02-13T13:44:05.413566007Z: syntax::print::pp: check_stream Vec<0, 2> with left_total=1, right_total=8
DEBUG 2020-02-13T13:44:05.413570805Z: syntax::print::pp: pp Begin(0)/buffer Vec<0,3>
DEBUG 2020-02-13T13:44:05.413575330Z: syntax::print::pp: scan_push 3
DEBUG 2020-02-13T13:44:05.413579684Z: syntax::print::pp: pp End/buffer Vec<0,3>
DEBUG 2020-02-13T13:44:05.413584287Z: syntax::print::pp: scan_push 4
DEBUG 2020-02-13T13:44:05.413588976Z: syntax::print::pp: pp String('}')/buffer Vec<0,4>
DEBUG 2020-02-13T13:44:05.413593755Z: syntax::print::pp: check_stream Vec<0, 5> with left_total=1, right_total=9
DEBUG 2020-02-13T13:44:05.413598471Z: syntax::print::pp: pp End/buffer Vec<0,5>
DEBUG 2020-02-13T13:44:05.413602861Z: syntax::print::pp: scan_push 6
DEBUG 2020-02-13T13:44:05.413607189Z: syntax::print::pp: advance_left Vec<0,6>, sizeof(0)=8
DEBUG 2020-02-13T13:44:05.413611785Z: syntax::print::pp: print BEGIN 8 (remaining line space=78)
DEBUG 2020-02-13T13:44:05.413621369Z: syntax::print::pp: [8=BEGIN, 6=STR(DogDog,6), 1=STR({,1), 1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:44:05.413625919Z: syntax::print::pp: print Begin -> push fitting block
DEBUG 2020-02-13T13:44:05.413630473Z: syntax::print::pp: print STR(DogDog,6) 6 (remaining line space=78)
DEBUG 2020-02-13T13:44:05.413638960Z: syntax::print::pp: [6=STR(DogDog,6), 1=STR({,1), 1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:44:05.413643799Z: syntax::print::pp: print String(DogDog)
DEBUG 2020-02-13T13:44:05.413648409Z: syntax::print::pp: print STR({,1) 1 (remaining line space=72)
DEBUG 2020-02-13T13:44:05.413655497Z: syntax::print::pp: [1=STR({,1), 1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:44:05.413659653Z: syntax::print::pp: print String({)
DEBUG 2020-02-13T13:44:05.413663970Z: syntax::print::pp: print BEGIN 1 (remaining line space=71)
DEBUG 2020-02-13T13:44:05.413670232Z: syntax::print::pp: [1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:44:05.413674537Z: syntax::print::pp: print Begin -> push fitting block
DEBUG 2020-02-13T13:44:05.413678843Z: syntax::print::pp: print END 1 (remaining line space=71)
DEBUG 2020-02-13T13:44:05.413684616Z: syntax::print::pp: [1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:44:05.413688930Z: syntax::print::pp: print End -> pop End
DEBUG 2020-02-13T13:44:05.413693167Z: syntax::print::pp: print STR(},1) 1 (remaining line space=71)
DEBUG 2020-02-13T13:44:05.413698638Z: syntax::print::pp: [1=STR(},1)]
DEBUG 2020-02-13T13:44:05.413702700Z: syntax::print::pp: print String(})
DEBUG 2020-02-13T13:44:05.413707099Z: syntax::print::pp: print END 1 (remaining line space=70)
DEBUG 2020-02-13T13:44:05.413711885Z: syntax::print::pp: []
DEBUG 2020-02-13T13:44:05.413716034Z: syntax::print::pp: print End -> pop End
DEBUG 2020-02-13T13:44:05.413722337Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:44:05.413727265Z: syntax::print::pp: pp String('DogDog')/print Vec<0,0>
DEBUG 2020-02-13T13:44:05.413732063Z: syntax::print::pp: print String(DogDog)
DEBUG 2020-02-13T13:44:05.413534869Z: racer::ast: ExprTypeVisitor::visit_expr expr(4294967040: DogDog{})(kind: Struct(path(DogDog), [], None))
DEBUG 2020-02-13T13:44:05.413740767Z: racer::ast: find_type_match P[DogDog], "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:44:05.413748897Z: racer::nameres: resolve_path_with_primitive P[DogDog]
DEBUG 2020-02-13T13:44:05.413752847Z: racer::nameres: resolve_path P[DogDog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(540) ExactMatch
DEBUG 2020-02-13T13:44:05.413762463Z: racer::nameres: search_local_scopes PathSegment { name: "DogDog", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(540) ExactMatch Enum | Struct | Union | Trait
 | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.413773687Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(535) point: Some(BytePos(540)) 'DogDog' "/home/guskov/prog/samples/rust/traits/src/main.rs" Exa
ctMatch local: true
DEBUG 2020-02-13T13:44:05.413790649Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "DogDog", range: ByteRange(540..561), search_type: ExactMatch, is_loca
l: true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.413804780Z: racer::nameres: search_scope found matches ExactMatch []
DEBUG 2020-02-13T13:44:05.413809162Z: racer::nameres: search_scope_headers for |DogDog| pt: BytePos(534)
DEBUG 2020-02-13T13:44:05.413814218Z: racer::scopes: [find_stmt_start] now we are in scope BytePos(0) ~ BytePos(534)
DEBUG 2020-02-13T13:44:05.413822173Z: racer::nameres: search_scope_headers preblock is |fn main() |
DEBUG 2020-02-13T13:44:05.413826125Z: racer::nameres: search_fn_args: found start of fn!! BytePos(524) |impl blah {fn main() {}}| DogDog
DEBUG 2020-02-13T13:44:05.413831956Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(0) point: Some(BytePos(540)) 'DogDog' "/home/guskov/prog/samples/rust/traits/src/main.rs" Exact
Match local: true
DEBUG 2020-02-13T13:44:05.413846217Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "DogDog", range: ByteRange(37..55), search_type: ExactMatch, is_local:
 true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.413857245Z: racer::matchers: found!! a type DogDog
DEBUG 2020-02-13T13:44:05.413865974Z: racer::typeinf: get_type_of_typedef match is Match ["DogDog", "/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(42), true, Type, |type DogDog = Dog;|]
DEBUG 2020-02-13T13:44:05.413876402Z: racer::typeinf: get_type_of_typedef blob string type DogDog = Dog;
DEBUG 2020-02-13T13:44:05.413923842Z: syntax::parse::lexer: try_next_token: Ident("type")
DEBUG 2020-02-13T13:44:05.413928361Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(4)
DEBUG 2020-02-13T13:44:05.413932534Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413936082Z: syntax::parse::lexer: try_next_token: Ident("DogDog")
DEBUG 2020-02-13T13:44:05.413939640Z: syntax::parse::lexer: taking an ident from BytePos(5) to BytePos(11)
DEBUG 2020-02-13T13:44:05.413951695Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413955370Z: syntax::parse::lexer: try_next_token: Eq("=")
DEBUG 2020-02-13T13:44:05.413959027Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.413962351Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:44:05.413965895Z: syntax::parse::lexer: taking an ident from BytePos(14) to BytePos(17)
DEBUG 2020-02-13T13:44:05.413970016Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:44:05.413974756Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.413978352Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.413982129Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.413985614Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(type, false), span: Span { lo: BytePos(0), hi: BytePos(4), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.414015513Z: racer::ast: typevisitor type is Some(PathSearch(Search [P[Dog], "/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(37)]))
DEBUG 2020-02-13T13:44:05.414032327Z: racer::nameres: resolve_path_with_primitive P[Dog]
DEBUG 2020-02-13T13:44:05.414036709Z: racer::nameres: resolve_path P[Dog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(0) StartsWith
DEBUG 2020-02-13T13:44:05.414045748Z: racer::nameres: search_local_scopes PathSegment { name: "Dog", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(0) StartsWith Enum | Struct | Union | Trait | Ty
peDef | HasField | Type
DEBUG 2020-02-13T13:44:05.433752490Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(0) point: None 'Dog' "/home/guskov/prog/samples/rust/traits/src/main.rs" StartsWith local: true
DEBUG 2020-02-13T13:44:05.433767775Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(37..55), search_type: StartsWith, is_local: tr
ue }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.433777647Z: racer::matchers: found!! a type DogDog
DEBUG 2020-02-13T13:44:05.433789789Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(121..391), search_type: StartsWith, is_local: 
true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.433800679Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(524..625), search_type: StartsWith, is_local: 
true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.433808426Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(21..35), search_type: StartsWith, is_local: tr
ue }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.433844439Z: syntax::parse::lexer: try_next_token: Ident("use")
DEBUG 2020-02-13T13:44:05.433848192Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:44:05.433851303Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.433853442Z: syntax::parse::lexer: try_next_token: Ident("traits")
DEBUG 2020-02-13T13:44:05.433855359Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(10)
DEBUG 2020-02-13T13:44:05.433859412Z: syntax::parse::lexer: try_next_token: Colon(":")
DEBUG 2020-02-13T13:44:05.433861735Z: syntax::parse::lexer: try_next_token: Colon(":")
DEBUG 2020-02-13T13:44:05.433863959Z: syntax::parse::lexer: try_next_token: Star("*")
DEBUG 2020-02-13T13:44:05.433866177Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:44:05.433869749Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.433872043Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.433874323Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.433876452Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(use, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.433899739Z: racer::matchers: [match_use] found item: UseVisitor { path_list: [PathAlias { kind: Glob, path: P[traits], range: ByteRange(4..13) }], contains_glob: true }, searchstr: Dog
DEBUG 2020-02-13T13:44:05.433907661Z: racer::nameres: resolve_path P[traits::Dog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(21) StartsWith
DEBUG 2020-02-13T13:44:05.433915011Z: racer::nameres: resolve_path P[traits] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(21) ExactMatch
DEBUG 2020-02-13T13:44:05.433922665Z: racer::nameres: search_local_scopes PathSegment { name: "traits", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(21) ExactMatch Crate | Mod | Space | Enum | S
truct | Union | Trait | TypeDef | HasField | Type | PathParen
DEBUG 2020-02-13T13:44:05.433931183Z: racer::nameres: searching scope Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen start: BytePos(0) point: Some(BytePos(21)) 'traits' "/home/guskov/prog/sampl
es/rust/traits/src/main.rs" ExactMatch local: true
DEBUG 2020-02-13T13:44:05.433942097Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "traits", range: ByteRange(0..20), search_type: ExactMatch, is_local: 
true }, namespace: Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen
DEBUG 2020-02-13T13:44:05.433952627Z: racer::matchers: found an extern crate: |extern crate traits;|
DEBUG 2020-02-13T13:44:05.433976897Z: syntax::parse::lexer: try_next_token: Ident("extern")
DEBUG 2020-02-13T13:44:05.433980086Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(6)
DEBUG 2020-02-13T13:44:05.433982633Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.433985290Z: syntax::parse::lexer: try_next_token: Ident("crate")
DEBUG 2020-02-13T13:44:05.433988253Z: syntax::parse::lexer: taking an ident from BytePos(7) to BytePos(12)
DEBUG 2020-02-13T13:44:05.433991952Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.433994866Z: syntax::parse::lexer: try_next_token: Ident("traits")
DEBUG 2020-02-13T13:44:05.433996803Z: syntax::parse::lexer: taking an ident from BytePos(13) to BytePos(19)
DEBUG 2020-02-13T13:44:05.434002866Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:44:05.434007324Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.434010477Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.434013568Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.434016518Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(extern, false), span: Span { lo: BytePos(0), hi: BytePos(6), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.434033696Z: racer::fileres: get_crate_file traits, "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:44:05.434040638Z: racer::util: Getting rust source path. Trying env var RUST_SRC_PATH.
DEBUG 2020-02-13T13:44:05.434058640Z: racer::fileres: [get_outer_crates] lib name: "traits", from_path: "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:44:05.446531993Z: racer::metadata: MetadataCache::resolve_dependency manifest: "/home/guskov/prog/samples/rust/traits/Cargo.toml" libname: traits
DEBUG 2020-02-13T13:44:05.446574628Z: racer::nameres: [resolve_path] context: Some(Match ["traits", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(0), false, Module, |/home/guskov/prog/samples/rust/traits/src/lib.rs|]), last_
seg: PathSegment { name: "Dog", generics: [], output: None }
DEBUG 2020-02-13T13:44:05.446586841Z: racer::nameres: searching a module 'traits' for Dog
DEBUG 2020-02-13T13:44:05.446594753Z: racer::nameres: searching scope Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path start: BytePos(0) 
point: None 'Dog' "/home/guskov/prog/samples/rust/traits/src/lib.rs" StartsWith local: false
DEBUG 2020-02-13T13:44:05.446604960Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Dog", range: ByteRange(87..104), search_type: StartsWith, is_local: fa
lse }, namespace: Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path
DEBUG 2020-02-13T13:44:05.460169540Z: racer::matchers: found a struct |Dog|
DEBUG 2020-02-13T13:44:05.460181884Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Dog", range: ByteRange(486..660), search_type: StartsWith, is_local: f
alse }, namespace: Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path
DEBUG 2020-02-13T13:44:05.460194958Z: racer::nameres: search_scope found matches StartsWith [Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]]
DEBUG 2020-02-13T13:44:05.460203226Z: racer::matchers: [match_use] resolve_path returned [Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]] for Glob
DEBUG 2020-02-13T13:44:05.460211591Z: racer::nameres: search_scope found matches StartsWith [Match ["DogDog", "/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(42), true, Type, |type DogDog = Dog;|], Match ["Dog", "/home/guskov
/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]]
DEBUG 2020-02-13T13:44:05.460221292Z: racer::nameres: search_crate_root |PathSegment { name: "Dog", generics: [], output: None }| "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:44:05.460232675Z: racer::nameres: going to search for PathSegment { name: "Dog", generics: [], output: None } in crateroot "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.460238832Z: racer::nameres: search_local_scopes PathSegment { name: "Dog", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/lib.rs" BytePos(0) StartsWith Enum | Struct | Union | Trait | Typ
eDef | HasField | Type
DEBUG 2020-02-13T13:44:05.460244499Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(0) point: None 'Dog' "/home/guskov/prog/samples/rust/traits/src/lib.rs" StartsWith local: true
DEBUG 2020-02-13T13:44:05.460250692Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Dog", range: ByteRange(87..104), search_type: StartsWith, is_local: tr
ue }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.460257327Z: racer::matchers: found a struct |Dog|
DEBUG 2020-02-13T13:44:05.460261990Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Dog", range: ByteRange(486..660), search_type: StartsWith, is_local: t
rue }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.460268467Z: racer::nameres: search_scope found matches StartsWith [Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), true, Struct(GenericsArgs([])), |pub struct Dog|]]
DEBUG 2020-02-13T13:44:05.460273576Z: racer::nameres: search_crate_root |PathSegment { name: "Dog", generics: [], output: None }| "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.460280393Z: racer::nameres: search_prelude file PathSegment { name: "Dog", generics: [], output: None } StartsWith Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.460314954Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(0) point: None 'Dog' "/home/guskov/prog/samples/rust/.rustup/toolchains/stable-x86_64-unknown-l
inux-gnu/lib/rustlib/src/rust/src/libstd/prelude/v1.rs" StartsWith local: true
DEBUG 2020-02-13T13:44:05.460335723Z: racer::nameres: search_scope found matches StartsWith []
DEBUG 2020-02-13T13:44:05.460338189Z: racer::nameres: do_file_search with search string "Dog"
DEBUG 2020-02-13T13:44:05.460339596Z: racer::nameres: do_file_search std_path: Some("/home/guskov/prog/samples/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src")
DEBUG 2020-02-13T13:44:05.460346154Z: racer::nameres: do_file_search v: ["/home/guskov/prog/samples/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src", "/home/guskov/prog/samples/rust/traits/src"]
DEBUG 2020-02-13T13:44:05.460394211Z: racer::nameres: search_prelude file PathSegment { name: "Dog", generics: [], output: None } StartsWith Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:44:05.460404428Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(0) point: None 'Dog' "/home/guskov/prog/samples/rust/.rustup/toolchains/stable-x86_64-unknown-l
inux-gnu/lib/rustlib/src/rust/src/libstd/prelude/v1.rs" StartsWith local: true
DEBUG 2020-02-13T13:44:05.460422471Z: racer::nameres: search_scope found matches StartsWith []
DEBUG 2020-02-13T13:44:05.460424075Z: racer::nameres: do_file_search with search string "Dog"
DEBUG 2020-02-13T13:44:05.460425250Z: racer::nameres: do_file_search std_path: Some("/home/guskov/prog/samples/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src")
DEBUG 2020-02-13T13:44:05.460431683Z: racer::nameres: do_file_search v: ["/home/guskov/prog/samples/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src", "/home/guskov/prog/samples/rust/traits/src"]
DEBUG 2020-02-13T13:44:05.460473210Z: racer::ast: [LetTypeVisitor] ty is Some(Match(Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|])). pos is BytePos(4)
DEBUG 2020-02-13T13:44:05.460480121Z: racer::ast: destructure_pattern_to_ty point BytePos(4) ty Match(Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]) pat: 
Ident(ByValue(Immutable), dog#0, None)
DEBUG 2020-02-13T13:44:05.460488276Z: racer::ast: destructure_pattern_to_ty matched an ident!
DEBUG 2020-02-13T13:44:05.460503178Z: racer::core: complete_from_file context is Some(Match(Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]))
DEBUG 2020-02-13T13:44:05.460508899Z: racer::nameres: got a struct, looking for fields and impl methods!! Dog
DEBUG 2020-02-13T13:44:05.460511711Z: racer::scopes: [find_stmt_start] now we are in scope BytePos(0) ~ BytePos(98)
DEBUG 2020-02-13T13:44:05.460546038Z: syntax::parse::lexer: try_next_token: Ident("pub")
DEBUG 2020-02-13T13:44:05.460550733Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:44:05.460555666Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.460558477Z: syntax::parse::lexer: try_next_token: Ident("struct")
DEBUG 2020-02-13T13:44:05.460561418Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(10)
DEBUG 2020-02-13T13:44:05.460564992Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.460567715Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:44:05.460570451Z: syntax::parse::lexer: taking an ident from BytePos(11) to BytePos(14)
DEBUG 2020-02-13T13:44:05.460577594Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.460580313Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:44:05.460583633Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:44:05.460589335Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.460591942Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.460594815Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.460598038Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(pub, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.460615029Z: racer::nameres: searching for impl methods |Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]| |speak| "/home/guskov/pro
g/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.460624288Z: racer::nameres: search_for_impls BytePos(98), Dog, "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.469872899Z: syntax::parse::lexer: try_next_token: Ident("impl")
DEBUG 2020-02-13T13:44:05.469878483Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(4)
DEBUG 2020-02-13T13:44:05.469883009Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.469885369Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:44:05.469888007Z: syntax::parse::lexer: taking an ident from BytePos(5) to BytePos(11)
DEBUG 2020-02-13T13:44:05.469891394Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.469893426Z: syntax::parse::lexer: try_next_token: Ident("for")
DEBUG 2020-02-13T13:44:05.469895690Z: syntax::parse::lexer: taking an ident from BytePos(12) to BytePos(15)
DEBUG 2020-02-13T13:44:05.469897921Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.469900214Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:44:05.469902113Z: syntax::parse::lexer: taking an ident from BytePos(16) to BytePos(19)
DEBUG 2020-02-13T13:44:05.469903939Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.469905907Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:44:05.469907449Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:44:05.469909973Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.469912190Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.469914321Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.469916412Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(impl, false), span: Span { lo: BytePos(0), hi: BytePos(4), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.469933670Z: racer::nameres: found impl!! |ImplHeader { self_path: P[Dog], trait_path: Some(P[Animal]), generics: GenericsArgs([]), filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", local: false, impl_
start: BytePos(486), block_start: BytePos(506) }| looking for methods
DEBUG 2020-02-13T13:44:05.469943125Z: racer::nameres: searching scope for methods BytePos(507) |speak| "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.469949857Z: racer::nameres: resolve_path P[Animal] "/home/guskov/prog/samples/rust/traits/src/lib.rs" BytePos(486) ExactMatch
DEBUG 2020-02-13T13:44:05.469968348Z: racer::nameres: search_local_scopes PathSegment { name: "Animal", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/lib.rs" BytePos(486) ExactMatch Trait
DEBUG 2020-02-13T13:44:05.469974294Z: racer::nameres: searching scope Trait start: BytePos(0) point: Some(BytePos(486)) 'Animal' "/home/guskov/prog/samples/rust/traits/src/lib.rs" ExactMatch local: true
DEBUG 2020-02-13T13:44:05.469981781Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Animal", range: ByteRange(0..84), search_type: ExactMatch, is_local: t
rue }, namespace: Trait                                                                  
DEBUG 2020-02-13T13:44:05.469988125Z: racer::matchers: found!! a trait Animal
DEBUG 2020-02-13T13:44:05.470009910Z: syntax::parse::lexer: try_next_token: Ident("pub")
DEBUG 2020-02-13T13:44:05.470012256Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:44:05.470014576Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.470016536Z: syntax::parse::lexer: try_next_token: Ident("trait")
DEBUG 2020-02-13T13:44:05.470018429Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(9)
DEBUG 2020-02-13T13:44:05.470020596Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.470022445Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:44:05.470024274Z: syntax::parse::lexer: taking an ident from BytePos(10) to BytePos(16)
DEBUG 2020-02-13T13:44:05.478744249Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:44:05.478748178Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:44:05.478750908Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.478752955Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.478754471Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.478755909Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(pub, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:44:05.478769268Z: racer::nameres: searching scope for methods BytePos(18) |speak| "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.478776287Z: racer::nameres: search_for_generic_impls BytePos(10), Animal, "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:44:05.478802732Z: syntax::parse::lexer: try_next_token: Ident("impl")
DEBUG 2020-02-13T13:44:05.478805011Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(4)
DEBUG 2020-02-13T13:44:05.478806754Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.478808287Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:44:05.478809591Z: syntax::parse::lexer: taking an ident from BytePos(5) to BytePos(11)
DEBUG 2020-02-13T13:44:05.478811862Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.478813195Z: syntax::parse::lexer: try_next_token: Ident("for")
DEBUG 2020-02-13T13:44:05.478814426Z: syntax::parse::lexer: taking an ident from BytePos(12) to BytePos(15)
DEBUG 2020-02-13T13:44:05.478816099Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.478817301Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:44:05.478818469Z: syntax::parse::lexer: taking an ident from BytePos(16) to BytePos(19)
DEBUG 2020-02-13T13:44:05.478820037Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:44:05.478821286Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:44:05.478822764Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:44:05.478824567Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:44:05.478825919Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:44:05.478827276Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:44:05.478828486Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(impl, false), span: Span { lo: BytePos(0), hi: BytePos(4), ctxt: #0 } }
END
[guskovd/rust-samples/1.0.25] guskov@UFO ~/prog/samples/rust/traits 
 -- >^C
[guskovd/rust-samples/1.0.25] guskov@UFO ~/prog/samples/rust/traits 
 --> racer find-definition 16 11 /home/guskov/prog/samples/rust/traits/src/main.rs
DEBUG 2020-02-13T13:53:20.588913793Z: racer::util: Getting rust source path. Trying env var RUST_SRC_PATH.
DEBUG 2020-02-13T13:53:20.589205732Z: racer::core: find_definition_ for |"dog"| |"speak"| Field
DEBUG 2020-02-13T13:53:20.589482096Z: syntax::parse::lexer: try_next_token: Ident("dog")
DEBUG 2020-02-13T13:53:20.589500441Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:53:20.589558266Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.589572603Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.589585483Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.589620946Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(dog, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.589668287Z: syntax::parse::diagnostics: check_trailing_angle_brackets: parsed_angle_bracket_args=false
DEBUG 2020-02-13T13:53:20.589772675Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:53:20.589801198Z: syntax::print::pp: pp Begin(4)/buffer Vec<0,0>
DEBUG 2020-02-13T13:53:20.589812907Z: syntax::print::pp: scan_push 0
DEBUG 2020-02-13T13:53:20.589827490Z: syntax::print::pp: pp String('dog')/buffer Vec<0,0>
DEBUG 2020-02-13T13:53:20.589839587Z: syntax::print::pp: check_stream Vec<0, 1> with left_total=1, right_total=4
DEBUG 2020-02-13T13:53:20.589859859Z: syntax::print::pp: pp End/buffer Vec<0,1>
DEBUG 2020-02-13T13:53:20.589877579Z: syntax::print::pp: scan_push 2
DEBUG 2020-02-13T13:53:20.589892073Z: syntax::print::pp: advance_left Vec<0,2>, sizeof(0)=3
DEBUG 2020-02-13T13:53:20.589909955Z: syntax::print::pp: print BEGIN 3 (remaining line space=78)
DEBUG 2020-02-13T13:53:20.589932657Z: syntax::print::pp: [3=BEGIN, 3=STR(dog,3)]
DEBUG 2020-02-13T13:53:20.589948094Z: syntax::print::pp: print Begin -> push fitting block
DEBUG 2020-02-13T13:53:20.589962590Z: syntax::print::pp: print STR(dog,3) 3 (remaining line space=78)
DEBUG 2020-02-13T13:53:20.589981976Z: syntax::print::pp: [3=STR(dog,3)]
DEBUG 2020-02-13T13:53:20.589995715Z: syntax::print::pp: print String(dog)
DEBUG 2020-02-13T13:53:20.590011263Z: syntax::print::pp: print END 1 (remaining line space=75)
DEBUG 2020-02-13T13:53:20.590027167Z: syntax::print::pp: []
DEBUG 2020-02-13T13:53:20.590041003Z: syntax::print::pp: print End -> pop End
DEBUG 2020-02-13T13:53:20.590062544Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:53:20.590078271Z: syntax::print::pp: pp String('dog')/print Vec<0,0>
DEBUG 2020-02-13T13:53:20.590093421Z: syntax::print::pp: print String(dog)
DEBUG 2020-02-13T13:53:20.589740335Z: racer::ast: ExprTypeVisitor::visit_expr expr(4294967040: dog)(kind: Path(None, path(dog)))
DEBUG 2020-02-13T13:53:20.590123364Z: racer::ast: resolve_ast_path P[dog] Scope ["/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(268)]
DEBUG 2020-02-13T13:53:20.590167666Z: racer::nameres: resolve_path_with_primitive P[dog]
DEBUG 2020-02-13T13:53:20.590183938Z: racer::nameres: resolve_path P[dog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(268) ExactMatch
DEBUG 2020-02-13T13:53:20.590219763Z: racer::nameres: search_local_scopes PathSegment { name: "dog", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(268) ExactMatch Crate | Mod | Space | Enum | Str
uct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path
DEBUG 2020-02-13T13:53:20.590264747Z: racer::nameres: searching scope Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path start: BytePos(234
) point: Some(BytePos(268)) 'dog' "/home/guskov/prog/samples/rust/traits/src/main.rs" ExactMatch local: true
DEBUG 2020-02-13T13:53:20.590448768Z: syntax::parse::lexer: try_next_token: Ident("let")
DEBUG 2020-02-13T13:53:20.590465033Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:53:20.590480575Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.590493823Z: syntax::parse::lexer: try_next_token: Ident("dog")
DEBUG 2020-02-13T13:53:20.590505050Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(7)
DEBUG 2020-02-13T13:53:20.590546254Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.590560675Z: syntax::parse::lexer: try_next_token: Eq("=")
DEBUG 2020-02-13T13:53:20.590573825Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.590586415Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:53:20.590598097Z: syntax::parse::lexer: taking an ident from BytePos(10) to BytePos(13)
DEBUG 2020-02-13T13:53:20.590611214Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.590623028Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.590635651Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.590648798Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:53:20.590665644Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.590677740Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.590690603Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.590703461Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(let, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.590764130Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(Dog, false), span: Span { lo: BytePos(10), hi: BytePos(13), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.590802130Z: syntax::parse::diagnostics: check_trailing_angle_brackets: parsed_angle_bracket_args=false
DEBUG 2020-02-13T13:53:20.590846903Z: racer::matchers: match_pattern_let point is BytePos(243)
DEBUG 2020-02-13T13:53:20.590883307Z: racer::typeinf: get_type_of match Match ["dog", "/home/guskov/prog/samples/rust/traits/src/main.rs", BytePos(243), true, Let(BytePos(239)), |let dog = Dog {};|] 
DEBUG 2020-02-13T13:53:20.590916388Z: racer::typeinf: get_type_of_let_expr calling parse_let |let dog = Dog {};|
DEBUG 2020-02-13T13:53:20.591019362Z: syntax::parse::lexer: try_next_token: Ident("let")
DEBUG 2020-02-13T13:53:20.591033720Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:53:20.591048321Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.591059987Z: syntax::parse::lexer: try_next_token: Ident("dog")
DEBUG 2020-02-13T13:53:20.591071507Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(7)
DEBUG 2020-02-13T13:53:20.591088737Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.591101646Z: syntax::parse::lexer: try_next_token: Eq("=")
DEBUG 2020-02-13T13:53:20.591114399Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.591125991Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:53:20.591137283Z: syntax::parse::lexer: taking an ident from BytePos(10) to BytePos(13)
DEBUG 2020-02-13T13:53:20.591150391Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.591162020Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.591174160Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.591186301Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:53:20.591202283Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.591215436Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.591228313Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.591241060Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(let, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.591267566Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(Dog, false), span: Span { lo: BytePos(10), hi: BytePos(13), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.591288925Z: syntax::parse::diagnostics: check_trailing_angle_brackets: parsed_angle_bracket_args=false
DEBUG 2020-02-13T13:53:20.591316585Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:53:20.591334641Z: syntax::print::pp: pp String('Dog')/print Vec<0,0>
DEBUG 2020-02-13T13:53:20.591349595Z: syntax::print::pp: print String(Dog)
DEBUG 2020-02-13T13:53:20.591308754Z: racer::ast: [LetTypeVisitor] initexpr is Struct(path(Dog), [], None)
DEBUG 2020-02-13T13:53:20.591381548Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:53:20.591395371Z: syntax::print::pp: pp Begin(4)/buffer Vec<0,0>
DEBUG 2020-02-13T13:53:20.591409411Z: syntax::print::pp: scan_push 0
DEBUG 2020-02-13T13:53:20.591423521Z: syntax::print::pp: pp String('Dog')/buffer Vec<0,0>
DEBUG 2020-02-13T13:53:20.591438806Z: syntax::print::pp: check_stream Vec<0, 1> with left_total=1, right_total=4
DEBUG 2020-02-13T13:53:20.591455076Z: syntax::print::pp: pp String('{')/buffer Vec<0,1>
DEBUG 2020-02-13T13:53:20.591470063Z: syntax::print::pp: check_stream Vec<0, 2> with left_total=1, right_total=5
DEBUG 2020-02-13T13:53:20.591485254Z: syntax::print::pp: pp Begin(0)/buffer Vec<0,3>
DEBUG 2020-02-13T13:53:20.591499707Z: syntax::print::pp: scan_push 3
DEBUG 2020-02-13T13:53:20.591513151Z: syntax::print::pp: pp End/buffer Vec<0,3>
DEBUG 2020-02-13T13:53:20.591527171Z: syntax::print::pp: scan_push 4
DEBUG 2020-02-13T13:53:20.591540888Z: syntax::print::pp: pp String('}')/buffer Vec<0,4>
DEBUG 2020-02-13T13:53:20.591578253Z: syntax::print::pp: check_stream Vec<0, 5> with left_total=1, right_total=6
DEBUG 2020-02-13T13:53:20.591595993Z: syntax::print::pp: pp End/buffer Vec<0,5>
DEBUG 2020-02-13T13:53:20.591610317Z: syntax::print::pp: scan_push 6
DEBUG 2020-02-13T13:53:20.591624529Z: syntax::print::pp: advance_left Vec<0,6>, sizeof(0)=5
DEBUG 2020-02-13T13:53:20.591639850Z: syntax::print::pp: print BEGIN 5 (remaining line space=78)
DEBUG 2020-02-13T13:53:20.591668132Z: syntax::print::pp: [5=BEGIN, 3=STR(Dog,3), 1=STR({,1), 1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:53:20.591682184Z: syntax::print::pp: print Begin -> push fitting block
DEBUG 2020-02-13T13:53:20.591695989Z: syntax::print::pp: print STR(Dog,3) 3 (remaining line space=78)
DEBUG 2020-02-13T13:53:20.591721439Z: syntax::print::pp: [3=STR(Dog,3), 1=STR({,1), 1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:53:20.591735356Z: syntax::print::pp: print String(Dog)
DEBUG 2020-02-13T13:53:20.591749082Z: syntax::print::pp: print STR({,1) 1 (remaining line space=75)
DEBUG 2020-02-13T13:53:20.591771333Z: syntax::print::pp: [1=STR({,1), 1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:53:20.591784204Z: syntax::print::pp: print String({)
DEBUG 2020-02-13T13:53:20.591798007Z: syntax::print::pp: print BEGIN 1 (remaining line space=74)
DEBUG 2020-02-13T13:53:20.591816636Z: syntax::print::pp: [1=BEGIN, 1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:53:20.591829656Z: syntax::print::pp: print Begin -> push fitting block
DEBUG 2020-02-13T13:53:20.591843148Z: syntax::print::pp: print END 1 (remaining line space=74)
DEBUG 2020-02-13T13:53:20.591861309Z: syntax::print::pp: [1=END, 1=STR(},1)]
DEBUG 2020-02-13T13:53:20.591874468Z: syntax::print::pp: print End -> pop End
DEBUG 2020-02-13T13:53:20.591887859Z: syntax::print::pp: print STR(},1) 1 (remaining line space=74)
DEBUG 2020-02-13T13:53:20.591904606Z: syntax::print::pp: [1=STR(},1)]
DEBUG 2020-02-13T13:53:20.591917462Z: syntax::print::pp: print String(})
DEBUG 2020-02-13T13:53:20.591930609Z: syntax::print::pp: print END 1 (remaining line space=73)
DEBUG 2020-02-13T13:53:20.591944756Z: syntax::print::pp: []
DEBUG 2020-02-13T13:53:20.591957601Z: syntax::print::pp: print End -> pop End
DEBUG 2020-02-13T13:53:20.591976073Z: syntax::print::pp: mk_printer 78
DEBUG 2020-02-13T13:53:20.591990541Z: syntax::print::pp: pp String('Dog')/print Vec<0,0>
DEBUG 2020-02-13T13:53:20.592004706Z: syntax::print::pp: print String(Dog)
DEBUG 2020-02-13T13:53:20.591377211Z: racer::ast: ExprTypeVisitor::visit_expr expr(4294967040: Dog{})(kind: Struct(path(Dog), [], None))
DEBUG 2020-02-13T13:53:20.592032214Z: racer::ast: find_type_match P[Dog], "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:53:20.592059591Z: racer::nameres: resolve_path_with_primitive P[Dog]
DEBUG 2020-02-13T13:53:20.592073812Z: racer::nameres: resolve_path P[Dog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(239) ExactMatch
DEBUG 2020-02-13T13:53:20.592107191Z: racer::nameres: search_local_scopes PathSegment { name: "Dog", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(239) ExactMatch Enum | Struct | Union | Trait | 
TypeDef | HasField | Type
DEBUG 2020-02-13T13:53:20.592144685Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(234) point: Some(BytePos(239)) 'Dog' "/home/guskov/prog/samples/rust/traits/src/main.rs" ExactM
atch local: true
DEBUG 2020-02-13T13:53:20.592199064Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(239..256), search_type: ExactMatch, is_local: 
true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:53:20.592245969Z: racer::nameres: search_scope found matches ExactMatch []
DEBUG 2020-02-13T13:53:20.592259657Z: racer::nameres: search_scope_headers for |Dog| pt: BytePos(233)
DEBUG 2020-02-13T13:53:20.592274407Z: racer::scopes: [find_stmt_start] now we are in scope BytePos(0) ~ BytePos(233)
DEBUG 2020-02-13T13:53:20.592296640Z: racer::nameres: search_scope_headers preblock is |fn main() |
DEBUG 2020-02-13T13:53:20.592309824Z: racer::nameres: search_fn_args: found start of fn!! BytePos(223) |impl blah {fn main() {}}| Dog
DEBUG 2020-02-13T13:53:20.592327148Z: racer::nameres: searching scope Enum | Struct | Union | Trait | TypeDef | HasField | Type start: BytePos(0) point: Some(BytePos(239)) 'Dog' "/home/guskov/prog/samples/rust/traits/src/main.rs" ExactMat
ch local: true
DEBUG 2020-02-13T13:53:20.592372134Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(100..221), search_type: ExactMatch, is_local: 
true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:53:20.592409459Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(223..275), search_type: ExactMatch, is_local: 
true }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:53:20.592442874Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "Dog", range: ByteRange(21..54), search_type: ExactMatch, is_local: tr
ue }, namespace: Enum | Struct | Union | Trait | TypeDef | HasField | Type
DEBUG 2020-02-13T13:53:20.592513103Z: syntax::parse::lexer: try_next_token: Ident("use")
DEBUG 2020-02-13T13:53:20.592517487Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:53:20.592521748Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.592525153Z: syntax::parse::lexer: try_next_token: Ident("crate")
DEBUG 2020-02-13T13:53:20.592528454Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(9)
DEBUG 2020-02-13T13:53:20.592532397Z: syntax::parse::lexer: try_next_token: Colon(":")
DEBUG 2020-02-13T13:53:20.592535953Z: syntax::parse::lexer: try_next_token: Colon(":")
DEBUG 2020-02-13T13:53:20.592539820Z: syntax::parse::lexer: try_next_token: Ident("traits")
DEBUG 2020-02-13T13:53:20.592543193Z: syntax::parse::lexer: taking an ident from BytePos(11) to BytePos(17)
DEBUG 2020-02-13T13:53:20.592555230Z: syntax::parse::lexer: try_next_token: Colon(":")
DEBUG 2020-02-13T13:53:20.592559001Z: syntax::parse::lexer: try_next_token: Colon(":")
DEBUG 2020-02-13T13:53:20.592562816Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.592566438Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:53:20.592569665Z: syntax::parse::lexer: taking an ident from BytePos(20) to BytePos(23)
DEBUG 2020-02-13T13:53:20.592573412Z: syntax::parse::lexer: try_next_token: Comma(",")
DEBUG 2020-02-13T13:53:20.592576914Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.592580394Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:53:20.592583649Z: syntax::parse::lexer: taking an ident from BytePos(25) to BytePos(31)
DEBUG 2020-02-13T13:53:20.592587603Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.592591360Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:53:20.592595970Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.592600070Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.592603810Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.592607216Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(use, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.592642092Z: racer::matchers: [match_use] found item: UseVisitor { path_list: [PathAlias { kind: Ident("Dog", None), path: P[crate::traits::Dog], range: ByteRange(20..23) }, PathAlias { kind: Ident("Animal", None)
, path: P[crate::traits::Animal], range: ByteRange(25..31) }], contains_glob: false }, searchstr: Dog
DEBUG 2020-02-13T13:53:20.595439878Z: racer::nameres: resolve_path P[traits::Dog] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(21) ExactMatch
DEBUG 2020-02-13T13:53:20.595453365Z: racer::nameres: resolve_path P[traits] "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(21) ExactMatch
DEBUG 2020-02-13T13:53:20.595463074Z: racer::nameres: search_local_scopes PathSegment { name: "traits", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/main.rs" BytePos(21) ExactMatch Crate | Mod | Space | Enum | S
truct | Union | Trait | TypeDef | HasField | Type | PathParen
DEBUG 2020-02-13T13:53:20.595473108Z: racer::nameres: searching scope Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen start: BytePos(0) point: Some(BytePos(21)) 'traits' "/home/guskov/prog/sampl
es/rust/traits/src/main.rs" ExactMatch local: true
DEBUG 2020-02-13T13:53:20.595485596Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/main.rs", search_str: "traits", range: ByteRange(0..20), search_type: ExactMatch, is_local: 
true }, namespace: Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen
DEBUG 2020-02-13T13:53:20.595498109Z: racer::matchers: found an extern crate: |extern crate traits;|
DEBUG 2020-02-13T13:53:20.595530146Z: syntax::parse::lexer: try_next_token: Ident("extern")
DEBUG 2020-02-13T13:53:20.595533862Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(6)
DEBUG 2020-02-13T13:53:20.595537097Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.595539580Z: syntax::parse::lexer: try_next_token: Ident("crate")
DEBUG 2020-02-13T13:53:20.595541859Z: syntax::parse::lexer: taking an ident from BytePos(7) to BytePos(12)
DEBUG 2020-02-13T13:53:20.595544686Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.595546892Z: syntax::parse::lexer: try_next_token: Ident("traits")
DEBUG 2020-02-13T13:53:20.595549024Z: syntax::parse::lexer: taking an ident from BytePos(13) to BytePos(19)
DEBUG 2020-02-13T13:53:20.595553024Z: syntax::parse::lexer: try_next_token: Semi(";")
DEBUG 2020-02-13T13:53:20.595556964Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.595559336Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.595561789Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.595564334Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(extern, false), span: Span { lo: BytePos(0), hi: BytePos(6), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.595587179Z: racer::fileres: get_crate_file traits, "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:53:20.595594847Z: racer::util: Getting rust source path. Trying env var RUST_SRC_PATH.
DEBUG 2020-02-13T13:53:20.595612490Z: racer::fileres: [get_outer_crates] lib name: "traits", from_path: "/home/guskov/prog/samples/rust/traits/src/main.rs"
DEBUG 2020-02-13T13:53:20.610776588Z: racer::metadata: MetadataCache::resolve_dependency manifest: "/home/guskov/prog/samples/rust/traits/Cargo.toml" libname: traits
DEBUG 2020-02-13T13:53:20.610824124Z: racer::nameres: [resolve_path] context: Some(Match ["traits", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(0), false, Module, |/home/guskov/prog/samples/rust/traits/src/lib.rs|]), last_
seg: PathSegment { name: "Dog", generics: [], output: None }
DEBUG 2020-02-13T13:53:20.613838638Z: racer::nameres: searching a module 'traits' for Dog
DEBUG 2020-02-13T13:53:20.613852389Z: racer::nameres: searching scope Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path start: BytePos(0) 
point: None 'Dog' "/home/guskov/prog/samples/rust/traits/src/lib.rs" ExactMatch local: false
DEBUG 2020-02-13T13:53:20.613865196Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Dog", range: ByteRange(87..104), search_type: ExactMatch, is_local: fa
lse }, namespace: Crate | Mod | Space | Enum | Struct | Union | Trait | TypeDef | HasField | Type | PathParen | Const | Static | Func | Macro | Impl | PathChild | Path
DEBUG 2020-02-13T13:53:20.613879822Z: racer::matchers: found a struct |Dog|
DEBUG 2020-02-13T13:53:20.613891254Z: racer::matchers: [match_use] PathAliasKind::Ident "Dog" was found
DEBUG 2020-02-13T13:53:20.613903550Z: racer::ast: [LetTypeVisitor] ty is Some(Match(Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|])). pos is BytePos(4)
DEBUG 2020-02-13T13:53:20.613913152Z: racer::ast: destructure_pattern_to_ty point BytePos(4) ty Match(Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]) pat: 
Ident(ByValue(Immutable), dog#0, None)
DEBUG 2020-02-13T13:53:20.613925065Z: racer::ast: destructure_pattern_to_ty matched an ident!
DEBUG 2020-02-13T13:53:20.613943041Z: racer::core: context is Some(Match(Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]))
DEBUG 2020-02-13T13:53:20.613951900Z: racer::nameres: got a struct, looking for fields and impl methods!! Dog
DEBUG 2020-02-13T13:53:20.613956382Z: racer::scopes: [find_stmt_start] now we are in scope BytePos(0) ~ BytePos(98)
DEBUG 2020-02-13T13:53:20.613998147Z: syntax::parse::lexer: try_next_token: Ident("pub")
DEBUG 2020-02-13T13:53:20.614002283Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:53:20.614006630Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.614009919Z: syntax::parse::lexer: try_next_token: Ident("struct")
DEBUG 2020-02-13T13:53:20.614012763Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(10)
DEBUG 2020-02-13T13:53:20.614016278Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.614019103Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:53:20.614021979Z: syntax::parse::lexer: taking an ident from BytePos(11) to BytePos(14)
DEBUG 2020-02-13T13:53:20.614032110Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.614035405Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.614038618Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.614043821Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.614047201Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.614050539Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.614054123Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(pub, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.614072785Z: racer::nameres: searching for impl methods |Match ["Dog", "/home/guskov/prog/samples/rust/traits/src/lib.rs", BytePos(98), false, Struct(GenericsArgs([])), |pub struct Dog|]| |speak| "/home/guskov/pro
g/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:53:20.627684732Z: racer::nameres: search_for_impls BytePos(98), Dog, "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:53:20.627720646Z: syntax::parse::lexer: try_next_token: Ident("impl")
DEBUG 2020-02-13T13:53:20.627724388Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(4)
DEBUG 2020-02-13T13:53:20.627726829Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.627728552Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:53:20.627730144Z: syntax::parse::lexer: taking an ident from BytePos(5) to BytePos(11)
DEBUG 2020-02-13T13:53:20.627733444Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.627735021Z: syntax::parse::lexer: try_next_token: Ident("for")
DEBUG 2020-02-13T13:53:20.627736600Z: syntax::parse::lexer: taking an ident from BytePos(12) to BytePos(15)
DEBUG 2020-02-13T13:53:20.627738508Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.627740126Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:53:20.627741611Z: syntax::parse::lexer: taking an ident from BytePos(16) to BytePos(19)
DEBUG 2020-02-13T13:53:20.627743599Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.627745203Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.627746916Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.627749784Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.627751623Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.627753379Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.627755219Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(impl, false), span: Span { lo: BytePos(0), hi: BytePos(4), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.627780573Z: racer::nameres: found impl!! |ImplHeader { self_path: P[Dog], trait_path: Some(P[Animal]), generics: GenericsArgs([]), filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", local: false, impl_
start: BytePos(106), block_start: BytePos(126) }| looking for methods
DEBUG 2020-02-13T13:53:20.627792178Z: racer::nameres: searching scope for methods BytePos(127) |speak| "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:53:20.627799604Z: racer::nameres: resolve_path P[Animal] "/home/guskov/prog/samples/rust/traits/src/lib.rs" BytePos(106) ExactMatch
DEBUG 2020-02-13T13:53:20.627805620Z: racer::nameres: search_local_scopes PathSegment { name: "Animal", generics: [], output: None } "/home/guskov/prog/samples/rust/traits/src/lib.rs" BytePos(106) ExactMatch Trait
DEBUG 2020-02-13T13:53:20.627811661Z: racer::nameres: searching scope Trait start: BytePos(0) point: Some(BytePos(106)) 'Animal' "/home/guskov/prog/samples/rust/traits/src/lib.rs" ExactMatch local: true
DEBUG 2020-02-13T13:53:20.627819946Z: racer::nameres: [run_matchers_on_blob] cxt: MatchCxt { filepath: "/home/guskov/prog/samples/rust/traits/src/lib.rs", search_str: "Animal", range: ByteRange(0..84), search_type: ExactMatch, is_local: t
rue }, namespace: Trait
DEBUG 2020-02-13T13:53:20.627827073Z: racer::matchers: found!! a trait Animal
DEBUG 2020-02-13T13:53:20.627852359Z: syntax::parse::lexer: try_next_token: Ident("pub")
DEBUG 2020-02-13T13:53:20.627854956Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(3)
DEBUG 2020-02-13T13:53:20.627856962Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.627858550Z: syntax::parse::lexer: try_next_token: Ident("trait")
DEBUG 2020-02-13T13:53:20.627860073Z: syntax::parse::lexer: taking an ident from BytePos(4) to BytePos(9)
DEBUG 2020-02-13T13:53:20.627862006Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.627863513Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:53:20.627865165Z: syntax::parse::lexer: taking an ident from BytePos(10) to BytePos(16)
DEBUG 2020-02-13T13:53:20.627867909Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.627869772Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.639909531Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.639913751Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.639915545Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.639917165Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(pub, false), span: Span { lo: BytePos(0), hi: BytePos(3), ctxt: #0 } }
DEBUG 2020-02-13T13:53:20.639931788Z: racer::nameres: searching scope for methods BytePos(18) |speak| "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:53:20.639939247Z: racer::nameres: search_for_generic_impls BytePos(10), Animal, "/home/guskov/prog/samples/rust/traits/src/lib.rs"
DEBUG 2020-02-13T13:53:20.639968862Z: syntax::parse::lexer: try_next_token: Ident("impl")
DEBUG 2020-02-13T13:53:20.639971635Z: syntax::parse::lexer: taking an ident from BytePos(0) to BytePos(4)
DEBUG 2020-02-13T13:53:20.639973535Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.639975087Z: syntax::parse::lexer: try_next_token: Ident("Animal")
DEBUG 2020-02-13T13:53:20.639976530Z: syntax::parse::lexer: taking an ident from BytePos(5) to BytePos(11)
DEBUG 2020-02-13T13:53:20.639979124Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.639980613Z: syntax::parse::lexer: try_next_token: Ident("for")
DEBUG 2020-02-13T13:53:20.639981976Z: syntax::parse::lexer: taking an ident from BytePos(12) to BytePos(15)
DEBUG 2020-02-13T13:53:20.639983596Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.639984935Z: syntax::parse::lexer: try_next_token: Ident("Dog")
DEBUG 2020-02-13T13:53:20.639986247Z: syntax::parse::lexer: taking an ident from BytePos(16) to BytePos(19)
DEBUG 2020-02-13T13:53:20.639987991Z: syntax::parse::lexer: try_next_token: Whitespace(" ")
DEBUG 2020-02-13T13:53:20.639989436Z: syntax::parse::lexer: try_next_token: OpenBrace("{")
DEBUG 2020-02-13T13:53:20.639991021Z: syntax::parse::lexer: try_next_token: CloseBrace("}")
DEBUG 2020-02-13T13:53:20.639993047Z: syntax::source_map: byte pos BytePos(0) is on the line at byte pos BytePos(0)
DEBUG 2020-02-13T13:53:20.639994580Z: syntax::source_map: char pos CharPos(0) is on the line at char pos CharPos(0)
DEBUG 2020-02-13T13:53:20.639996163Z: syntax::source_map: byte is on line: 1
DEBUG 2020-02-13T13:53:20.639997516Z: syntax::parse::attr: parse_outer_attributes: self.token=Token { kind: Ident(impl, false), span: Span { lo: BytePos(0), hi: BytePos(4), ctxt: #0 } }
END

@guskovd
Copy link
Author

guskovd commented May 3, 2020

another examples:
good:

mod my_trait {
    pub trait MyTrait {
        fn my_method(&self);
    }

}

mod my_struct {
    use super::my_trait::MyTrait;
    pub struct MyStruct {
        
    }
    impl MyTrait for MyStruct {
        fn my_method(&self) {
            println!("hello", );
        }
    }
}

fn main() {
    use my_struct::MyStruct;
    use my_trait::MyTrait;

    let ms = MyStruct {};
    ms.my_method();
}

bad:

mod my_trait {
    use super::my_struct::MyStruct;
    pub trait MyTrait {
        fn my_method(&self);
    }
    impl MyTrait for MyStruct {
        fn my_method(&self) {
            println!("hello", );
        }
    }
}

mod my_struct {
    pub struct MyStruct {
        
    }
}

fn main() {
    use my_struct::MyStruct;
    use my_trait::MyTrait;

    let ms = MyStruct {};
    ms.my_method();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant