Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6a83d3

Browse files
committedJun 21, 2024
bless tests
1 parent 02aaea1 commit a6a83d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1077
-185
lines changed
 

‎tests/ui/consts/const_cmp_type_id.stderr

+2-20
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,7 @@ error[E0080]: evaluation of constant value failed
1010
LL | const _A: bool = TypeId::of::<u8>() < TypeId::of::<u16>();
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling non-const function `<TypeId as PartialOrd>::lt`
1212

13-
error[E0308]: mismatched types
14-
--> $DIR/const_cmp_type_id.rs:8:13
15-
|
16-
LL | assert!(TypeId::of::<u8>() == TypeId::of::<u8>());
17-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true`
18-
|
19-
= note: expected constant `host`
20-
found constant `true`
21-
22-
error[E0308]: mismatched types
23-
--> $DIR/const_cmp_type_id.rs:9:13
24-
|
25-
LL | assert!(TypeId::of::<()>() != TypeId::of::<u8>());
26-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true`
27-
|
28-
= note: expected constant `host`
29-
found constant `true`
30-
31-
error: aborting due to 4 previous errors
13+
error: aborting due to 2 previous errors
3214

33-
Some errors have detailed explanations: E0080, E0131, E0308.
15+
Some errors have detailed explanations: E0080, E0131.
3416
For more information about an error, try `rustc --explain E0080`.

‎tests/ui/consts/fn_trait_refs.stderr

+31-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,24 @@ error[E0635]: unknown feature `const_fn_trait_ref_impls`
44
LL | #![feature(const_fn_trait_ref_impls)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^
66

7+
error[E0635]: unknown feature `const_cmp`
8+
--> $DIR/fn_trait_refs.rs:8:12
9+
|
10+
LL | #![feature(const_cmp)]
11+
| ^^^^^^^^^
12+
713
error: `~const` can only be applied to `#[const_trait]` traits
814
--> $DIR/fn_trait_refs.rs:15:15
915
|
1016
LL | T: ~const Fn<()> + ~const Destruct,
1117
| ^^^^^^
1218

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+
1325
error: `~const` can only be applied to `#[const_trait]` traits
1426
--> $DIR/fn_trait_refs.rs:15:15
1527
|
@@ -24,6 +36,12 @@ error: `~const` can only be applied to `#[const_trait]` traits
2436
LL | T: ~const FnMut<()> + ~const Destruct,
2537
| ^^^^^^^^^
2638

39+
error: `~const` can only be applied to `#[const_trait]` traits
40+
--> $DIR/fn_trait_refs.rs:22:34
41+
|
42+
LL | T: ~const FnMut<()> + ~const Destruct,
43+
| ^^^^^^^^
44+
2745
error: `~const` can only be applied to `#[const_trait]` traits
2846
--> $DIR/fn_trait_refs.rs:22:15
2947
|
@@ -52,6 +70,12 @@ error: `~const` can only be applied to `#[const_trait]` traits
5270
LL | T: ~const Fn<()> + ~const Destruct,
5371
| ^^^^^^
5472

73+
error: `~const` can only be applied to `#[const_trait]` traits
74+
--> $DIR/fn_trait_refs.rs:36:31
75+
|
76+
LL | T: ~const Fn<()> + ~const Destruct,
77+
| ^^^^^^^^
78+
5579
error: `~const` can only be applied to `#[const_trait]` traits
5680
--> $DIR/fn_trait_refs.rs:36:15
5781
|
@@ -66,6 +90,12 @@ error: `~const` can only be applied to `#[const_trait]` traits
6690
LL | T: ~const FnMut<()> + ~const Destruct,
6791
| ^^^^^^^^^
6892

93+
error: `~const` can only be applied to `#[const_trait]` traits
94+
--> $DIR/fn_trait_refs.rs:50:34
95+
|
96+
LL | T: ~const FnMut<()> + ~const Destruct,
97+
| ^^^^^^^^
98+
6999
error: `~const` can only be applied to `#[const_trait]` traits
70100
--> $DIR/fn_trait_refs.rs:50:15
71101
|
@@ -182,7 +212,7 @@ LL | const fn test_fn_mut<T>(mut f: T) -> (T::Output, T::Output)
182212
LL | }
183213
| - value is dropped here
184214

185-
error: aborting due to 20 previous errors
215+
error: aborting due to 25 previous errors
186216

187217
Some errors have detailed explanations: E0015, E0493, E0635.
188218
For more information about an error, try `rustc --explain E0015`.

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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:27:69
9+
|
10+
LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
11+
| ^^^^^^^^
12+
713
error[E0015]: cannot call non-const closure in constant functions
814
--> $DIR/normalize-tait-in-const.rs:28:5
915
|
@@ -29,7 +35,7 @@ LL | fun(filter_positive());
2935
LL | }
3036
| - value is dropped here
3137

32-
error: aborting due to 3 previous errors
38+
error: aborting due to 4 previous errors
3339

3440
Some errors have detailed explanations: E0015, E0493.
3541
For more information about an error, try `rustc --explain E0015`.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.