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.
- Loading branch information
Showing
25 changed files
with
444 additions
and
134 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
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,16 @@ | ||
error: `~const` is not allowed here | ||
--> $DIR/assoc-type.rs:17:15 | ||
| | ||
LL | type Bar: ~const std::ops::Add; | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this item cannot have `~const` trait bounds | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/assoc-type.rs:17:22 | ||
| | ||
LL | type Bar: ~const std::ops::Add; | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 2 previous errors | ||
|
2 changes: 1 addition & 1 deletion
2
...const-bound-on-not-const-associated-fn.rs → ...const-bound-on-not-const-associated-fn.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#![feature(const_trait_impl, effects)] | ||
#![feature(const_trait_impl)] | ||
|
||
#[const_trait] | ||
trait MyTrait { | ||
|
File renamed without changes.
21 changes: 6 additions & 15 deletions
21
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.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,19 +1,10 @@ | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:19:32 | ||
error: `~const` is not allowed here | ||
--> $DIR/const-drop.rs:67:38 | ||
| | ||
LL | const fn a<T: ~const Destruct>(_: T) {} | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:24:13 | ||
LL | pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>); | ||
| ^^^^^^^^^^^^^^^^ | ||
| | ||
LL | let _ = S(&mut c); | ||
| ^^^^^^^^^- value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
= note: this item cannot have `~const` trait bounds | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
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
21 changes: 6 additions & 15 deletions
21
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.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,19 +1,10 @@ | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:19:32 | ||
error: `~const` is not allowed here | ||
--> $DIR/const-drop.rs:67:38 | ||
| | ||
LL | const fn a<T: ~const Destruct>(_: T) {} | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:24:13 | ||
LL | pub struct ConstDropWithBound<T: ~const SomeTrait>(pub core::marker::PhantomData<T>); | ||
| ^^^^^^^^^^^^^^^^ | ||
| | ||
LL | let _ = S(&mut c); | ||
| ^^^^^^^^^- value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
= note: this item cannot have `~const` trait bounds | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
tests/ui/rfcs/rfc-2632-const-trait-impl/issue-90052.stderr
This file was deleted.
Oops, something went wrong.
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.