mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
39 lines
1007 B
Plaintext
39 lines
1007 B
Plaintext
error: item has unused generic parameters
|
|
--> $DIR/unsized_cast.rs:11:18
|
|
|
|
|
LL | fn foo<T: Default>() {
|
|
| - generic parameter `T` is unused
|
|
LL | let _: T = Default::default();
|
|
LL | (|| Box::new(|| {}) as Box<dyn Fn()>)();
|
|
| ^^
|
|
|
|
error: item has unused generic parameters
|
|
--> $DIR/unsized_cast.rs:11:6
|
|
|
|
|
LL | fn foo<T: Default>() {
|
|
| - generic parameter `T` is unused
|
|
LL | let _: T = Default::default();
|
|
LL | (|| Box::new(|| {}) as Box<dyn Fn()>)();
|
|
| ^^
|
|
|
|
error: item has unused generic parameters
|
|
--> $DIR/unsized_cast.rs:22:15
|
|
|
|
|
LL | fn foo2<T: Default>() {
|
|
| - generic parameter `T` is unused
|
|
...
|
|
LL | call(&|| {}, ());
|
|
| ^^
|
|
|
|
error: item has unused generic parameters
|
|
--> $DIR/unsized_cast.rs:19:6
|
|
|
|
|
LL | fn foo2<T: Default>() {
|
|
| - generic parameter `T` is unused
|
|
LL | let _: T = Default::default();
|
|
LL | (|| {
|
|
| ^^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|