]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/bad-type-in-vec-push.stderr
Rollup merge of #107194 - xfix:remove-slice-internals-dependency-in-rustc-ast, r...
[rust.git] / tests / ui / typeck / bad-type-in-vec-push.stderr
1 error[E0308]: mismatched types
2   --> $DIR/bad-type-in-vec-push.rs:11:17
3    |
4 LL |     vector.sort();
5    |     ------ here the type of `vector` is inferred to be `Vec<_>`
6 LL |     result.push(vector);
7    |            ---- ^^^^^^ expected integer, found struct `Vec`
8    |            |
9    |            arguments to this method are incorrect
10    |
11    = note: expected type `{integer}`
12             found struct `Vec<_>`
13 note: associated function defined here
14   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
15
16 error[E0308]: mismatched types
17   --> $DIR/bad-type-in-vec-push.rs:18:12
18    |
19 LL |     x.push("");
20    |       ---- ^^ expected integer, found `&str`
21    |       |
22    |       arguments to this method are incorrect
23    |
24 note: associated function defined here
25   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0308`.