-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: when non-static &str argument is encountered by TypeId #19791
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
Backtrace:
|
Well, this is interesting. It's broken all the way back to 0.10. I think it's been a bug in the type id implementation since it first landed. Here's a smaller test case: use std::intrinsics::TypeId;
fn main() {
TypeId::of::<fn<'a>(&'a int)>();
} |
@alexcrichton, is there a particular reason |
Ended up catching me on IRC |
It seems we actually want to take late-bound regions into account when hashing. For example, the following should hold: TypeId::of::<fn(&'static int)>() != TypeId::of::<for<'a> fn(&'a int)>() |
Normalize late-bound regions in bare functions, stack closures, and traits and include them in the generated hash. Closes rust-lang#19791
Normalize late-bound regions in bare functions, stack closures, and traits and include them in the generated hash. Closes #19791 r? @nikomatsakis (does my normalization make sense?) cc @alexcrichton
Normalize late-bound regions in bare functions, stack closures, and traits and include them in the generated hash. Closes rust-lang#19791 r? @nikomatsakis (does my normalization make sense?) cc @alexcrichton
The text was updated successfully, but these errors were encountered: