-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE when cargo doc
on lexical-core
: attempted .def_id() on invalid res: Err
#64705
Comments
@jonas-schievink I can confirm that this ICE does not occur on Rust 1.37.0 stable, as shown in #65367 (comment). This might be a regression that slipped through the stable release somehow. |
This still happens on 1.39 stable.
|
cc @rust-lang/rustdoc |
It also does it when documenting a project with
|
This happened on our recent build rust 1.39.0 as well. https://docs.rs/crate/ironoxide/0.14.0/builds |
cc @rust-lang/rustdoc please triage regressions! If anyone would like to help out here: This is in need of a minimal example that reproduces the issue, as well as a bisection to pinpoint the PR that introduced this regression. |
Sorry for not getting to this earlier. I've reduced macro_rules! perftools_inline {
($($item:tt)*) => (
$($item)*
);
}
mod state {
pub struct RawFloatState;
impl RawFloatState {
perftools_inline! {
pub(super) fn new() {}
}
}
} The Bisecting this pointed to be3fb0c which almost certainly means it was caused by #63400 (cc. @petrochenkov). This is an issue in rustc as well because if you try to use the extern crate stuff;
fn main() {
stuff::state::RawFloatState::new();
} rather than the expected backtrace
Another interesting case comes from removing the inner module: macro_rules! perftools_inline {
($($item:tt)*) => (
$($item)*
);
}
pub struct RawFloatState;
impl RawFloatState {
perftools_inline! {
pub(super) fn new() {}
}
} This didn't compile before be3fb0c but now does somehow. Also the regressions in |
I guess I'll take a look since it's been a week. Thanks @ollie27 for the minimal code case! |
Was this not fixed by #67106? |
I don't know. If so then we're all good? |
No, I can confirm there's still an ICE. |
Is the nonrustdoc example from #64705 (comment) still ICEing or is it just the rustdoc issue left? |
I'll see what happens. |
Fixed in #67236. |
I tried this code: Running
cargo doc
on a project that haslexical-core 0.6.2
as its direct or indirect dependency.I expected to see this happen: All packages documented.
Instead, this happened:
error: internal compiler error: src/librustc/hir/def.rs:345: attempted .def_id() on invalid res: Err
— also fails ondocs.rs
.Meta
rustc --version --verbose
:Does also happen for older nightlies, though I forgot to capture the versions before updating in hope it'd fix the issue. There are more ICE issues pointing at
def.rs
, but none on this line here.Backtrace:
The text was updated successfully, but these errors were encountered: