diff options
| author | Ralf Jung <post@ralfj.de> | 2023-01-13 11:46:54 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-01-13 11:46:54 +0100 |
| commit | 9475277c235d2297dc446155325b0b3fcfdbf722 (patch) | |
| tree | bf243b402462c46038a1692d4ab52a7148b75d52 /tests/ui/array-slice-vec/array-not-vector.stderr | |
| parent | 9742679ebed966c62bf457df8353b9a5c6c22d29 (diff) | |
| parent | 7d59c0ccaa3aeb528a66ae3d2fec6a5ebbe44bc2 (diff) | |
| download | rust-9475277c235d2297dc446155325b0b3fcfdbf722.tar.gz rust-9475277c235d2297dc446155325b0b3fcfdbf722.zip | |
Merge from rustc
Diffstat (limited to 'tests/ui/array-slice-vec/array-not-vector.stderr')
| -rw-r--r-- | tests/ui/array-slice-vec/array-not-vector.stderr | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/array-not-vector.stderr b/tests/ui/array-slice-vec/array-not-vector.stderr new file mode 100644 index 00000000000..0e187d9072a --- /dev/null +++ b/tests/ui/array-slice-vec/array-not-vector.stderr @@ -0,0 +1,22 @@ +error[E0308]: mismatched types + --> $DIR/array-not-vector.rs:2:19 + | +LL | let _x: i32 = [1, 2, 3]; + | --- ^^^^^^^^^ expected `i32`, found array `[{integer}; 3]` + | | + | expected due to this + +error[E0308]: mismatched types + --> $DIR/array-not-vector.rs:7:20 + | +LL | let _y: &i32 = x; + | ---- ^ expected `i32`, found slice `[i32]` + | | + | expected due to this + | + = note: expected reference `&i32` + found reference `&[i32]` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. |
