]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/trivial-casts-featuring-type-ascription.stderr
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / trivial-casts-featuring-type-ascription.stderr
1 error: trivial numeric cast: `i32` as `i32`
2   --> $DIR/trivial-casts-featuring-type-ascription.rs:5:22
3    |
4 LL |     let lugubrious = 12i32 as i32;
5    |                      ^^^^^^^^^^^^
6    |
7    = help: cast can be replaced by coercion; this might require type ascription or a temporary variable
8 note: the lint level is defined here
9   --> $DIR/trivial-casts-featuring-type-ascription.rs:1:24
10    |
11 LL | #![deny(trivial_casts, trivial_numeric_casts)]
12    |                        ^^^^^^^^^^^^^^^^^^^^^
13
14 error: trivial cast: `&u32` as `*const u32`
15   --> $DIR/trivial-casts-featuring-type-ascription.rs:8:13
16    |
17 LL |     let _ = haunted as *const u32;
18    |             ^^^^^^^^^^^^^^^^^^^^^
19    |
20    = help: cast can be replaced by coercion; this might require type ascription or a temporary variable
21 note: the lint level is defined here
22   --> $DIR/trivial-casts-featuring-type-ascription.rs:1:9
23    |
24 LL | #![deny(trivial_casts, trivial_numeric_casts)]
25    |         ^^^^^^^^^^^^^
26
27 error: aborting due to 2 previous errors
28