-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: StableHasher
: unexpected region '_#0r
#95311
Labels
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
boulanlo
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Mar 25, 2022
boulanlo
changed the title
ICE:
ICE: Mar 25, 2022
StableHasher
: unexpected region _#0r
StableHasher
: unexpected region '_#0r
I get the same error on code that I got minimized to: #![feature(ptr_metadata)]
use core::marker::PhantomData;
use core::ops::Deref;
use core::ptr::{DynMetadata, Pointee};
struct Foo<T> {
bar: PhantomData<T>,
}
impl<T> Deref for Foo<T>
where
T: Pointee<Metadata = DynMetadata<T>> + 'static,
{
type Target = T;
fn deref(&self) -> &Self::Target {
self.some_method()
}
} |
Same error with this example: #![feature(ptr_metadata)]
use std::ptr::Pointee;
unsafe fn ice<T: ?Sized + 'static>(ptr: *const T) -> <T as Pointee>::Metadata {
std::ptr::metadata(ptr)
} |
Same error I got with this example #![feature(ptr_metadata)]
fn bar<U: 'static + ?Sized>() -> <U as core::ptr::Pointee>::Metadata {panic!()} Defining it in a trait is fine though #![feature(ptr_metadata)]
trait Foo {
fn bar<U: 'static + ?Sized>() -> <U as core::ptr::Pointee>::Metadata;
} But adding a function body results in a crash #![feature(ptr_metadata)]
trait Foo {
fn bar<U: 'static + ?Sized>() -> <U as core::ptr::Pointee>::Metadata { panic!() }
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I recently updated my nightly toolchain and our project (still not open-sourced) ICE'd. I managed to reduce the problem to a minimal working example:
Code
Meta
rustc --version --verbose
:Error output
Backtrace
I ran a quick
cargo-bisect
:searched nightlies: from nightly-2022-03-01 to nightly-2022-03-24
regressed nightly: nightly-2022-03-16
searched commits: from 285fa7e to 52b3455
regressed commit: 2184c7c
bisected with cargo-bisect-rustc v0.6.0
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
The offending line is the
std::ptr::metadata()
, so we should probably tag this with the appropriate feature tag.(Sorry if I messed anything up, I'm completely new to Rust ICE bug reports!)
The text was updated successfully, but these errors were encountered: