mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Rollup merge of #77371 - camelid:remove-extra-space-in-diagnostic, r=varkor
Remove trailing space in error message - Add test for error message - Remove trailing space in error message
This commit is contained in:
commit
85e77edc82
6
src/test/ui/slice-to-vec-comparison.rs
Normal file
6
src/test/ui/slice-to-vec-comparison.rs
Normal file
@ -0,0 +1,6 @@
|
||||
fn main() {
|
||||
let a = &[];
|
||||
let b: &Vec<u8> = &vec![];
|
||||
a > b;
|
||||
//~^ ERROR mismatched types
|
||||
}
|
12
src/test/ui/slice-to-vec-comparison.stderr
Normal file
12
src/test/ui/slice-to-vec-comparison.stderr
Normal file
@ -0,0 +1,12 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/slice-to-vec-comparison.rs:4:9
|
||||
|
|
||||
LL | a > b;
|
||||
| ^ expected array of 0 elements, found struct `Vec`
|
||||
|
|
||||
= note: expected reference `&[_; 0]`
|
||||
found reference `&Vec<u8>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
Loading…
Reference in New Issue
Block a user