-
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
ICE: DefId does not have a "def_span"
#110206
Comments
This is caused by #109765. The fix is to either
|
I can't reproduce this either locally or in playground. https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=a9fda7c34a1fc58aa9f611970de9feed |
Weird, I can still repro locally with |
mcve from a different file: use std::simd::Mask;
fn main() {
Mask::<Mask>::std();
} |
This is also weird for me to reproduce: I must be doing something wrong, both my
😅 |
Yeah, something is very weird. I didn't manage to properly |
Same for me, |
I forgot to mention: this does also reproduce on master and reverting #109765 seems to fix the ICE indeed, as vadim suggested above. |
I'm going to remove has-mcve since we're not sure why it sometimes doesn't ICE. |
I think this is the better solution. Otherwise, we'll have more and more special cases in diagnostic code which is already very complex. |
Couple more reproducers: mod BikeshedIntrinsicFrom {
use std::mem::BikeshedIntrinsicFrom;
pub fn is_transmutable<Src, Dst>()
where
Dst: BikeshedIntrinsicFrom<Src, Context, false, false, false, true>
{}
} mod assert {
use std::mem::BikeshedIntrinsicuse std::{fmt, ops, str::FromStr};
impl fmt::Display for Edition {
fn fmt(&self, f: &mut fmt::Formatter(_crate_id, data)) -> fmt::Result {}
}
From;
pub fn is_transmutable<Src, Dst, Context>()
where
Dst: BikeshedIntrinsicFrom<Src, Context, true, true, true, true>
{}
} #![no_std]
use core::ffi::VaList;
pub fn ffi<'a>(_: usize, mut ap1: ...) -> VaList<'a> {
ap
} use std::{fmt, ops, str::FromStr};
impl fmt::Display for Edition {
fn fmt(&self, f: &mut fmt::Formatter(_crate_id, data)) -> fmt::Result {}
} |
…ram, r=petrochenkov Encode def span for `ConstParam` Fixes rust-lang#110206 r? `@petrochenkov`
Fixes build failures. Toolchain is updated, but we can't upgrade to latest nightly because it fails with an ICE, possibly rust-lang/rust#110206 thread 'rustc' panicked at 'DefId(35:311 ~ embedded_io[99f8]::asynch::Write::write::{opaque#0}) does not have a "def_span"', compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs:205:1
Code
Not sure how this passes the test suite 🙃
Original code from
./tests/ui/transmutability/issue-101739-2.rs
reduced
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: