Closed
Description
Current bug report
I would not expect this program to compile:
trait A {}
impl<T: 'static> A for T {}
fn main() {
let a = 3;
let b = &a;
let c = &b as &A;
}
Original Bug Report
fn main() {
let x = 42;
let ref_x = &x;
let any_x : &Any = &ref_x as &Any;
println!("{:?}", any_x);
}
Results in
error: internal compiler error: non-static region found when hashing a type
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
task 'rustc' failed at 'explicit failure', /Users/mitsuhiko/Development/rust/src/libsyntax/diagnostic.rs:102
task '<main>' failed at 'explicit failure', /Users/mitsuhiko/Development/rust/src/librustc/lib.rs:396