Skip to content

Commit

Permalink
Rebase fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 12, 2024
1 parent 679513b commit a1777e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
error: item does not constrain `Bar::{opaque#0}`, but has it in its signature
--> $DIR/issue-84660-unsoundness.rs:22:8
|
LL | fn convert(_i: In) -> Self::Out {
| ^^^^^^^
|
= note: consider moving the opaque type's declaration and defining uses into a separate module
note: this opaque type is in the signature
--> $DIR/issue-84660-unsoundness.rs:12:12
|
LL | type Bar = impl Foo;
| ^^^^^^^^

error[E0119]: conflicting implementations of trait `Trait<Bar, _>`
--> $DIR/issue-84660-unsoundness.rs:29:1
--> $DIR/issue-84660-unsoundness.rs:28:1
|
LL | impl<In, Out> Trait<Bar, In> for Out {
| ------------------------------------ first implementation here
...
LL | impl<In, Out> Trait<(), In> for Out {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation

error: aborting due to 2 previous errors
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0119`.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ error[E0284]: type annotations needed: cannot satisfy `<Out as Trait<Bar, In>>::
LL | fn convert(_i: In) -> Self::Out {
| _____________________________________^
LL | |
LL | |
LL | | unreachable!();
LL | | }
| |_____^ cannot satisfy `<Out as Trait<Bar, In>>::Out == ()`

error[E0119]: conflicting implementations of trait `Trait<Bar, _>`
--> $DIR/issue-84660-unsoundness.rs:29:1
--> $DIR/issue-84660-unsoundness.rs:28:1
|
LL | impl<In, Out> Trait<Bar, In> for Out {
| ------------------------------------ first implementation here
Expand Down
1 change: 0 additions & 1 deletion tests/ui/type-alias-impl-trait/issue-84660-unsoundness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ impl<In, Out> Trait<Bar, In> for Out {
type Out = Out;
fn convert(_i: In) -> Self::Out {
//[next]~^ ERROR: cannot satisfy `<Out as Trait<Bar, In>>::Out == ()`
//[current]~^^ ERROR: item does not constrain `Bar::{opaque#0}`, but has it in its signature
unreachable!();
}
}
Expand Down

0 comments on commit a1777e4

Please sign in to comment.