-
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
Error for RPIT if they are not defined during MIR borrowck #125285
Error for RPIT if they are not defined during MIR borrowck #125285
Conversation
tests/ui/impl-trait/divergence.rs
Outdated
fn foo() -> impl MyTrait { | ||
//~^ ERROR: the trait bound `(): MyTrait` is not satisfied [E0277] |
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.
This is unfortunate but not sure how much we should care about this.
@@ -7,6 +6,7 @@ fn f_debug() -> impl Fn() -> impl Debug { | |||
} | |||
|
|||
fn ff_debug() -> impl Fn() -> impl Fn() -> impl Debug { | |||
//~^ ERROR: expected a `Fn()` closure, found `()` [E0277] |
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'd need to properly check what's going on here but at a glance this regression seems wrong?
vec![|| println!("woot")].into_iter() | ||
} | ||
|
||
fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> { | ||
//~^ ERROR: the trait bound `u32: From<()>` is not satisfied [E0277] |
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.
This is the only relevant change as the rest is rustfmt and seems fine.
@@ -1,11 +1,11 @@ | |||
#![deny(unused_must_use)] | |||
|
|||
fn it() -> impl ExactSizeIterator<Item = ()> { | |||
//~^ ERROR the trait bound `(): ExactSizeIterator` is not satisfied [E0277] |
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.
This seems like a diagnostics regression.
854e723
to
6a7ad4c
Compare
6a7ad4c
to
3e009ba
Compare
This comment has been minimized.
This comment has been minimized.
3e009ba
to
c130bfb
Compare
This is going to fail on https://github.com/rust-lang/rust/blob/master/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed#L21 as cargo fix is going to add impls with |
@bors try |
…ode, r=<try> Error for RPIT if they are not defined during MIR borrowck r? `@lcnr` Fixes rust-lang#112417 There are some changes in tests that we would need to properly review. I've left some comments on each of them.
The job Click to see the possible cause of the failure (guessed by this bot)
|
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
This breaks the usage of |
r? @lcnr
Fixes #112417
There are some changes in tests that we would need to properly review. I've left some comments on each of them.