-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f06ce2
commit 19801b1
Showing
4 changed files
with
28 additions
and
6 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 |
---|---|---|
@@ -1,12 +1,24 @@ | ||
error[E0723]: trait methods cannot be stable const fn | ||
--> $DIR/stability.rs:14:5 | ||
| | ||
LL | / fn sub(self, rhs: Self) -> Self { | ||
LL | | | ||
LL | | Int(self.0 - rhs.0) | ||
LL | | } | ||
| |_____^ | ||
| | ||
= note: see issue #57563 </~https://github.com/rust-lang/rust/issues/57563> for more information | ||
= help: add `#![feature(const_fn)]` to the crate attributes to enable | ||
|
||
error[E0723]: can only call other `const fn` within a `const fn`, but `const <Int as std::ops::Add>::add` is not stable as `const fn` | ||
--> $DIR/stability.rs:21:5 | ||
--> $DIR/stability.rs:32:5 | ||
| | ||
LL | Int(1i32) + Int(2i32) | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: for more information, see issue /~https://github.com/rust-lang/rust/issues/57563 | ||
= note: see issue #57563 </~https://github.com/rust-lang/rust/issues/57563> for more information | ||
= help: add `#![feature(const_fn)]` to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0723`. |