Skip to content

Commit 8f94e48

Browse files
committed
bless some tests
1 parent 6e2a7f6 commit 8f94e48

9 files changed

+50
-72
lines changed

tests/ui/array-slice-vec/array_const_index-0.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: index out of bounds: the length is 0 but the index is 1
22
--> $DIR/array_const_index-0.rs:2:16
33
|
44
LL | const B: i32 = (&A)[1];
5-
| ^^^^^^^ evaluation of `B::{constant#0}` failed here
5+
| ^^^^^^^ evaluation of `B` failed here
66

77
error: aborting due to 1 previous error
88

tests/ui/array-slice-vec/array_const_index-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: index out of bounds: the length is 0 but the index is 1
22
--> $DIR/array_const_index-1.rs:2:16
33
|
44
LL | const B: i32 = A[1];
5-
| ^^^^ evaluation of `B::{constant#0}` failed here
5+
| ^^^^ evaluation of `B` failed here
66

77
error: aborting due to 1 previous error
88

tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ trait Foo {
44
const BAR: u32;
55
}
66

7-
const IMPL_REF_BAR: u32 = GlobalImplRef::BAR; //~ ERROR E0391
7+
const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
88

99
struct GlobalImplRef;
1010

1111
impl GlobalImplRef {
12-
const BAR: u32 = IMPL_REF_BAR;
12+
const BAR: u32 = IMPL_REF_BAR; //~ ERROR E0391
1313
}
1414

1515
fn main() {}

tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-impl.stderr

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
1-
error[E0391]: cycle detected when simplifying constant for the type system `IMPL_REF_BAR`
1+
error[E0391]: cycle detected when simplifying constant for the type system `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`
2+
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
3+
|
4+
LL | const BAR: u32 = IMPL_REF_BAR;
5+
| ^^^^^^^^^^^^^^
6+
|
7+
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`...
8+
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22
9+
|
10+
LL | const BAR: u32 = IMPL_REF_BAR;
11+
| ^^^^^^^^^^^^
12+
note: ...which requires simplifying constant for the type system `IMPL_REF_BAR`...
213
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:1
314
|
415
LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
516
| ^^^^^^^^^^^^^^^^^^^^^^^
6-
|
717
note: ...which requires const-evaluating + checking `IMPL_REF_BAR`...
818
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:27
919
|
1020
LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
1121
| ^^^^^^^^^^^^^^^^^^
12-
note: ...which requires simplifying constant for the type system `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`...
13-
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
14-
|
15-
LL | const BAR: u32 = IMPL_REF_BAR;
16-
| ^^^^^^^^^^^^^^
17-
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`...
18-
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
19-
|
20-
LL | const BAR: u32 = IMPL_REF_BAR;
21-
| ^^^^^^^^^^^^^^
22-
note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR` for CTFE...
23-
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:5
24-
|
25-
LL | const BAR: u32 = IMPL_REF_BAR;
26-
| ^^^^^^^^^^^^^^
27-
note: ...which requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`...
28-
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:12:22
22+
= note: ...which again requires simplifying constant for the type system `<impl at $DIR/issue-24949-assoc-const-static-recursion-impl.rs:11:1: 11:19>::BAR`, completing the cycle
23+
note: cycle used when const-evaluating + checking `IMPL_REF_BAR`
24+
--> $DIR/issue-24949-assoc-const-static-recursion-impl.rs:7:27
2925
|
30-
LL | const BAR: u32 = IMPL_REF_BAR;
31-
| ^^^^^^^^^^^^
32-
= note: ...which again requires simplifying constant for the type system `IMPL_REF_BAR`, completing the cycle
33-
= note: cycle used when running analysis passes on this crate
26+
LL | const IMPL_REF_BAR: u32 = GlobalImplRef::BAR;
27+
| ^^^^^^^^^^^^^^^^^^
3428
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
3529

3630
error: aborting due to 1 previous error

tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0391]: cycle detected when caching mir of `FooDefault::BAR` for CTFE
1+
error[E0391]: cycle detected when simplifying constant for the type system `FooDefault::BAR`
22
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
33
|
44
LL | const BAR: u32 = DEFAULT_REF_BAR;
55
| ^^^^^^^^^^^^^^
66
|
7-
note: ...which requires elaborating drops for `FooDefault::BAR`...
7+
note: ...which requires const-evaluating + checking `FooDefault::BAR`...
88
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22
99
|
1010
LL | const BAR: u32 = DEFAULT_REF_BAR;
@@ -19,22 +19,12 @@ note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
1919
|
2020
LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
2121
| ^^^^^^^^^^^^^^^^^^^^^^^
22-
note: ...which requires simplifying constant for the type system `FooDefault::BAR`...
23-
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
24-
|
25-
LL | const BAR: u32 = DEFAULT_REF_BAR;
26-
| ^^^^^^^^^^^^^^
27-
note: ...which requires const-evaluating + checking `FooDefault::BAR`...
28-
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
29-
|
30-
LL | const BAR: u32 = DEFAULT_REF_BAR;
31-
| ^^^^^^^^^^^^^^
32-
= note: ...which again requires caching mir of `FooDefault::BAR` for CTFE, completing the cycle
33-
note: cycle used when const-evaluating + checking `FooDefault::BAR`
34-
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
22+
= note: ...which again requires simplifying constant for the type system `FooDefault::BAR`, completing the cycle
23+
note: cycle used when const-evaluating + checking `DEFAULT_REF_BAR`
24+
--> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:30
3525
|
36-
LL | const BAR: u32 = DEFAULT_REF_BAR;
37-
| ^^^^^^^^^^^^^^
26+
LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
27+
| ^^^^^^^^^^^^^^^^^^^^^^^
3828
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
3929

