2020-08-11 08:43:21 -05:00
|
|
|
error: this generic shadows the built-in type `u32`
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/builtin-type-shadow.rs:4:8
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn foo<u32>(a: u32) -> u32 {
|
2018-10-06 11:18:06 -05:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::builtin-type-shadow` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/builtin-type-shadow.rs:5:5
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn foo<u32>(a: u32) -> u32 {
|
2019-11-06 00:24:47 -06:00
|
|
|
| --- --- expected `u32` because of return type
|
|
|
|
| |
|
|
|
|
| this type parameter
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 42
|
2019-11-06 00:24:47 -06:00
|
|
|
| ^^ expected type parameter `u32`, found integer
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2019-11-22 06:46:20 -06:00
|
|
|
= note: expected type parameter `u32`
|
|
|
|
found type `{integer}`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-01-16 10:06:27 -06:00
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-15 04:25:57 -05:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|