diff options
| author | threadexception <hannes.gaumann@outlook.de> | 2021-11-28 10:20:53 +0100 |
|---|---|---|
| committer | threadexception <hannes.gaumann@outlook.de> | 2021-12-06 17:59:37 +0100 |
| commit | a0fb992433872f2c55c538cdaf7222364a921adb (patch) | |
| tree | 77b17840e515b438d0d2b92d26d35549b9058cb0 /src/test | |
| parent | 84826fec957aa17b0e068775c1c5574f707d43b0 (diff) | |
| download | rust-a0fb992433872f2c55c538cdaf7222364a921adb.tar.gz rust-a0fb992433872f2c55c538cdaf7222364a921adb.zip | |
Fix AnonConst ICE
Add test Apply suggestions Switch to match Apply cargofmt
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/typeck/issue-91267.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/typeck/issue-91267.stderr | 27 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/test/ui/typeck/issue-91267.rs b/src/test/ui/typeck/issue-91267.rs new file mode 100644 index 00000000000..f5a37e9cb86 --- /dev/null +++ b/src/test/ui/typeck/issue-91267.rs @@ -0,0 +1,6 @@ +fn main() { + 0: u8<e<5>=e> + //~^ ERROR: cannot find type `e` in this scope [E0412] + //~| ERROR: associated type bindings are not allowed here [E0229] + //~| ERROR: mismatched types [E0308] +} diff --git a/src/test/ui/typeck/issue-91267.stderr b/src/test/ui/typeck/issue-91267.stderr new file mode 100644 index 00000000000..aac00b9b6a9 --- /dev/null +++ b/src/test/ui/typeck/issue-91267.stderr @@ -0,0 +1,27 @@ +error[E0412]: cannot find type `e` in this scope + --> $DIR/issue-91267.rs:2:16 + | +LL | 0: u8<e<5>=e> + | ^ + | | + | not found in this scope + | help: maybe you meant to write an assignment here: `let e` + +error[E0229]: associated type bindings are not allowed here + --> $DIR/issue-91267.rs:2:11 + | +LL | 0: u8<e<5>=e> + | ^^^^^^ associated type not allowed here + +error[E0308]: mismatched types + --> $DIR/issue-91267.rs:2:5 + | +LL | fn main() { + | - expected `()` because of default return type +LL | 0: u8<e<5>=e> + | ^^^^^^^^^^^^^ expected `()`, found `u8` + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0229, E0308, E0412. +For more information about an error, try `rustc --explain E0229`. |
