forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#133402 - compiler-errors:drop-and-destruct, r=lcnr Constify `Drop` and `Destruct` r? `@lcnr` or `@fee1-dead`
- Loading branch information
Showing
23 changed files
with
113 additions
and
675 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
error: `~const` can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-block-const-bound.rs:8:15 | ||
error[E0277]: the trait bound `UnconstDrop: const Destruct` is not satisfied | ||
--> $DIR/const-block-const-bound.rs:18:9 | ||
| | ||
LL | const fn f<T: ~const Destruct>(x: T) {} | ||
| ^^^^^^ | ||
LL | f(UnconstDrop); | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: `~const` can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-block-const-bound.rs:8:15 | ||
| | ||
LL | const fn f<T: ~const Destruct>(x: T) {} | ||
| ^^^^^^ | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-block-const-bound.rs:8:32 | ||
| | ||
LL | const fn f<T: ~const Destruct>(x: T) {} | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. | ||
For more information about this error, try `rustc --explain E0277`. |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.