-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.
Description
type Foo<T>
where
Self: Clone,
= Vec<T>;
results in
error[E0411]: cannot find type `Self` in this scope
--> src/lib.rs:3:5
|
3 | Self: Clone,
| ^^^^ `Self` is only available in impls, traits, and type definitions
it may makes sense to add a "forbidden" rib to type aliases which contains Self
and emits a better error for this or at least adds a note like "Self
cannot be used to refer to type aliases"
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.