Skip to content

lazy type alias: type parameters are not considered constrained in impls #116100

Closed
@fmease

Description

@fmease

Uplifted from #112792 (comment).

#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

type Faa<A> = Foo<A>;
struct Foo<A>(A);

impl<A> Faa<A> {}
error[E0207]: the type parameter `A` is not constrained by the impl trait, self type, or predicates
 --> src/lib.rs:11:6
  |
7 | impl<A> Faa<A> {}
  |      ^ unconstrained type parameter

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.F-lazy_type_alias`#![feature(lazy_type_alias)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions