-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bubble up opaque <eq> opaque operations instead of picking an order
- Loading branch information
Showing
7 changed files
with
127 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0284]: type annotations needed: cannot satisfy `impl AsyncRead + 'a == PendingReader<'a>` | ||
--> $DIR/async_scope_creep.rs:26:9 | ||
| | ||
LL | self.read() | ||
| ^^^^^^^^^^^ cannot satisfy `impl AsyncRead + 'a == PendingReader<'a>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0284`. |
25 changes: 25 additions & 0 deletions
25
tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//! This tries to prove the APIT's bounds in a canonical query, | ||
//! which doesn't know anything about the defining scope of either | ||
//! opaque type and thus makes a random choice as to which opaque type | ||
//! becomes the hidden type of the other. When we leave the canonical | ||
//! query, we attempt to actually check the defining anchor, but now we | ||
//! have a situation where the RPIT gets constrained outside its anchor. | ||
// revisions: current next | ||
//[next] compile-flags: -Ztrait-solver=next | ||
// check-pass | ||
|
||
#![feature(type_alias_impl_trait)] | ||
|
||
type Opaque = impl Sized; | ||
|
||
fn get_rpit() -> impl Clone {} | ||
|
||
fn query(_: impl FnOnce() -> Opaque) {} | ||
|
||
fn test() -> Opaque { | ||
query(get_rpit); | ||
get_rpit() | ||
} | ||
|
||
fn main() {} |