Closed
Description
Spawned off from #47184. The following test case compiles, but it should not (playground):
#![allow(warnings)]
#![feature(nll)]
#![feature(type_ascription)]
fn main() {
let x = 22_u32;
let y: &u32 = &x: &'static u32;
}
The problem is that the "type ascription" expression is not preserving the full type that the user gave (&'static u32
).