-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsC-bugCategory: This is a bug.Category: This is a bug.F-pin_ergonomics`#![feature(pin_ergonomics)]``#![feature(pin_ergonomics)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.
Description
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:
#![feature(pin_ergonomics)]
use std::pin::Pin;
pub fn foo() {
let _: Pin<Box<()>> = Box::pin(());
}
I expected to see this happen: should compile
Instead, this happened: got a compilation error
error[E0308]: mismatched types
--> src/lib.rs:6:27
|
6 | let _: Pin<Box<()>> = Box::pin(());
| ^^^^^^^^^^^^ types differ
|
= note: expected struct `Pin<_>`
found struct `Pin<_>`
Meta
rustc --version --verbose
:
rustc 1.84.0-nightly (f2a35426b 2024-11-16)
binary: rustc
commit-hash: f2a35426b6586178c44b27cedae182502092e898
commit-date: 2024-11-16
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3
fmease
Metadata
Metadata
Assignees
Labels
A-coercionsArea: implicit and explicit `expr as Type` coercionsArea: implicit and explicit `expr as Type` coercionsC-bugCategory: This is a bug.Category: This is a bug.F-pin_ergonomics`#![feature(pin_ergonomics)]``#![feature(pin_ergonomics)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.