]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/count2len.stderr
Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomez
[rust.git] / tests / ui / suggestions / count2len.stderr
1 error[E0599]: no method named `count` found for array `[{integer}; 4]` in the current scope
2   --> $DIR/count2len.rs:5:11
3    |
4 LL |     slice.count();
5    |           ^^^^^
6    |           |
7    |           method cannot be called on `[{integer}; 4]` due to unsatisfied trait bounds
8    |           help: consider using `len` instead
9    |
10    = note: `count` is defined on `Iterator`, which `[{integer}; 4]` does not implement
11
12 error[E0599]: no method named `count` found for struct `Vec<{integer}>` in the current scope
13   --> $DIR/count2len.rs:6:9
14    |
15 LL |     vec.count();
16    |         ^^^^^
17    |         |
18    |         method cannot be called on `Vec<{integer}>` due to unsatisfied trait bounds
19    |         help: consider using `len` instead
20    |
21    = note: `count` is defined on `Iterator`, which `Vec<{integer}>` does not implement
22
23 error[E0599]: no method named `count` found for reference `&[{integer}]` in the current scope
24   --> $DIR/count2len.rs:7:20
25    |
26 LL |     vec.as_slice().count();
27    |                    ^^^^^
28    |                    |
29    |                    method cannot be called on `&[{integer}]` due to unsatisfied trait bounds
30    |                    help: consider using `len` instead
31    |
32    = note: `count` is defined on `Iterator`, which `&[{integer}]` does not implement
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0599`.