-
Notifications
You must be signed in to change notification settings - Fork 13k
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
pin_ergonomics
leads to bizarre "expected Pin<X>
found Pin<X>
" type errors
#133222
Comments
Conceptually simpler reproducer: #![feature(pin_ergonomics)]
fn mk() -> std::pin::Pin<()> { loop {} }
|
And less artificial: #![feature(pin_ergonomics)]
struct X;
impl std::ops::Deref for X { type Target = u32; fn deref(&self) -> &Self::Target { &0 } }
fn main() {
let _: std::pin::Pin<X> = std::pin::Pin::new(X);
}
|
pin_ergonomics
feature breaks Box::pin
pin_ergonomics
leads to bizzare expected X found X type errors
pin_ergonomics
leads to bizzare expected X found X type errorspin_ergonomics
leads to bizarre expected X found X type errors
pin_ergonomics
leads to bizarre expected X found X type errorspin_ergonomics
leads to bizarre expected Pin<X>
found Pin<X>
type errors
Possibly due to the following:
Where |
cc @eholk |
pin_ergonomics
leads to bizarre expected Pin<X>
found Pin<X>
type errorspin_ergonomics
leads to bizarre "expected Pin<X>
found Pin<X>
" type errors
Rollup merge of rust-lang#133358 - compiler-errors:pin-coerce, r=eholk Don't type error if we fail to coerce `Pin<T>` because it doesnt contain a ref Fixes rust-lang#133222. Also moves some tests into a directory for better bookkeeping. r? eholk or re-roll
I know
pin_ergonomics
is in very early stages, but I was eager to try it out and ran into this somewhat fundamental issue.cc #130494
I tried this code:
I expected to see this happen: should compile
Instead, this happened: got a compilation error
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: