2020-06-22 07:57:03 -05:00
|
|
|
error: item has unused generic parameters
|
2020-07-22 09:03:56 -05:00
|
|
|
--> $DIR/unsized_cast.rs:11:18
|
2020-06-22 07:57:03 -05:00
|
|
|
|
|
|
|
|
LL | fn foo<T: Default>() {
|
|
|
|
| - generic parameter `T` is unused
|
|
|
|
LL | let _: T = Default::default();
|
|
|
|
LL | (|| Box::new(|| {}) as Box<dyn Fn()>)();
|
2022-06-27 00:45:35 -05:00
|
|
|
| ^^
|
2020-06-22 07:57:03 -05:00
|
|
|
|
|
|
|
error: item has unused generic parameters
|
2022-06-27 00:45:35 -05:00
|
|
|
--> $DIR/unsized_cast.rs:11:6
|
2020-06-22 07:57:03 -05:00
|
|
|
|
|
|
|
|
LL | fn foo<T: Default>() {
|
|
|
|
| - generic parameter `T` is unused
|
|
|
|
LL | let _: T = Default::default();
|
|
|
|
LL | (|| Box::new(|| {}) as Box<dyn Fn()>)();
|
2022-06-27 00:45:35 -05:00
|
|
|
| ^^
|
2020-06-22 07:57:03 -05:00
|
|
|
|
|
|
|
error: item has unused generic parameters
|
2020-08-07 09:59:29 -05:00
|
|
|
--> $DIR/unsized_cast.rs:22:15
|
2020-06-22 07:57:03 -05:00
|
|
|
|
|
|
|
|
LL | fn foo2<T: Default>() {
|
|
|
|
| - generic parameter `T` is unused
|
|
|
|
...
|
|
|
|
LL | call(&|| {}, ());
|
2022-06-27 00:45:35 -05:00
|
|
|
| ^^
|
2020-06-22 07:57:03 -05:00
|
|
|
|
2020-08-07 09:59:29 -05:00
|
|
|
error: item has unused generic parameters
|
2022-06-27 00:45:35 -05:00
|
|
|
--> $DIR/unsized_cast.rs:19:6
|
2020-08-07 09:59:29 -05:00
|
|
|
|
|
2022-06-27 00:45:35 -05:00
|
|
|
LL | fn foo2<T: Default>() {
|
|
|
|
| - generic parameter `T` is unused
|
|
|
|
LL | let _: T = Default::default();
|
|
|
|
LL | (|| {
|
|
|
|
| ^^
|
2020-08-07 09:59:29 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2020-06-22 07:57:03 -05:00
|
|
|
|