-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
require const_impl_trait gate for all conditional and trait const calls
- Loading branch information
Showing
13 changed files
with
251 additions
and
390 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
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,28 +1,8 @@ | ||
error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:23:11 | ||
error: cannot call conditionally-const method `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:22:5 | ||
| | ||
LL | Const.func(); | ||
| ^^^^^^ | ||
| | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | ||
| | ||
LL + #![feature(const_trait_impl)] | ||
| | ||
|
||
error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:23:11 | ||
| | ||
LL | Const.func(); | ||
| ^^^^^^ | ||
| | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | ||
| | ||
LL + #![feature(const_trait_impl)] | ||
| | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0015`. |
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,53 +1,14 @@ | ||
error[E0015]: cannot call non-const fn `<cross_crate::NonConst as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:19:14 | ||
error: cannot call conditionally-const method `<cross_crate::NonConst as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:19:5 | ||
| | ||
LL | NonConst.func(); | ||
| ^^^^^^ | ||
| | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | ||
| | ||
LL + #![feature(const_trait_impl)] | ||
| | ||
|
||
error[E0015]: cannot call non-const fn `<cross_crate::NonConst as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:19:14 | ||
| | ||
LL | NonConst.func(); | ||
| ^^^^^^ | ||
| | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | ||
| | ||
LL + #![feature(const_trait_impl)] | ||
| | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:23:11 | ||
error: cannot call conditionally-const method `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:22:5 | ||
| | ||
LL | Const.func(); | ||
| ^^^^^^ | ||
| | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | ||
| | ||
LL + #![feature(const_trait_impl)] | ||
| | ||
|
||
error[E0015]: cannot call non-const fn `<cross_crate::Const as cross_crate::MyTrait>::func` in constant functions | ||
--> $DIR/cross-crate.rs:23:11 | ||
| | ||
LL | Const.func(); | ||
| ^^^^^^ | ||
| | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable | ||
| | ||
LL + #![feature(const_trait_impl)] | ||
| | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0015`. |
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
Oops, something went wrong.