Closed
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
Metadata
Metadata
Assignees
Labels
Area: implicit and explicit `expr as Type` coercionsCategory: This is a bug.`#![feature(pin_ergonomics)]`Status: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.This issue requires the use of incomplete features.