Closed
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.