-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add rustc_deny_explicit_impl
#104339
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add rustc_deny_explicit_impl
#104339
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
cc @fee1-dead, it's not intended for |
yeah, I don't know if the trait system cares about it, but it is best to deny them |
This is technically a breaking change. Should we do a crater run? |
oh, it looks like this doesn't deny any trait on stable. nevermind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not even a ui test change ✨
Just one drive-by and r=me
) | ||
.span_label(impl_header_span, "impl of `Unsize` not allowed") | ||
.emit(); | ||
err.emit(); | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just below, the code swallows feature gate for rustc_specialization_trait
when unboxed_closures
is enabled. Could you remove that also?
91fca17
to
b5b6467
Compare
@bors r=cjgillot |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#103439 (Show note where the macro failed to match) - rust-lang#103734 (Adjust stabilization version to 1.65.0 for wasi fds) - rust-lang#104148 (Visit attributes of trait impl items during AST validation) - rust-lang#104241 (Move most of unwind's build script to lib.rs) - rust-lang#104258 (Deduce closure signature from a type alias `impl Trait`'s supertraits) - rust-lang#104296 (Walk types more carefully in `ProhibitOpaqueTypes` visitor) - rust-lang#104309 (Slightly improve error message for invalid identifier) - rust-lang#104316 (Simplify suggestions for errors in generators.) - rust-lang#104339 (Add `rustc_deny_explicit_impl`) Failed merges: - rust-lang#103484 (Add `rust` to `let_underscore_lock` example) r? `@ghost` `@rustbot` modify labels: rollup
Also adjust
E0322
error message to be more general, since it's used forDiscriminantKind
andPointee
as well.Also add
rustc_deny_explicit_impl
on theTuple
andDestruct
marker traits.