2020-06-22 13:57:03 +01:00
|
|
|
error: item has unused generic parameters
|
2020-07-22 15:03:56 +01:00
|
|
|
--> $DIR/lifetimes.rs:10:8
|
2020-06-22 13:57:03 +01:00
|
|
|
|
|
|
|
|
LL | pub fn unused<'a, T>(_: &'a u32) {
|
|
|
|
| ^^^^^^ - generic parameter `T` is unused
|
|
|
|
|
|
|
|
error: item has unused generic parameters
|
2020-07-22 15:03:56 +01:00
|
|
|
--> $DIR/lifetimes.rs:17:19
|
2020-06-22 13:57:03 +01:00
|
|
|
|
|
|
|
|
LL | pub fn used<'a, T: Default>(_: &'a u32) -> u32 {
|
|
|
|
| - generic parameter `T` is unused
|
|
|
|
LL | let _: T = Default::default();
|
|
|
|
LL | let add_one = |x: u32| x + 1;
|
2022-06-27 07:45:35 +02:00
|
|
|
| ^^^^^^^^
|
2020-06-22 13:57:03 +01:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|