-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Showing
8 changed files
with
44 additions
and
22 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
2 changes: 1 addition & 1 deletion
2
tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.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
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
3 changes: 2 additions & 1 deletion
3
tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.rs
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
27 changes: 23 additions & 4 deletions
27
tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-use.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,9 +1,28 @@ | ||
error[E0635]: unknown feature `const_default_impls` | ||
--> $DIR/derive-const-use.rs:3:5 | ||
--> $DIR/derive-const-use.rs:3:41 | ||
| | ||
LL | const_default_impls, derive_const)] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
LL | #![feature(const_trait_impl, const_cmp, const_default_impls, derive_const, effects)] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
error: const `impl` for trait `Default` which is not marked with `#[const_trait]` | ||
--> $DIR/derive-const-use.rs:7:12 | ||
| | ||
LL | impl const Default for A { | ||
| ^^^^^^^ | ||
| | ||
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` | ||
= note: adding a non-const method body in the future would be a breaking change | ||
|
||
error: const `impl` for trait `Default` which is not marked with `#[const_trait]` | ||
--> $DIR/derive-const-use.rs:15:16 | ||
| | ||
LL | #[derive_const(Default, PartialEq)] | ||
| ^^^^^^^ | ||
| | ||
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` | ||
= note: adding a non-const method body in the future would be a breaking change | ||
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0635`. |
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