-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.P-mediumMedium priorityMedium priorityT-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.T-langRelevant to the language teamRelevant to the language team
Description
Test case:
type Foo<T: Clone> = Option<T>;
fn main() {}
With rustc 1.20.0-nightly (696412d 2017-07-06), output when compiling with --cap-lints=allow
:
warning[E0122]: trait bounds are not (yet) enforced in type definitions
--> a.rs:1:1
|
1 | type Foo<T: Clone> = Option<T>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--cap-lints=allow
correctly stops the dead code / unused type alias warning from being shown, but the trait bounds not enforced warning is shown anyway.
Per #34596 and #40640 (comment), this might be on purpose. I think this is the wrong decision. The point of cap-lints
is to allow Cargo to inhibit warnings in external dependencies. When building Servo it is not useful to spam the console with many warnings, future-proofing or not, about code that Servo has not direct control over.
kennytm and oxalica
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.P-mediumMedium priorityMedium priorityT-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.T-langRelevant to the language teamRelevant to the language team