mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Respond to review comments.
This commit is contained in:
parent
5d7e7c25e4
commit
2815db1844
@ -1,10 +0,0 @@
|
||||
warning: unused variable: `foo`
|
||||
--> $DIR/issue-62187-encountered-polymorphic-const.rs:17:9
|
||||
|
|
||||
LL | let foo = <[u8; 2]>::BIT_LEN;
|
||||
| ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
|
||||
|
|
||||
= note: `#[warn(unused_variables)]` on by default
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -1,10 +0,0 @@
|
||||
warning: unused variable: `foo`
|
||||
--> $DIR/issue-62187-encountered-polymorphic-const.rs:17:9
|
||||
|
|
||||
LL | let foo = <[u8; 2]>::BIT_LEN;
|
||||
| ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
|
||||
|
|
||||
= note: `#[warn(unused_variables)]` on by default
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -14,5 +14,5 @@ impl<const L: usize> BitLen for [u8; L] {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let foo = <[u8; 2]>::BIT_LEN; //~ WARN unused variable
|
||||
let _foo = <[u8; 2]>::BIT_LEN;
|
||||
}
|
||||
|
@ -1,46 +0,0 @@
|
||||
error[E0770]: the type of const parameters must not depend on other generic parameters
|
||||
--> $DIR/issue-62878.rs:5:38
|
||||
|
|
||||
LL | fn foo<const N: usize, const A: [u8; N]>() {}
|
||||
| ^ the type must not depend on the parameter `N`
|
||||
|
||||
error[E0658]: const generics are unstable
|
||||
--> $DIR/issue-62878.rs:5:14
|
||||
|
|
||||
LL | fn foo<const N: usize, const A: [u8; N]>() {}
|
||||
| ^
|
||||
|
|
||||
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
|
||||
= help: add `#![feature(min_const_generics)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: const generics are unstable
|
||||
--> $DIR/issue-62878.rs:5:30
|
||||
|
|
||||
LL | fn foo<const N: usize, const A: [u8; N]>() {}
|
||||
| ^
|
||||
|
|
||||
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
|
||||
= help: add `#![feature(min_const_generics)]` to the crate attributes to enable
|
||||
|
||||
error[E0107]: wrong number of const arguments: expected 2, found 1
|
||||
--> $DIR/issue-62878.rs:11:5
|
||||
|
|
||||
LL | foo::<_, {[1]}>();
|
||||
| ^^^^^^^^^^^^^^^ expected 2 const arguments
|
||||
|
||||
error[E0107]: wrong number of type arguments: expected 0, found 1
|
||||
--> $DIR/issue-62878.rs:11:11
|
||||
|
|
||||
LL | foo::<_, {[1]}>();
|
||||
| ^ unexpected type argument
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-62878.rs:11:15
|
||||
|
|
||||
LL | foo::<_, {[1]}>();
|
||||
| ^^^ expected `usize`, found array `[{integer}; 1]`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0107, E0308, E0658, E0770.
|
||||
For more information about an error, try `rustc --explain E0107`.
|
@ -7,7 +7,7 @@ LL | Condition<{ LHS <= RHS }>: True
|
||||
= note: this may fail depending on what value the parameter takes
|
||||
|
||||
error: constant expression depends on a generic parameter
|
||||
--> $DIR/issue-72787.rs:27:42
|
||||
--> $DIR/issue-72787.rs:26:42
|
||||
|
|
||||
LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
| ^^^^
|
||||
@ -15,7 +15,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
= note: this may fail depending on what value the parameter takes
|
||||
|
||||
error: constant expression depends on a generic parameter
|
||||
--> $DIR/issue-72787.rs:27:42
|
||||
--> $DIR/issue-72787.rs:26:42
|
||||
|
|
||||
LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
| ^^^^
|
||||
@ -23,7 +23,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
= note: this may fail depending on what value the parameter takes
|
||||
|
||||
error: constant expression depends on a generic parameter
|
||||
--> $DIR/issue-72787.rs:27:42
|
||||
--> $DIR/issue-72787.rs:26:42
|
||||
|
|
||||
LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
| ^^^^
|
||||
@ -31,7 +31,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
= note: this may fail depending on what value the parameter takes
|
||||
|
||||
error: constant expression depends on a generic parameter
|
||||
--> $DIR/issue-72787.rs:27:42
|
||||
--> $DIR/issue-72787.rs:26:42
|
||||
|
|
||||
LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
| ^^^^
|
||||
|
@ -15,7 +15,7 @@ LL | Condition<{ LHS <= RHS }>: True
|
||||
= help: it is currently only allowed to use either `RHS` or `{ RHS }` as generic constants
|
||||
|
||||
error: generic parameters must not be used inside of non trivial constant values
|
||||
--> $DIR/issue-72787.rs:27:25
|
||||
--> $DIR/issue-72787.rs:26:25
|
||||
|
|
||||
LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
| ^ non-trivial anonymous constants must not depend on the parameter `I`
|
||||
@ -23,7 +23,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
= help: it is currently only allowed to use either `I` or `{ I }` as generic constants
|
||||
|
||||
error: generic parameters must not be used inside of non trivial constant values
|
||||
--> $DIR/issue-72787.rs:27:36
|
||||
--> $DIR/issue-72787.rs:26:36
|
||||
|
|
||||
LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
| ^ non-trivial anonymous constants must not depend on the parameter `J`
|
||||
|
@ -22,7 +22,6 @@ where
|
||||
IsLessOrEqual<I, 8>: True,
|
||||
//[min]~^ Error type annotations needed [E0283]
|
||||
//[min]~| Error type annotations needed [E0283]
|
||||
// Condition<{ 8 - I <= 8 - J }>: True,
|
||||
IsLessOrEqual<J, 8>: True,
|
||||
IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
|
||||
//[full]~^ constant expression depends on a generic parameter
|
||||
|
Loading…
Reference in New Issue
Block a user