4030
error: aborting due to 1 previous error

tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ trait Foo {
44
const BAR: u32;
55
}
66

7-
const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR; //~ ERROR E0391
7+
const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
88

99
struct GlobalTraitRef;
1010

1111
impl Foo for GlobalTraitRef {
12-
const BAR: u32 = TRAIT_REF_BAR;
12+
const BAR: u32 = TRAIT_REF_BAR; //~ ERROR E0391
1313
}
1414

1515
fn main() {}

tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.stderr

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
1-
error[E0391]: cycle detected when simplifying constant for the type system `TRAIT_REF_BAR`
1+
error[E0391]: cycle detected when simplifying constant for the type system `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`
2+
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
3+
|
4+
LL | const BAR: u32 = TRAIT_REF_BAR;
5+
| ^^^^^^^^^^^^^^
6+
|
7+
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`...
8+
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22
9+
|
10+
LL | const BAR: u32 = TRAIT_REF_BAR;
11+
| ^^^^^^^^^^^^^
12+
note: ...which requires simplifying constant for the type system `TRAIT_REF_BAR`...
213
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:1
314
|
415
LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
516
| ^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
717
note: ...which requires const-evaluating + checking `TRAIT_REF_BAR`...
818
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:28
919
|
1020
LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
1121
| ^^^^^^^^^^^^^^^^^^^^^
12-
note: ...which requires simplifying constant for the type system `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`...
13-
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
14-
|
15-
LL | const BAR: u32 = TRAIT_REF_BAR;
16-
| ^^^^^^^^^^^^^^
17-
note: ...which requires const-evaluating + checking `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`...
18-
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
19-
|
20-
LL | const BAR: u32 = TRAIT_REF_BAR;
21-
| ^^^^^^^^^^^^^^
22-
note: ...which requires caching mir of `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR` for CTFE...
23-
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:5
24-
|
25-
LL | const BAR: u32 = TRAIT_REF_BAR;
26-
| ^^^^^^^^^^^^^^
27-
note: ...which requires elaborating drops for `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`...
28-
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:12:22
22+
= note: ...which again requires simplifying constant for the type system `<impl at $DIR/issue-24949-assoc-const-static-recursion-trait.rs:11:1: 11:28>::BAR`, completing the cycle
23+
note: cycle used when const-evaluating + checking `TRAIT_REF_BAR`
24+
--> $DIR/issue-24949-assoc-const-static-recursion-trait.rs:7:28
2925
|
30-
LL | const BAR: u32 = TRAIT_REF_BAR;
31-
| ^^^^^^^^^^^^^
32-
= note: ...which again requires simplifying constant for the type system `TRAIT_REF_BAR`, completing the cycle
33-
= note: cycle used when running analysis passes on this crate
26+
LL | const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
27+
| ^^^^^^^^^^^^^^^^^^^^^
3428
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
3529

3630
error: aborting due to 1 previous error

tests/ui/associated-type-bounds/const-projection-err.stock.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ error[E0271]: type mismatch resolving `<T as TraitWAssocConst>::A == 1`
22
--> $DIR/const-projection-err.rs:14:11
33
|
44
LL | foo::<T>();
5-
| ^ expected `1`, found `<T as TraitWAssocConst>::A`
5+
| ^ expected `1`, found `0`
66
|
77
= note: expected constant `1`
8-
found constant `<T as TraitWAssocConst>::A`
8+
found constant `0`
99
note: required by a bound in `foo`
1010
--> $DIR/const-projection-err.rs:11:28
1111
|

tests/ui/const-generics/issues/issue-100313.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: writing to ALLOC0 which is read-only
22
--> $DIR/issue-100313.rs:18:5
33
|
44
LL | x.set_false();
5-
| ^^^^^^^^^^^^^ evaluation of `_::{constant#0}` failed inside this call
5+
| ^^^^^^^^^^^^^ evaluation of `_` failed inside this call
66
|
77
note: inside `T::<&true>::set_false`
88
--> $DIR/issue-100313.rs:11:13

0 commit comments

Comments
 (0)