-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
AFIT: "method not compatible with trait" with impl for &mut T
#103850
Labels
C-bug
Category: This is a bug.
F-async_fn_in_trait
Static async fn in traits
requires-nightly
This issue requires a nightly compiler in some way.
Comments
rustbot
added
C-bug
Category: This is a bug.
F-async_fn_in_trait
Static async fn in traits
requires-nightly
This issue requires a nightly compiler in some way.
labels
Nov 1, 2022
searched nightlies: from nightly-2022-10-22 to nightly-2022-11-01 likely #103608 |
Another repro which I believe is the same bug: pub trait Foo {
async fn foo(&mut self);
}
struct MyFoo<'a>(&'a mut ());
impl<'a> Foo for MyFoo<'a> {
async fn foo(&mut self) {}
} |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 17, 2022
…impl, r=lcnr Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl` long title 😓 We don't want to remap early-bound regions that originate from the `impl`s themselves, since they have no corresponding region in the trait. Not sure if there's a better condition than checking if the EBR's def-id's parent is the impl -- maybe we should be checking if the region comes from the method or RPITIT... 🤷 r? types Fixes rust-lang#103850
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 17, 2022
…impl, r=lcnr Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl` long title 😓 We don't want to remap early-bound regions that originate from the `impl`s themselves, since they have no corresponding region in the trait. Not sure if there's a better condition than checking if the EBR's def-id's parent is the impl -- maybe we should be checking if the region comes from the method or RPITIT... 🤷 r? types Fixes rust-lang#103850
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 17, 2022
…impl, r=lcnr Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl` long title 😓 We don't want to remap early-bound regions that originate from the `impl`s themselves, since they have no corresponding region in the trait. Not sure if there's a better condition than checking if the EBR's def-id's parent is the impl -- maybe we should be checking if the region comes from the method or RPITIT... 🤷 r? types Fixes rust-lang#103850
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-async_fn_in_trait
Static async fn in traits
requires-nightly
This issue requires a nightly compiler in some way.
playground
gives
Build using the Nightly version: 1.67.0-nightly (2022-10-31 95a3a72)
@rustbot label F-async_fn_in_traits C-bug requires-nightly
The text was updated successfully, but these errors were encountered: