Skip to content

We don't fully validate relaxed trait bounds on the RHS of trait aliases (should we actually reject them outright?) #143122

Open
@fmease

Description

@fmease

CC #135841 (review), #142693

This currently passes compilation while it shouldn't:

#![feature(trait_alias)]

trait A = ?Sized + ?Sized; // should be rejected due to duplicate relaxed trait bounds
trait B = ?Iterator; // should be rejected since `Iterator` is not a default trait

// (also doesn't error if referenced — in case anyone was wondering)
//fn f<T: A + B>() {}

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions