]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/fn-to-method.stderr
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / suggestions / fn-to-method.stderr
1 error[E0425]: cannot find function `cmp` in this scope
2   --> $DIR/fn-to-method.rs:8:13
3    |
4 LL |     let x = cmp(&1, &2);
5    |             ^^^ not found in this scope
6    |
7 help: use the `.` operator to call the method `Ord::cmp` on `&{integer}`
8    |
9 LL |     let x = (&1).cmp(&2);
10    |             ~  ~~~~~~~~~
11
12 error[E0425]: cannot find function `len` in this scope
13   --> $DIR/fn-to-method.rs:12:13
14    |
15 LL |     let y = len([1, 2, 3]);
16    |             ^^^ not found in this scope
17    |
18 help: use the `.` operator to call the method `len` on `&[{integer}]`
19    |
20 LL -     let y = len([1, 2, 3]);
21 LL +     let y = [1, 2, 3].len();
22    |
23
24 error[E0425]: cannot find function `bar` in this scope
25   --> $DIR/fn-to-method.rs:16:13
26    |
27 LL |     let z = bar(Foo);
28    |             ^^^ not found in this scope
29    |
30 help: use the `.` operator to call the method `bar` on `Foo`
31    |
32 LL -     let z = bar(Foo);
33 LL +     let z = Foo.bar();
34    |
35
36 error: aborting due to 3 previous errors
37
38 For more information about this error, try `rustc --explain E0425`.