summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/suggest-variants.rs
blob: dd05d0f04abe3c0ffe2e1e6e2848592574c62c05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(Debug)]
enum Shape {
  Square { size: i32 },
  Circle { radius: i32 },
}

struct S {
  x: usize,
}

fn main() {
    println!("My shape is {:?}", Shape::Squareee { size: 5});  //~ ERROR no variant named `Squareee`
    println!("My shape is {:?}", Shape::Circl { size: 5}); //~ ERROR no variant named `Circl`
    println!("My shape is {:?}", Shape::Rombus{ size: 5}); //~ ERROR no variant named `Rombus`
    Shape::Squareee; //~ ERROR no variant
    Shape::Circl; //~ ERROR no variant
    Shape::Rombus; //~ ERROR no variant
}