Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2c7ede8

Browse files
committed
update tests
1 parent a788be0 commit 2c7ede8

16 files changed

+68
-68
lines changed

tests/ui/coherence/occurs-check/associated-type.next.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
2-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
32
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
4-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
53
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
6-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
74
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
8-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, RePlaceholder(!1_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
95
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
106
--> $DIR/associated-type.rs:31:1
117
|

tests/ui/coherence/occurs-check/opaques.next.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
error[E0119]: conflicting implementations of trait `Trait<Alias<_>>` for type `Alias<_>`
1+
error[E0119]: conflicting implementations of trait `Trait<_>`
22
--> $DIR/opaques.rs:30:1
33
|
44
LL | impl<T> Trait<T> for T {
55
| ---------------------- first implementation here
66
...
77
LL | impl<T> Trait<T> for defining_scope::Alias<T> {
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Alias<_>`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
99

1010
error[E0282]: type annotations needed
1111
--> $DIR/opaques.rs:13:20
1212
|
1313
LL | pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
14-
| ^ cannot infer type for struct `Container<Alias<T>, T>`
14+
| ^ cannot infer type for struct `Container<T, T>`
1515

1616
error: aborting due to 2 previous errors
1717

tests/ui/impl-trait/auto-trait-coherence.next.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
1+
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<_>`
22
--> $DIR/auto-trait-coherence.rs:24:1
33
|
44
LL | impl<T: Send> AnotherTrait for T {}
55
| -------------------------------- first implementation here
66
...
77
LL | impl AnotherTrait for D<OpaqueType> {
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<_>`
99

1010
error: aborting due to 1 previous error
1111

tests/ui/impl-trait/auto-trait-coherence.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ impl<T: Send> AnotherTrait for T {}
2222
// (We treat opaque types as "foreign types" that could grow more impls
2323
// in the future.)
2424
impl AnotherTrait for D<OpaqueType> {
25-
//~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
25+
//[old]~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
26+
//[next]~^^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<_>`
2627
}
2728

2829
fn main() {}

tests/ui/impl-trait/two_tait_defining_each_other2.current.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | type A = impl Foo;
77
= note: `A` must be used in combination with a concrete type within the same module
88

99
error: opaque type's hidden type cannot be another opaque type from the same scope
10-
--> $DIR/two_tait_defining_each_other2.rs:11:5
10+
--> $DIR/two_tait_defining_each_other2.rs:12:5
1111
|
1212
LL | x // B's hidden type is A (opaquely)
1313
| ^ one of the two opaque types used here has to be outside its defining scope

tests/ui/impl-trait/two_tait_defining_each_other2.next.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0284]: type annotations needed: cannot satisfy `A == B`
2-
--> $DIR/two_tait_defining_each_other2.rs:11:5
1+
error[E0284]: type annotations needed: cannot satisfy `_ == A`
2+
--> $DIR/two_tait_defining_each_other2.rs:10:8
33
|
4-
LL | x // B's hidden type is A (opaquely)
5-
| ^ cannot satisfy `A == B`
4+
LL | fn muh(x: A) -> B {
5+
| ^ cannot satisfy `_ == A`
66

77
error: aborting due to 1 previous error
88

tests/ui/impl-trait/two_tait_defining_each_other2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ type B = impl Foo;
88
trait Foo {}
99

1010
fn muh(x: A) -> B {
11+
//[next]~^ ERROR type annotations needed: cannot satisfy `_ == A`
1112
x // B's hidden type is A (opaquely)
1213
//[current]~^ ERROR opaque type's hidden type cannot be another opaque type
13-
//[next]~^^ ERROR type annotations needed: cannot satisfy `A == B`
1414
}
1515

1616
struct Bar;

tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ trait Trait {}
1616
impl<T: Copy> Trait for T {}
1717
struct LocalTy;
1818
impl Trait for <LocalTy as Overflow>::Assoc {}
19-
//~^ ERROR conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`
19+
//~^ ERROR conflicting implementations of trait `Trait`
2020

2121
fn main() {}

tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-norm-overflow.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0119]: conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`
1+
error[E0119]: conflicting implementations of trait `Trait`
22
--> $DIR/trait_ref_is_knowable-norm-overflow.rs:18:1
33
|
44
LL | impl<T: Copy> Trait for T {}
55
| ------------------------- first implementation here
66
LL | struct LocalTy;
77
LL | impl Trait for <LocalTy as Overflow>::Assoc {}
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<LocalTy as Overflow>::Assoc`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
99

1010
error[E0275]: overflow evaluating the requirement `<T as Overflow>::Assoc: Sized`
1111
--> $DIR/trait_ref_is_knowable-norm-overflow.rs:10:18

tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ impl<T> Id for T {
99
}
1010

1111

12-
// Coherence should be able to reason that `(): PartialEq<<T as Id>::Assoc>>`
12+
// Coherence should be able to reason that `(): PartialEq<<LocalTy as Id>::Assoc>>`
1313
// does not hold.
1414
//
1515
// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/51

0 commit comments

Comments
 (0)