aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/type-shadow.rs
blob: 8f8aff9a623c5b6c284a653e9ad6e5c5dfe1ea31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// -*- rust -*-

// error-pattern: mismatched types

fn main() {
  type X = int;
  type Y = X;
  if (true) {
    type X = str;
    let Y y = "hello";
  }
}