You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run this through rustc -Z save-analysis and look at the save-analysis JSON file, you'll see that there is no entry for the Foo part of Foo::new(). This seems like a bug.
According to rustc -Z ast-json test.rs the expression is a ExprKind::Call where the Foo::new part would be a Path with two PathSegments. This seems to be processed in process_pathhere. Not obvious to me why it would fail, since the write_sub_paths_truncated at the end looks like it should deal with the first path segment.
Activity
[-]save-analysis doesn't dump [/-][+]save-analysis doesn't dump ref entry for struct name in static method calls[/+]staktrace commentedon Jan 9, 2019
/cc @nrc
staktrace commentedon Jan 9, 2019
According to
rustc -Z ast-json test.rs
the expression is aExprKind::Call
where theFoo::new
part would be aPath
with twoPathSegment
s. This seems to be processed inprocess_path
here. Not obvious to me why it would fail, since thewrite_sub_paths_truncated
at the end looks like it should deal with the first path segment.Xanewok commentedon Jan 9, 2019
cc me
emilio commentedon Jan 9, 2019
I'm taking a look at this, fwiw.
process_method_call
does nothing with the segment, looks like it should.emilio commentedon Jan 9, 2019
Oh, it's a bit more subtle, but I see what's going on now.
emilio commentedon Jan 9, 2019
I got a fix, testing to see if I can remove hacks to existing code now.
emilio commentedon Jan 9, 2019
Fix is at #57474, but it's unclear to me how to add a test for this. Any doc I could look at?
tests: Add a test attempt for rust-lang/rust#57462.
tests: Add a test attempt for rust-lang/rust#57462.
14 remaining items