forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0ac4ba0
commit 23ea42c
Showing
13 changed files
with
49 additions
and
94 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
src/test/ui/rfc-2632-const-trait-impl/const-trait-bound-opt-out/feature-gate.gated.stderr
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,8 +1,8 @@ | ||
error: `?const` on trait bounds is not yet implemented | ||
--> $DIR/feature-gate.rs:11:29 | ||
error: fatal error triggered by #[rustc_error] | ||
--> $DIR/feature-gate.rs:16:1 | ||
| | ||
LL | const fn get_assoc_const<S: ?const T>() -> i32 { <S as T>::CONST } | ||
| ^^^^^^^^ | ||
LL | fn main() {} | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
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
10 changes: 2 additions & 8 deletions
10
src/test/ui/rfc-2632-const-trait-impl/const-trait-bound-opt-out/feature-gate.stock.stderr
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,18 +1,12 @@ | ||
error[E0658]: `?const` on trait bounds is experimental | ||
--> $DIR/feature-gate.rs:11:29 | ||
--> $DIR/feature-gate.rs:12:29 | ||
| | ||
LL | const fn get_assoc_const<S: ?const T>() -> i32 { <S as T>::CONST } | ||
| ^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/67794 | ||
= help: add `#![feature(const_trait_bound_opt_out)]` to the crate attributes to enable | ||
|
||
error: `?const` on trait bounds is not yet implemented | ||
--> $DIR/feature-gate.rs:11:29 | ||
| | ||
LL | const fn get_assoc_const<S: ?const T>() -> i32 { <S as T>::CONST } | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
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
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
30 changes: 25 additions & 5 deletions
30
src/test/ui/rfc-2632-const-trait-impl/inherent-impl.stderr
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,10 +1,30 @@ | ||
error: `const` cannot modify an inherent impl | ||
--> $DIR/inherent-impl.rs:11:6 | ||
error: inherent impls cannot be `const` | ||
--> $DIR/inherent-impl.rs:9:1 | ||
| | ||
LL | impl const S {} | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: only trait implementations may be annotated with `const` | ||
|
||
error: inherent impls cannot be `const` | ||
--> $DIR/inherent-impl.rs:13:1 | ||
| | ||
LL | impl const T {} | ||
| ^^^^^ | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: only trait implementations may be annotated with `const` | ||
|
||
error: const trait impls are not yet implemented | ||
--> $DIR/inherent-impl.rs:9:1 | ||
| | ||
LL | impl const S {} | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: const trait impls are not yet implemented | ||
--> $DIR/inherent-impl.rs:13:1 | ||
| | ||
= help: only a trait impl can be `const` | ||
LL | impl const T {} | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 4 previous errors | ||
|