-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always encode RPITITs #109400
Always encode RPITITs #109400
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/lifetime-mismatch.rs:5:12 | ||
| | ||
LL | #![feature(async_fn_in_trait)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration | ||
--> $DIR/lifetime-mismatch.rs:14:17 | ||
| | ||
LL | async fn foo<'a>(&self); | ||
| ---- lifetimes in impl do not match this method in trait | ||
... | ||
LL | async fn foo(&self) {} | ||
| ^ lifetimes do not match method in trait | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0195`. |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,3 +1,6 @@ | ||||
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty | ||||
compiler-errors marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
// revisions: current next | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok I looked into it -- we don't need
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we probably want the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In any case, feel free to close this PR and leave yours open that aggregates this stuff. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the compile-flags is necessary to enable the |
||||
|
||||
#![feature(return_position_impl_trait_in_trait)] | ||||
|
||||
pub trait Foo { | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0049]: method `bar` has 0 type parameters but its trait declaration has 1 type parameter | ||
--> $DIR/trait-more-generics-than-impl.rs:14:11 | ||
| | ||
LL | fn bar<T>() -> impl Sized; | ||
| - expected 1 type parameter | ||
... | ||
LL | fn bar() -> impl Sized {} | ||
| ^ found 0 type parameters | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0049`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am skeptical that this PR passes... I'll look into it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, skeptical why this PR passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... this fails because we have no
predicates_of
for RPITITs. That doesn't seem right 🤔Let's leave this as not updated currently?