forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ParamEnv
should be const when ImplItem
is within a const impl.
- Loading branch information
Showing
4 changed files
with
58 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
error[E0277]: cannot add `NonConstAdd` to `NonConstAdd` | ||
--> $DIR/assoc-type.rs:18:5 | ||
| | ||
LL | type Bar = NonConstAdd; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `NonConstAdd + NonConstAdd` | ||
| | ||
= help: the trait `Add` is not implemented for `NonConstAdd` | ||
note: required by a bound in `Foo::Bar` | ||
--> $DIR/assoc-type.rs:14:15 | ||
| | ||
LL | type Bar: ~const std::ops::Add; | ||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::Bar` | ||
help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | ||
| | ||
LL | impl const Foo for NonConstAdd where NonConstAdd: Add { | ||
| ++++++++++++++++++++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |