Files
rust/tests/ui/traits/const-traits/variance.rs
David Wood 0bed12e02d hir_analysis: skip self type of host effect preds
Like trait predicates, the self type ought to be skipped here.
2025-02-24 10:19:16 +00:00

14 lines
229 B
Rust

#![feature(rustc_attrs, const_trait_impl)]
#![allow(internal_features)]
#![rustc_variance_of_opaques]
#[const_trait]
trait Foo {}
impl const Foo for () {}
fn foo<'a: 'a>() -> impl const Foo {}
//~^ ERROR ['a: *]
fn main() {}