Skip to content

Commit 0ca9566

Browse files
committed
tests: bless remaining tests
These tests just need blessing, they don't have any interesting behaviour changes.
1 parent 3844264 commit 0ca9566

8 files changed

+89
-32
lines changed

tests/ui/attributes/dump-preds.stderr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ LL | trait Trait<T>: Iterator<Item: Copy>
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: Binder { value: TraitPredicate(<Self as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
8+
= note: Binder { value: HostEffectPredicate { trait_ref: <Self as std::marker::MetaSized>, constness: Const }, bound_vars: [] }
89
= note: Binder { value: TraitPredicate(<Self as std::iter::Iterator>, polarity:Positive), bound_vars: [] }
910
= note: Binder { value: TraitPredicate(<<Self as std::iter::Iterator>::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] }
1011
= note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
12+
= note: Binder { value: HostEffectPredicate { trait_ref: <T as std::marker::Sized>, constness: Const }, bound_vars: [] }
1113
= note: Binder { value: TraitPredicate(<std::string::String as std::convert::From<T>>, polarity:Positive), bound_vars: [] }
1214
= note: Binder { value: TraitPredicate(<Self as Trait<T>>, polarity:Positive), bound_vars: [] }
1315

@@ -18,12 +20,15 @@ LL | type Assoc<P: Eq>: std::ops::Deref<Target = ()>
1820
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1921
|
2022
= note: Binder { value: TraitPredicate(<Self as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
23+
= note: Binder { value: HostEffectPredicate { trait_ref: <Self as std::marker::MetaSized>, constness: Const }, bound_vars: [] }
2124
= note: Binder { value: TraitPredicate(<Self as std::iter::Iterator>, polarity:Positive), bound_vars: [] }
2225
= note: Binder { value: TraitPredicate(<<Self as std::iter::Iterator>::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] }
2326
= note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
27+
= note: Binder { value: HostEffectPredicate { trait_ref: <T as std::marker::Sized>, constness: Const }, bound_vars: [] }
2428
= note: Binder { value: TraitPredicate(<std::string::String as std::convert::From<T>>, polarity:Positive), bound_vars: [] }
2529
= note: Binder { value: TraitPredicate(<Self as Trait<T>>, polarity:Positive), bound_vars: [] }
2630
= note: Binder { value: TraitPredicate(<P as std::marker::Sized>, polarity:Positive), bound_vars: [] }
31+
= note: Binder { value: HostEffectPredicate { trait_ref: <P as std::marker::Sized>, constness: Const }, bound_vars: [] }
2732
= note: Binder { value: TraitPredicate(<P as std::cmp::Eq>, polarity:Positive), bound_vars: [] }
2833
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<()> as std::marker::Copy>, polarity:Positive), bound_vars: [] }
2934

@@ -35,6 +40,7 @@ LL | type Assoc<P: Eq>: std::ops::Deref<Target = ()>
3540
|
3641
= note: Binder { value: ProjectionPredicate(AliasTerm { args: [Alias(Projection, AliasTy { args: [Self/#0, T/#1, P/#2], def_id: DefId(..), .. })], def_id: DefId(..), .. }, Term::Ty(())), bound_vars: [] }
3742
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::ops::Deref>, polarity:Positive), bound_vars: [] }
43+
= note: Binder { value: HostEffectPredicate { trait_ref: <<Self as Trait<T>>::Assoc<P> as std::marker::Sized>, constness: Const }, bound_vars: [] }
3844
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::Sized>, polarity:Positive), bound_vars: [] }
3945
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
4046

tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ revisions: with without
22
//@ compile-flags: -Znext-solver
3-
#![feature(rustc_attrs)]
3+
#![feature(rustc_attrs, sized_hierarchy)]
4+
use std::marker::PointeeSized;
45

56
// This test is incredibly subtle. At its core the goal is to get a coinductive cycle,
67
// which, depending on its root goal, either holds or errors. We achieve this by getting
@@ -17,20 +18,20 @@
1718
// test for that.
1819

1920
#[rustc_coinductive]
20-
trait Trait<T: ?Sized, V: ?Sized, D: ?Sized> {}
21-
struct A<T: ?Sized>(*const T);
22-
struct B<T: ?Sized>(*const T);
21+
trait Trait<T: PointeeSized, V: PointeeSized, D: PointeeSized>: PointeeSized {}
22+
struct A<T: PointeeSized>(*const T);
23+
struct B<T: PointeeSized>(*const T);
2324

24-
trait IncompleteGuidance<T: ?Sized, V: ?Sized> {}
25-
impl<T: ?Sized, U: ?Sized + 'static> IncompleteGuidance<U, u8> for T {}
26-
impl<T: ?Sized, U: ?Sized + 'static> IncompleteGuidance<U, i8> for T {}
27-
impl<T: ?Sized, U: ?Sized + 'static> IncompleteGuidance<U, i16> for T {}
25+
trait IncompleteGuidance<T: PointeeSized, V: PointeeSized>: PointeeSized {}
26+
impl<T: PointeeSized, U: PointeeSized + 'static> IncompleteGuidance<U, u8> for T {}
27+
impl<T: PointeeSized, U: PointeeSized + 'static> IncompleteGuidance<U, i8> for T {}
28+
impl<T: PointeeSized, U: PointeeSized + 'static> IncompleteGuidance<U, i16> for T {}
2829

29-
trait ImplGuidance<T: ?Sized, V: ?Sized> {}
30-
impl<T: ?Sized> ImplGuidance<u32, u8> for T {}
31-
impl<T: ?Sized> ImplGuidance<i32, i8> for T {}
30+
trait ImplGuidance<T: PointeeSized, V: PointeeSized>: PointeeSized {}
31+
impl<T: PointeeSized> ImplGuidance<u32, u8> for T {}
32+
impl<T: PointeeSized> ImplGuidance<i32, i8> for T {}
3233

33-
impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T>
34+
impl<T: PointeeSized, U: PointeeSized, V: PointeeSized, D: PointeeSized> Trait<U, V, D> for A<T>
3435
where
3536
T: IncompleteGuidance<U, V>,
3637
A<T>: Trait<U, D, V>,
@@ -39,17 +40,24 @@ where
3940
{
4041
}
4142

42-
trait ToU8<T: ?Sized> {}
43+
trait ToU8<T: PointeeSized>: PointeeSized {}
4344
impl ToU8<u8> for () {}
4445

45-
impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for B<T>
46+
impl<T: PointeeSized, U: PointeeSized, V: PointeeSized, D: PointeeSized> Trait<U, V, D> for B<T>
4647
where
4748
T: ImplGuidance<U, V>,
4849
A<T>: Trait<U, V, D>,
4950
{
5051
}
5152

52-
fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
53+
fn impls_trait<T, U, V, D>()
54+
where
55+
T: PointeeSized + Trait<U, V, D>,
56+
U: PointeeSized,
57+
V: PointeeSized,
58+
D: PointeeSized
59+
{
60+
}
5361

5462
fn with_bound<X>()
5563
where

tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.with.stderr

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
error[E0277]: the trait bound `A<X>: Trait<_, _, _>` is not satisfied
2-
--> $DIR/incompleteness-unstable-result.rs:65:19
2+
--> $DIR/incompleteness-unstable-result.rs:73:19
33
|
44
LL | impls_trait::<A<X>, _, _, _>();
55
| ^^^^ the trait `Trait<_, _, _>` is not implemented for `A<X>`
66
|
77
= help: the trait `Trait<U, V, D>` is implemented for `A<T>`
88
note: required for `A<X>` to implement `Trait<_, _, _>`
9-
--> $DIR/incompleteness-unstable-result.rs:33:50
9+
--> $DIR/incompleteness-unstable-result.rs:34:74
1010
|
11-
LL | impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T>
12-
| ^^^^^^^^^^^^^^ ^^^^
11+
LL | impl<T: PointeeSized, U: PointeeSized, V: PointeeSized, D: PointeeSized> Trait<U, V, D> for A<T>
12+
| ^^^^^^^^^^^^^^ ^^^^
1313
...
1414
LL | A<T>: Trait<U, D, V>,
1515
| -------------- unsatisfied trait bound introduced here
1616
= note: 8 redundant requirements hidden
1717
= note: required for `A<X>` to implement `Trait<_, _, _>`
1818
note: required by a bound in `impls_trait`
19-
--> $DIR/incompleteness-unstable-result.rs:52:28
19+
--> $DIR/incompleteness-unstable-result.rs:55:23
2020
|
21-
LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
22-
| ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
21+
LL | fn impls_trait<T, U, V, D>()
22+
| ----------- required by a bound in this function
23+
LL | where
24+
LL | T: PointeeSized + Trait<U, V, D>,
25+
| ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
2326

2427
error: aborting due to 1 previous error
2528

tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.without.stderr

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
error[E0277]: the trait bound `A<X>: Trait<_, _, _>` is not satisfied
2-
--> $DIR/incompleteness-unstable-result.rs:65:19
2+
--> $DIR/incompleteness-unstable-result.rs:73:19
33
|
44
LL | impls_trait::<A<X>, _, _, _>();
55
| ^^^^ the trait `Trait<_, _, _>` is not implemented for `A<X>`
66
|
77
= help: the trait `Trait<U, V, D>` is implemented for `A<T>`
88
note: required for `A<X>` to implement `Trait<_, _, _>`
9-
--> $DIR/incompleteness-unstable-result.rs:33:50
9+
--> $DIR/incompleteness-unstable-result.rs:34:74
1010
|
11-
LL | impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T>
12-
| ^^^^^^^^^^^^^^ ^^^^
11+
LL | impl<T: PointeeSized, U: PointeeSized, V: PointeeSized, D: PointeeSized> Trait<U, V, D> for A<T>
12+
| ^^^^^^^^^^^^^^ ^^^^
1313
...
1414
LL | A<T>: Trait<U, D, V>,
1515
| -------------- unsatisfied trait bound introduced here
1616
= note: 8 redundant requirements hidden
1717
= note: required for `A<X>` to implement `Trait<_, _, _>`
1818
note: required by a bound in `impls_trait`
19-
--> $DIR/incompleteness-unstable-result.rs:52:28
19+
--> $DIR/incompleteness-unstable-result.rs:55:23
2020
|
21-
LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {}
22-
| ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
21+
LL | fn impls_trait<T, U, V, D>()
22+
| ----------- required by a bound in this function
23+
LL | where
24+
LL | T: PointeeSized + Trait<U, V, D>,
25+
| ^^^^^^^^^^^^^^ required by this bound in `impls_trait`
2326

2427
error: aborting due to 1 previous error
2528

tests/ui/traits/next-solver/issue-118950-root-region.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ impl<T> Overlap<T> for T {}
1919
impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
2020
//~^ ERROR cannot find type `Missing` in this scope
2121
//~| ERROR the trait bound `T: Overlap<for<'a> fn(Assoc<'a, T>)>` is not satisfied
22+
//~| ERROR the trait bound `{type error}: const MetaSized` is not satisfied
2223

2324
fn main() {}

tests/ui/traits/next-solver/issue-118950-root-region.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,19 @@ help: consider further restricting type parameter `T` with trait `Overlap`
3737
LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T>, T: Overlap<for<'a> fn(Assoc<'a, T>)> {}
3838
| ++++++++++++++++++++++++++++++++++++++
3939

40-
error: aborting due to 3 previous errors; 1 warning emitted
40+
error[E0277]: the trait bound `{type error}: const MetaSized` is not satisfied
41+
--> $DIR/issue-118950-root-region.rs:19:64
42+
|
43+
LL | impl<T> Overlap<for<'a> fn(Assoc<'a, T>)> for T where Missing: Overlap<T> {}
44+
| ^^^^^^^^^^
45+
|
46+
note: required by a bound in `Overlap`
47+
--> $DIR/issue-118950-root-region.rs:12:1
48+
|
49+
LL | trait Overlap<T> {}
50+
| ^^^^^^^^^^^^^^^^ required by this bound in `Overlap`
51+
52+
error: aborting due to 4 previous errors; 1 warning emitted
4153

4254
Some errors have detailed explanations: E0277, E0412.
4355
For more information about an error, try `rustc --explain E0277`.

tests/ui/traits/next-solver/normalize/normalize-param-env-2.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ note: required by a bound in `A`
3131
LL | trait A<T> {
3232
| ^^^^^^^^^^ required by this bound in `A`
3333

34+
error[E0275]: overflow evaluating the requirement `<() as A<T>>::Assoc: const MetaSized`
35+
--> $DIR/normalize-param-env-2.rs:24:22
36+
|
37+
LL | Self::Assoc: A<T>,
38+
| ^^^^
39+
|
40+
note: required by a bound in `A`
41+
--> $DIR/normalize-param-env-2.rs:9:1
42+
|
43+
LL | trait A<T> {
44+
| ^^^^^^^^^^ required by this bound in `A`
45+
3446
error[E0275]: overflow evaluating the requirement `<() as A<T>>::Assoc well-formed`
3547
--> $DIR/normalize-param-env-2.rs:24:22
3648
|
@@ -58,6 +70,6 @@ LL | where
5870
LL | Self::Assoc: A<T>,
5971
| ^^^^ required by this bound in `A::f`
6072

61-
error: aborting due to 6 previous errors
73+
error: aborting due to 7 previous errors
6274

6375
For more information about this error, try `rustc --explain E0275`.

tests/ui/traits/next-solver/normalize/normalize-param-env-4.next.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ note: required by a bound in `Trait`
1616
LL | trait Trait {
1717
| ^^^^^^^^^^^ required by this bound in `Trait`
1818

19+
error[E0275]: overflow evaluating the requirement `<T as Trait>::Assoc: const MetaSized`
20+
--> $DIR/normalize-param-env-4.rs:19:26
21+
|
22+
LL | <T as Trait>::Assoc: Trait,
23+
| ^^^^^
24+
|
25+
note: required by a bound in `Trait`
26+
--> $DIR/normalize-param-env-4.rs:7:1
27+
|
28+
LL | trait Trait {
29+
| ^^^^^^^^^^^ required by this bound in `Trait`
30+
1931
error[E0275]: overflow evaluating the requirement `<T as Trait>::Assoc well-formed`
2032
--> $DIR/normalize-param-env-4.rs:19:26
2133
|
@@ -34,6 +46,6 @@ note: required by a bound in `impls_trait`
3446
LL | fn impls_trait<T: Trait>() {}
3547
| ^^^^^ required by this bound in `impls_trait`
3648

37-
error: aborting due to 4 previous errors
49+
error: aborting due to 5 previous errors
3850

3951
For more information about this error, try `rustc --explain E0275`.

0 commit comments

Comments
 (0)