-
Notifications
You must be signed in to change notification settings - Fork 13.5k
add #![rustc_no_implicit_bounds] #142671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add #![rustc_no_implicit_bounds] #142671
Conversation
HIR ty lowering was modified cc @fmease |
tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs
Show resolved
Hide resolved
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.
r=me on the rustc impl. I personally feel like applying this attribute in some of the tests makes them worse 🤔 if u want I can check out your PR locally, reset the last commit and manually only readd the tests where I consider the attribute to be useful
fabf44b
to
d746230
Compare
Sure, go ahead :) |
Adds a new `rustc_attrs` attribute that stops rustc from adding any default bounds. Useful for tests where default bounds just add noise and make debugging harder.
d746230
to
22a9327
Compare
After reviewing all tests with `?Sized` and discussing with lcnr, these tests seem like they could probably benefit from `#![rustc_no_implicit_bounds]`.
22a9327
to
1fd13fd
Compare
Had a chat with @lcnr and using the attribute now in just the tests that we think are improvements. |
@bors r=lcnr rollup |
Rollup of 10 pull requests Successful merges: - #142270 (Rustdoc js: even more typechecking improvements) - #142420 (Report infer ty errors during hir ty lowering) - #142671 (add #![rustc_no_implicit_bounds]) - #142721 (Add tracing to `InterpCx::layout_of()` ) - #142818 (Port `#[used]` to new attribute parsing infrastructure) - #143020 (codegen_fn_attrs: make comment more precise) - #143051 (Add tracing to `validate_operand`) - #143060 (Only args in main diag are saved and restored without removing the newly added ones) - #143065 (Improve recovery when users write `where:`) - #143084 (const-eval: error when initializing a static writes to that static) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142671 - davidtwco:no-default-bounds-attr, r=lcnr add #![rustc_no_implicit_bounds] Follow-up from #137944. Adds a new `rustc_attrs` attribute that stops rustc from adding any default bounds. Useful for tests where default bounds just add noise and make debugging harder. After reviewing all tests with `?Sized`, these tests seem like they could probably benefit from `#![rustc_no_implicit_bounds]`. - Skipping most of `tests/ui/unsized` as these seem to want to test `?Sized` - Skipping tests that used `Box<T>` because it's still bound by `T: MetaSized` - Skipping parsing or other tests that cared about `?Sized` syntactically - Skipping tests for `derive(CoercePointee)` because this appears to check that the pointee type is relaxed with `?Sized` explicitly r? `@lcnr`
Rollup of 10 pull requests Successful merges: - rust-lang/rust#142270 (Rustdoc js: even more typechecking improvements) - rust-lang/rust#142420 (Report infer ty errors during hir ty lowering) - rust-lang/rust#142671 (add #![rustc_no_implicit_bounds]) - rust-lang/rust#142721 (Add tracing to `InterpCx::layout_of()` ) - rust-lang/rust#142818 (Port `#[used]` to new attribute parsing infrastructure) - rust-lang/rust#143020 (codegen_fn_attrs: make comment more precise) - rust-lang/rust#143051 (Add tracing to `validate_operand`) - rust-lang/rust#143060 (Only args in main diag are saved and restored without removing the newly added ones) - rust-lang/rust#143065 (Improve recovery when users write `where:`) - rust-lang/rust#143084 (const-eval: error when initializing a static writes to that static) r? `@ghost` `@rustbot` modify labels: rollup
Follow-up from #137944.
Adds a new
rustc_attrs
attribute that stops rustc from adding any default bounds. Useful for tests where default bounds just add noise and make debugging harder.After reviewing all tests with
?Sized
, these tests seem like they could probably benefit from#![rustc_no_implicit_bounds]
.tests/ui/unsized
as these seem to want to test?Sized
Box<T>
because it's still bound byT: MetaSized
?Sized
syntacticallyderive(CoercePointee)
because this appears to check that the pointee type is relaxed with?Sized
explicitlyr? @lcnr