-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rustdoc ICE with argument position impl Trait #46976
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
Comments
FWIW, I just got rustc (almost -- run-make fails) compiling on my setup, and would be interested in trying my hand digging further into this, UPDATE: Got a failing test working |
UPDATE: I was wrong to suspect e502194, I think, sorry cramertj
|
Trace says it's rust/src/librustdoc/html/render.rs Lines 4129 to 4141 in 8d4da4f
Sure enough, this is underflow: -4133 Some(segments[segments.len() - 1].name.clone())
+4133 let path_segment = segments.into_iter().last().unwrap_or_else(|| panic!(
+4134 "get_index_type_name(clean_type: {:?}, accept_generic: {:?}) had length zero path",
+4135 clean_type, accept_generic
+4136 ));
+4137 Some(path_segment.name.clone())
Work done so far: CAD97/rust@75c2824 I'm not really sure where to go from here. Attempted to revert ab7abfc, got a broken mess. I'm thinking it was #46754 again, but lack the tools to bisect. @cramertj, have any ideas? The problem is that an argument position impl Trait is generating a zero-segment Path for rustdoc. |
@CAD97 the actual issue is possibly in |
I noticed that the PR in question did remove the match for Here's the line where the empty path.segments is generated: e502194#diff-64b696b0ef6ad44140e973801ed82b25R1000 I think the problem is thus cleaning getting |
@CAD97 something that I find useful in cases like that is to use the debugger:
That will print out the backtrace of the chain of callers of that method (you can use |
According to my Travis logs, this is a regression between (last good)
and (first bad)
though complicated by the fact that my build broke on 46959 in the same interval. Actually, we're in luck, I had
1.24.0-nightly (250b49205 2017-12-21)
locally which also errors. So the interval is 7eb64b8...250b492 (probably).e502194 from #46754 pops out as relevant, @cramertj?
The text was updated successfully, but these errors were encountered: