Skip to content

Commit 2063ebc

Browse files
committed
bless the known-bug tests
1 parent 7446012 commit 2063ebc

11 files changed

+67
-109
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-block-const-bound.rs:8:22
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/const-block-const-bound.rs:8:32
33
|
44
LL | const fn f<T: ~const Destruct>(x: T) {}
5-
| ^^^^^^^^
5+
| ^ - value is dropped here
6+
| |
7+
| the destructor for this type cannot be evaluated in constant functions
68

79
error: aborting due to previous error
810

11+
For more information about this error, try `rustc --explain E0493`.

tests/ui/consts/fn_trait_refs.stderr

+1-25
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ error: ~const can only be applied to `#[const_trait]` traits
1616
LL | T: ~const Fn<()> + ~const Destruct,
1717
| ^^^^^^
1818

19-
error: ~const can only be applied to `#[const_trait]` traits
20-
--> $DIR/fn_trait_refs.rs:15:31
21-
|
22-
LL | T: ~const Fn<()> + ~const Destruct,
23-
| ^^^^^^^^
24-
2519
error: ~const can only be applied to `#[const_trait]` traits
2620
--> $DIR/fn_trait_refs.rs:15:15
2721
|
@@ -34,12 +28,6 @@ error: ~const can only be applied to `#[const_trait]` traits
3428
LL | T: ~const FnMut<()> + ~const Destruct,
3529
| ^^^^^^^^^
3630

37-
error: ~const can only be applied to `#[const_trait]` traits
38-
--> $DIR/fn_trait_refs.rs:22:34
39-
|
40-
LL | T: ~const FnMut<()> + ~const Destruct,
41-
| ^^^^^^^^
42-
4331
error: ~const can only be applied to `#[const_trait]` traits
4432
--> $DIR/fn_trait_refs.rs:22:15
4533
|
@@ -64,12 +52,6 @@ error: ~const can only be applied to `#[const_trait]` traits
6452
LL | T: ~const Fn<()> + ~const Destruct,
6553
| ^^^^^^
6654

67-
error: ~const can only be applied to `#[const_trait]` traits
68-
--> $DIR/fn_trait_refs.rs:36:31
69-
|
70-
LL | T: ~const Fn<()> + ~const Destruct,
71-
| ^^^^^^^^
72-
7355
error: ~const can only be applied to `#[const_trait]` traits
7456
--> $DIR/fn_trait_refs.rs:36:15
7557
|
@@ -82,18 +64,12 @@ error: ~const can only be applied to `#[const_trait]` traits
8264
LL | T: ~const FnMut<()> + ~const Destruct,
8365
| ^^^^^^^^^
8466

85-
error: ~const can only be applied to `#[const_trait]` traits
86-
--> $DIR/fn_trait_refs.rs:50:34
87-
|
88-
LL | T: ~const FnMut<()> + ~const Destruct,
89-
| ^^^^^^^^
90-
9167
error: ~const can only be applied to `#[const_trait]` traits
9268
--> $DIR/fn_trait_refs.rs:50:15
9369
|
9470
LL | T: ~const FnMut<()> + ~const Destruct,
9571
| ^^^^^^^^^
9672

97-
error: aborting due to 16 previous errors
73+
error: aborting due to 12 previous errors
9874

9975
For more information about this error, try `rustc --explain E0635`.

tests/ui/impl-trait/normalize-tait-in-const.stderr

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits
44
LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
55
| ^^^^^^^^^^^^^^^^^
66

7-
error: ~const can only be applied to `#[const_trait]` traits
8-
--> $DIR/normalize-tait-in-const.rs:25:69
9-
|
10-
LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
11-
| ^^^^^^^^
12-
13-
error: aborting due to 2 previous errors
7+
error: aborting due to previous error
148

Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-drop-bound.rs:9:68
1+
error[E0493]: destructor of `E` cannot be evaluated at compile-time
2+
--> $DIR/const-drop-bound.rs:12:13
33
|
4-
LL | const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: ~const Destruct {
5-
| ^^^^^^^^
4+
LL | Err(_e) => None,
5+
| ^^ the destructor for this type cannot be evaluated in constant functions
66

7-
error: ~const can only be applied to `#[const_trait]` traits
8-
--> $DIR/const-drop-bound.rs:20:15
9-
|
10-
LL | T: ~const Destruct,
11-
| ^^^^^^^^
12-
13-
error: ~const can only be applied to `#[const_trait]` traits
14-
--> $DIR/const-drop-bound.rs:21:15
15-
|
16-
LL | E: ~const Destruct,
17-
| ^^^^^^^^
18-
19-
error: aborting due to 3 previous errors
7+
error: aborting due to previous error
208

9+
For more information about this error, try `rustc --explain E0493`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-drop-fail-2.rs:21:26
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/const-drop-fail-2.rs:21:36
33
|
44
LL | const fn check<T: ~const Destruct>(_: T) {}
5-
| ^^^^^^^^
5+
| ^ - value is dropped here
6+
| |
7+
| the destructor for this type cannot be evaluated in constant functions
68

79
error: aborting due to previous error
810

11+
For more information about this error, try `rustc --explain E0493`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-drop-fail.rs:24:26
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/const-drop-fail.rs:24:36
33
|
44
LL | const fn check<T: ~const Destruct>(_: T) {}
5-
| ^^^^^^^^
5+
| ^ the destructor for this type cannot be evaluated in constant functions
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0493`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-drop-fail.rs:24:26
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/const-drop-fail.rs:24:36
33
|
44
LL | const fn check<T: ~const Destruct>(_: T) {}
5-
| ^^^^^^^^
5+
| ^ - value is dropped here
6+
| |
7+
| the destructor for this type cannot be evaluated in constant functions
68

79
error: aborting due to previous error
810

11+
For more information about this error, try `rustc --explain E0493`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-drop.rs:19:22
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/const-drop.rs:19:32
33
|
44
LL | const fn a<T: ~const Destruct>(_: T) {}
5-
| ^^^^^^^^
5+
| ^ - value is dropped here
6+
| |
7+
| the destructor for this type cannot be evaluated in constant functions
68

7-
error: aborting due to previous error
9+
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
10+
--> $DIR/const-drop.rs:24:13
11+
|
12+
LL | let _ = S(&mut c);
13+
| ^^^^^^^^^- value is dropped here
14+
| |
15+
| the destructor for this type cannot be evaluated in constant functions
16+
17+
error: aborting due to 2 previous errors
818

19+
For more information about this error, try `rustc --explain E0493`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/const-drop.rs:19:22
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/const-drop.rs:19:32
33
|
44
LL | const fn a<T: ~const Destruct>(_: T) {}
5-
| ^^^^^^^^
5+
| ^ - value is dropped here
6+
| |
7+
| the destructor for this type cannot be evaluated in constant functions
68

7-
error: aborting due to previous error
9+
error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
10+
--> $DIR/const-drop.rs:24:13
11+
|
12+
LL | let _ = S(&mut c);
13+
| ^^^^^^^^^- value is dropped here
14+
| |
15+
| the destructor for this type cannot be evaluated in constant functions
16+
17+
error: aborting due to 2 previous errors
818

19+
For more information about this error, try `rustc --explain E0493`.

tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr

+1-37
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,24 @@ error: ~const can only be applied to `#[const_trait]` traits
1616
LL | const fn wrap(x: impl ~const PartialEq + ~const Destruct)
1717
| ^^^^^^^^^
1818

19-
error: ~const can only be applied to `#[const_trait]` traits
20-
--> $DIR/const-impl-trait.rs:16:49
21-
|
22-
LL | const fn wrap(x: impl ~const PartialEq + ~const Destruct)
23-
| ^^^^^^^^
24-
2519
error: ~const can only be applied to `#[const_trait]` traits
2620
--> $DIR/const-impl-trait.rs:17:20
2721
|
2822
LL | -> impl ~const PartialEq + ~const Destruct
2923
| ^^^^^^^^^
3024

31-
error: ~const can only be applied to `#[const_trait]` traits
32-
--> $DIR/const-impl-trait.rs:17:39
33-
|
34-
LL | -> impl ~const PartialEq + ~const Destruct
35-
| ^^^^^^^^
36-
3725
error: ~const can only be applied to `#[const_trait]` traits
3826
--> $DIR/const-impl-trait.rs:24:29
3927
|
4028
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
4129
| ^^^^^^^^^
4230

43-
error: ~const can only be applied to `#[const_trait]` traits
44-
--> $DIR/const-impl-trait.rs:24:48
45-
|
46-
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
47-
| ^^^^^^^^
48-
4931
error: ~const can only be applied to `#[const_trait]` traits
5032
--> $DIR/const-impl-trait.rs:28:29
5133
|
5234
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
5335
| ^^^^^^^^^
5436

55-
error: ~const can only be applied to `#[const_trait]` traits
56-
--> $DIR/const-impl-trait.rs:28:48
57-
|
58-
LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
59-
| ^^^^^^^^
60-
61-
error: ~const can only be applied to `#[const_trait]` traits
62-
--> $DIR/const-impl-trait.rs:49:41
63-
|
64-
LL | const fn apit(_: impl ~const T + ~const Destruct) {}
65-
| ^^^^^^^^
66-
67-
error: ~const can only be applied to `#[const_trait]` traits
68-
--> $DIR/const-impl-trait.rs:53:73
69-
|
70-
LL | const fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T> + ~const Destruct) {}
71-
| ^^^^^^^^
72-
73-
error: aborting due to 12 previous errors
37+
error: aborting due to 6 previous errors
7438

7539
For more information about this error, try `rustc --explain E0635`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: ~const can only be applied to `#[const_trait]` traits
2-
--> $DIR/issue-92111.rs:20:22
1+
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2+
--> $DIR/issue-92111.rs:20:32
33
|
44
LL | const fn a<T: ~const Destruct>(t: T) {}
5-
| ^^^^^^^^
5+
| ^ - value is dropped here
6+
| |
7+
| the destructor for this type cannot be evaluated in constant functions
68

79
error: aborting due to previous error
810

11+
For more information about this error, try `rustc --explain E0493`.

0 commit comments

Comments
 (0)