-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-async_fn_in_traitStatic async fn in traitsStatic async fn in traitsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
pub trait SpiDevice {
async fn transaction<F, R>(&mut self);
}
impl SpiDevice for () {
async fn transaction<F, R>(&mut self) {}
}
gives
error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:674:9: expected type for `R/#1` (R/1) but found Lifetime(ReFree(DefId(0:11 ~ embedded_hal_async[dae4]::spi::{impl#0}::transaction), BrNamed(DefId(0:16 ~ embedded_hal_async[dae4]::spi::SpiDevice::transaction::'_), '_))) when substituting, substs=[R, ReFree(DefId(0:11 ~ embedded_hal_async[dae4]::spi::{impl#0}::transaction), BrNamed(DefId(0:16 ~ embedded_hal_async[dae4]::spi::SpiDevice::transaction::'_), '_)), ReFree(DefId(0:11 ~ embedded_hal_async[dae4]::spi::{impl#0}::transaction), BrNamed(DefId(0:16 ~ embedded_hal_async[dae4]::spi::SpiDevice::transaction::'_), '_))]
happens with either
rustc 1.66.0-dev (21265dd)
1.66.0-nightly (2022-09-25 f5193a9)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-async_fn_in_traitStatic async fn in traitsStatic async fn in traitsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.