]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binop/shift-various-bad-types.stderr
Rollup merge of #95441 - AlecGoncharow:issue-95204-fix, r=Mark-Simulacrum
[rust.git] / src / test / ui / binop / shift-various-bad-types.stderr
1 error[E0277]: no implementation for `{integer} >> char`
2   --> $DIR/shift-various-bad-types.rs:9:8
3    |
4 LL |     22 >> p.char;
5    |        ^^ no implementation for `{integer} >> char`
6    |
7    = help: the trait `Shr<char>` is not implemented for `{integer}`
8    = help: the following other types implement trait `Shr<Rhs>`:
9              <&'a i128 as Shr<i128>>
10              <&'a i128 as Shr<i16>>
11              <&'a i128 as Shr<i32>>
12              <&'a i128 as Shr<i64>>
13              <&'a i128 as Shr<i8>>
14              <&'a i128 as Shr<isize>>
15              <&'a i128 as Shr<u128>>
16              <&'a i128 as Shr<u16>>
17            and 568 others
18
19 error[E0277]: no implementation for `{integer} >> &str`
20   --> $DIR/shift-various-bad-types.rs:12:8
21    |
22 LL |     22 >> p.str;
23    |        ^^ no implementation for `{integer} >> &str`
24    |
25    = help: the trait `Shr<&str>` is not implemented for `{integer}`
26    = help: the following other types implement trait `Shr<Rhs>`:
27              <&'a i128 as Shr<i128>>
28              <&'a i128 as Shr<i16>>
29              <&'a i128 as Shr<i32>>
30              <&'a i128 as Shr<i64>>
31              <&'a i128 as Shr<i8>>
32              <&'a i128 as Shr<isize>>
33              <&'a i128 as Shr<u128>>
34              <&'a i128 as Shr<u16>>
35            and 568 others
36
37 error[E0277]: no implementation for `{integer} >> &Panolpy`
38   --> $DIR/shift-various-bad-types.rs:15:8
39    |
40 LL |     22 >> p;
41    |        ^^ no implementation for `{integer} >> &Panolpy`
42    |
43    = help: the trait `Shr<&Panolpy>` is not implemented for `{integer}`
44    = help: the following other types implement trait `Shr<Rhs>`:
45              <&'a i128 as Shr<i128>>
46              <&'a i128 as Shr<i16>>
47              <&'a i128 as Shr<i32>>
48              <&'a i128 as Shr<i64>>
49              <&'a i128 as Shr<i8>>
50              <&'a i128 as Shr<isize>>
51              <&'a i128 as Shr<u128>>
52              <&'a i128 as Shr<u16>>
53            and 568 others
54
55 error[E0308]: mismatched types
56   --> $DIR/shift-various-bad-types.rs:25:18
57    |
58 LL |     let _: i32 = 22_i64 >> 1_i32;
59    |            ---   ^^^^^^^^^^^^^^^ expected `i32`, found `i64`
60    |            |
61    |            expected due to this
62    |
63 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
64    |
65 LL |     let _: i32 = (22_i64 >> 1_i32).try_into().unwrap();
66    |                  +               +++++++++++++++++++++
67
68 error: aborting due to 4 previous errors
69
70 Some errors have detailed explanations: E0277, E0308.
71 For more information about an error, try `rustc --explain E0277`.