Skip to content

Commit

Permalink
Respond to review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
hameerabbasi committed Sep 10, 2020
1 parent 5d7e7c2 commit 2815db1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 74 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
46 changes: 0 additions & 46 deletions src/test/ui/const-generics/issues/issue-62878.stderr

This file was deleted.

8 changes: 4 additions & 4 deletions src/test/ui/const-generics/issues/issue-72787.full.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ 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,
| ^^^^
|
= 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,
| ^^^^
|
= 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,
| ^^^^
|
= 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,
| ^^^^
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/const-generics/issues/issue-72787.min.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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`
|
= 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`
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/const-generics/issues/issue-72787.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2815db1

Please sign in to comment.