diff options
| author | Gurinder Singh <frederick.the.fool@gmail.com> | 2024-04-16 12:42:48 +0530 |
|---|---|---|
| committer | Gurinder Singh <frederick.the.fool@gmail.com> | 2024-04-16 12:42:48 +0530 |
| commit | c30e15adedba70d99a09146707814d14a93364a1 (patch) | |
| tree | 6ad224abdf6cf731f878487a9a909674d4fef4dd /tests/ui/const_prop | |
| parent | 63f70b3d104e20289a1a0df82747066c3d85b9a1 (diff) | |
| download | rust-c30e15adedba70d99a09146707814d14a93364a1.tar.gz rust-c30e15adedba70d99a09146707814d14a93364a1.zip | |
Fail candidate assembly for erroneous types
Trait predicates for types which have errors may still evaluate to OK leading to downstream ICEs. Now we return a selection error for such types in candidate assembly and thereby prevent such issues
Diffstat (limited to 'tests/ui/const_prop')
| -rw-r--r-- | tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs | 1 | ||||
| -rw-r--r-- | tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr | 8 |
2 files changed, 1 insertions, 8 deletions
diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs index dc9782295c1..a41a159c1fd 100644 --- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs +++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs @@ -13,7 +13,6 @@ impl Opcode2 { pub fn example2(msg_type: Opcode2) -> impl FnMut(&[u8]) { move |i| match msg_type { Opcode2::OP2 => unimplemented!(), - //~^ ERROR could not evaluate constant pattern } } diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr index 9442eac0cf5..d95a8861230 100644 --- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr +++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr @@ -17,13 +17,7 @@ help: you might be missing a type parameter LL | pub struct Opcode2<S>(&'a S); | +++ -error: could not evaluate constant pattern - --> $DIR/ice-type-mismatch-when-copying-112824.rs:15:9 - | -LL | Opcode2::OP2 => unimplemented!(), - | ^^^^^^^^^^^^ - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors Some errors have detailed explanations: E0261, E0412. For more information about an error, try `rustc --explain E0261`. |
