Add test for bad cast with deferred projection equality

This commit is contained in:
Michael Goulet 2023-02-20 21:02:04 +00:00
parent 8973049549
commit eb1f9babec
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,6 @@
// compile-flags: -Ztrait-solver=next
// known-bug: unknown
fn main() {
(0u8 + 0u8) as char;
}

View File

@ -0,0 +1,9 @@
error[E0271]: type mismatch resolving `char == <u8 as Add>::Output`
--> $DIR/cast-checks-handling-projections.rs:5:5
|
LL | (0u8 + 0u8) as char;
| ^^^^^^^^^^^ types differ
error: aborting due to previous error
For more information about this error, try `rustc --explain E0271`.