rust/tests/ui/builtin-type-shadow.stderr

23 lines
647 B
Plaintext
Raw Normal View History

2017-08-01 10:54:21 -05:00
error: This generic shadows the built-in type `u32`
2018-12-25 15:11:28 -06:00
--> $DIR/builtin-type-shadow.rs:13: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`
error[E0308]: mismatched types
2018-12-25 15:11:28 -06:00
--> $DIR/builtin-type-shadow.rs:14:5
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
| --- expected `u32` because of return type
2018-12-27 09:57:55 -06:00
LL | 42
2019-01-01 19:34:02 -06:00
| ^^ expected type parameter, found integer
2018-10-06 11:18:06 -05:00
|
= note: expected type `u32`
found type `{integer}`
2018-01-16 10:06:27 -06:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.