rust/tests/ui/type/type-shadow.rs

9 lines
156 B
Rust

fn main() {
type X = isize;
type Y = X;
if true {
type X = &'static str;
let y: Y = "hello"; //~ ERROR mismatched types
}
}