]> git.lizzy.rs Git - rust.git/blob - tests/ui/range/issue-73553-misinterp-range-literal.stderr
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / range / issue-73553-misinterp-range-literal.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-73553-misinterp-range-literal.rs:12:10
3    |
4 LL |     demo(tell(1)..tell(10));
5    |     ---- ^^^^^^^^^^^^^^^^^
6    |     |    |
7    |     |    expected `&Range<usize>`, found struct `Range`
8    |     |    help: consider borrowing here: `&(tell(1)..tell(10))`
9    |     arguments to this function are incorrect
10    |
11    = note: expected reference `&std::ops::Range<usize>`
12                  found struct `std::ops::Range<usize>`
13 note: function defined here
14   --> $DIR/issue-73553-misinterp-range-literal.rs:3:4
15    |
16 LL | fn demo(r: &Range) {
17    |    ^^^^ ---------
18
19 error[E0308]: mismatched types
20   --> $DIR/issue-73553-misinterp-range-literal.rs:14:10
21    |
22 LL |     demo(1..10);
23    |     ---- ^^^^^
24    |     |    |
25    |     |    expected `&Range<usize>`, found struct `Range`
26    |     |    help: consider borrowing here: `&(1..10)`
27    |     arguments to this function are incorrect
28    |
29    = note: expected reference `&std::ops::Range<usize>`
30                  found struct `std::ops::Range<{integer}>`
31 note: function defined here
32   --> $DIR/issue-73553-misinterp-range-literal.rs:3:4
33    |
34 LL | fn demo(r: &Range) {
35    |    ^^^^ ---------
36
37 error: aborting due to 2 previous errors
38
39 For more information about this error, try `rustc --explain E0308`.