-
Notifications
You must be signed in to change notification settings - Fork 13k
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
11 changed files
with
67 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-block-const-bound.rs:8:22 | ||
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 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
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
23 changes: 6 additions & 17 deletions
23
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.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,20 +1,9 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop-bound.rs:9:68 | ||
error[E0493]: destructor of `E` cannot be evaluated at compile-time | ||
--> $DIR/const-drop-bound.rs:12:13 | ||
| | ||
LL | const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: ~const Destruct { | ||
| ^^^^^^^^ | ||
LL | Err(_e) => None, | ||
| ^^ the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop-bound.rs:20:15 | ||
| | ||
LL | T: ~const Destruct, | ||
| ^^^^^^^^ | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop-bound.rs:21:15 | ||
| | ||
LL | E: ~const Destruct, | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
9 changes: 6 additions & 3 deletions
9
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.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,11 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop-fail-2.rs:21:26 | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop-fail-2.rs:21:36 | ||
| | ||
LL | const fn check<T: ~const Destruct>(_: T) {} | ||
| ^^^^^^^^ | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
7 changes: 4 additions & 3 deletions
7
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.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,8 +1,9 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop-fail.rs:24:26 | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop-fail.rs:24:36 | ||
| | ||
LL | const fn check<T: ~const Destruct>(_: T) {} | ||
| ^^^^^^^^ | ||
| ^ the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
9 changes: 6 additions & 3 deletions
9
tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.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,8 +1,11 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop-fail.rs:24:26 | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop-fail.rs:24:36 | ||
| | ||
LL | const fn check<T: ~const Destruct>(_: T) {} | ||
| ^^^^^^^^ | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
19 changes: 15 additions & 4 deletions
19
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,8 +1,19 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop.rs:19:22 | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:19:32 | ||
| | ||
LL | const fn a<T: ~const Destruct>(_: T) {} | ||
| ^^^^^^^^ | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to previous error | ||
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:24:13 | ||
| | ||
LL | let _ = S(&mut c); | ||
| ^^^^^^^^^- value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
19 changes: 15 additions & 4 deletions
19
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,8 +1,19 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/const-drop.rs:19:22 | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:19:32 | ||
| | ||
LL | const fn a<T: ~const Destruct>(_: T) {} | ||
| ^^^^^^^^ | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to previous error | ||
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time | ||
--> $DIR/const-drop.rs:24:13 | ||
| | ||
LL | let _ = S(&mut c); | ||
| ^^^^^^^^^- value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
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
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,11 @@ | ||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/issue-92111.rs:20:22 | ||
error[E0493]: destructor of `T` cannot be evaluated at compile-time | ||
--> $DIR/issue-92111.rs:20:32 | ||
| | ||
LL | const fn a<T: ~const Destruct>(t: T) {} | ||
| ^^^^^^^^ | ||
| ^ - value is dropped here | ||
| | | ||
| the destructor for this type cannot be evaluated in constant functions | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0493`. |