-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Compiler crashes when trying to use std::ops::Sized #37534
Comments
Also occures on nightly
|
Technically, this is a regression from 1.7 to 1.8. |
Works for any trait name, see https://is.gd/15w6hz:
|
This is due to error recovery, i.e. the compiler not stopping on errors (name resolution in this case). |
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Fix ICE when querying DefId on Def::Err. Also moves computations into check that `kind_id` is `Ok(_)`, which is in theory an optimization, though I expect it's minor. Fixes rust-lang#37534. r? @eddyb.
Minimal example
I tried to build a struct for a generic type T which does not have to be sized.
Accidentally, I
use
dstd::ops::Sized
instead ofstd::marker::Sized
so the compilercrashed.
Just doing
use std::ops::Sized;
without actually using it in the code does not crash the compiler.Build platform
Operating system:
rustc --version --verbose:
Compiler output
Output:
Backtrace:
The text was updated successfully, but these errors were encountered: