diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2020-04-02 20:31:51 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2020-04-02 20:31:51 +0100 |
| commit | a12ebd3027e9c2b63f3d94c122c9d95d2d3ac739 (patch) | |
| tree | c37528ac93a72847dfaa77d07a02218301f9907f /src/test | |
| parent | 235938d1acdd93d6641a741c81f64e415b786751 (diff) | |
| download | rust-a12ebd3027e9c2b63f3d94c122c9d95d2d3ac739.tar.gz rust-a12ebd3027e9c2b63f3d94c122c9d95d2d3ac739.zip | |
unerase regions in `infer_placeholder_type`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/suggestions/const-no-type.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/suggestions/const-no-type.stderr | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/test/ui/suggestions/const-no-type.rs b/src/test/ui/suggestions/const-no-type.rs index 6b79697e983..b931a04c286 100644 --- a/src/test/ui/suggestions/const-no-type.rs +++ b/src/test/ui/suggestions/const-no-type.rs @@ -35,6 +35,11 @@ const C = 42; //~| HELP provide a type for the item //~| SUGGESTION C: i32 +const D = &&42; +//~^ ERROR missing type for `const` item +//~| HELP provide a type for the item +//~| SUGGESTION D: &&i32 + static S = Vec::<String>::new(); //~^ ERROR missing type for `static` item //~| HELP provide a type for the item diff --git a/src/test/ui/suggestions/const-no-type.stderr b/src/test/ui/suggestions/const-no-type.stderr index a7b5aa5e5b1..874c1bac10b 100644 --- a/src/test/ui/suggestions/const-no-type.stderr +++ b/src/test/ui/suggestions/const-no-type.stderr @@ -4,14 +4,20 @@ error: missing type for `const` item LL | const C = 42; | ^ help: provide a type for the item: `C: i32` +error: missing type for `const` item + --> $DIR/const-no-type.rs:38:7 + | +LL | const D = &&42; + | ^ help: provide a type for the item: `D: &&i32` + error: missing type for `static` item - --> $DIR/const-no-type.rs:38:8 + --> $DIR/const-no-type.rs:43:8 | LL | static S = Vec::<String>::new(); | ^ help: provide a type for the item: `S: std::vec::Vec<std::string::String>` error: missing type for `static mut` item - --> $DIR/const-no-type.rs:43:12 + --> $DIR/const-no-type.rs:48:12 | LL | static mut SM = "abc"; | ^^ help: provide a type for the item: `SM: &str` @@ -34,5 +40,5 @@ error: missing type for `static mut` item LL | static mut SM2 = "abc"; | ^^^ help: provide a type for the item: `SM2: <type>` -error: aborting due to 6 previous errors +error: aborting due to 7 previous errors |
