rust/src/test/ui/polymorphization/const_parameters/closures.stderr

45 lines
1.4 KiB
Plaintext
Raw Normal View History

warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/closures.rs:2:12
|
LL | #![feature(const_generics, rustc_attrs)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: item has unused generic parameters
--> $DIR/closures.rs:18:19
|
LL | pub fn unused<const T: usize>() -> usize {
| - generic parameter `T` is unused
LL |
LL | let add_one = |x: usize| x + 1;
| ^^^^^^^^^^^^^^^^
error: item has unused generic parameters
--> $DIR/closures.rs:16:8
|
LL | pub fn unused<const T: usize>() -> usize {
| ^^^^^^ - generic parameter `T` is unused
error: item has unused generic parameters
--> $DIR/closures.rs:27:19
|
LL | pub fn used_parent<const T: usize>() -> usize {
| - generic parameter `T` is unused
LL | let x: usize = T;
LL | let add_one = |x: usize| x + 1;
| ^^^^^^^^^^^^^^^^
error: item has unused generic parameters
--> $DIR/closures.rs:47:13
|
LL | pub fn unused_upvar<const T: usize>() -> usize {
| - generic parameter `T` is unused
LL | let x: usize = T;
LL | let y = || x;
| ^^^^
error: aborting due to 4 previous errors; 1 warning emitted