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 e028757

Browse files
committedJun 12, 2024
Rebase fallout
1 parent 23c4d59 commit e028757

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
error: item does not constrain `Bar::{opaque#0}`, but has it in its signature
2-
--> $DIR/issue-84660-unsoundness.rs:22:8
3-
|
4-
LL | fn convert(_i: In) -> Self::Out {
5-
| ^^^^^^^
6-
|
7-
= note: consider moving the opaque type's declaration and defining uses into a separate module
8-
note: this opaque type is in the signature
9-
--> $DIR/issue-84660-unsoundness.rs:12:12
10-
|
11-
LL | type Bar = impl Foo;
12-
| ^^^^^^^^
13-
141
error[E0119]: conflicting implementations of trait `Trait<Bar, _>`
15-
--> $DIR/issue-84660-unsoundness.rs:29:1
2+
--> $DIR/issue-84660-unsoundness.rs:28:1
163
|
174
LL | impl<In, Out> Trait<Bar, In> for Out {
185
| ------------------------------------ first implementation here
196
...
207
LL | impl<In, Out> Trait<(), In> for Out {
218
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
229

23-
error: aborting due to 2 previous errors
10+
error: aborting due to 1 previous error
2411

2512
For more information about this error, try `rustc --explain E0119`.

‎tests/ui/type-alias-impl-trait/issue-84660-unsoundness.next.stderr

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ error[E0284]: type annotations needed: cannot satisfy `<Out as Trait<Bar, In>>::
44
LL | fn convert(_i: In) -> Self::Out {
55
| _____________________________________^
66
LL | |
7-
LL | |
87
LL | | unreachable!();
98
LL | | }
109
| |_____^ cannot satisfy `<Out as Trait<Bar, In>>::Out == ()`
1110

1211
error[E0119]: conflicting implementations of trait `Trait<Bar, _>`
13-
--> $DIR/issue-84660-unsoundness.rs:29:1
12+
--> $DIR/issue-84660-unsoundness.rs:28:1
1413
|
1514
LL | impl<In, Out> Trait<Bar, In> for Out {
1615
| ------------------------------------ first implementation here

‎tests/ui/type-alias-impl-trait/issue-84660-unsoundness.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ impl<In, Out> Trait<Bar, In> for Out {
2121
type Out = Out;
2222
fn convert(_i: In) -> Self::Out {
2323
//[next]~^ ERROR: cannot satisfy `<Out as Trait<Bar, In>>::Out == ()`
24-
//[current]~^^ ERROR: item does not constrain `Bar::{opaque#0}`, but has it in its signature
2524
unreachable!();
2625
}
2726
}

0 commit comments

Comments
 (0)
Failed to load comments.