-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)C-bugCategory: This is a bug.Category: This is a bug.F-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATs`#![feature(generic_associated_types)]` a.k.a. GATsF-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`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
This code successfully compiles even though it should not (since String: !Copy
).
#![feature(inherent_associated_types)]
#![allow(incomplete_features)]
pub enum Ty {}
impl Ty {
type Pr<T: Copy> = T;
}
const _: Ty::Pr<String> = String::new();
This strongly relates to #104251 which is only about the bounds on the Self type parameter (as I see it, others might disagree). #105961 does not address the issue around inherent GATs and I don't plan to change that (maybe). I consider this issue blocked on #105961 to avoid future merge conflicts.
@rustbot label T-compiler F-inherent_associated_types F-generic_associated_types requires-nightly S-blocked
@rustbot claim
Metadata
Metadata
Assignees
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)C-bugCategory: This is a bug.Category: This is a bug.F-generic_associated_types`#![feature(generic_associated_types)]` a.k.a. GATs`#![feature(generic_associated_types)]` a.k.a. GATsF-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`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.
Type
Projects
Status
Done