-
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
base: master
Are you sure you want to change the base?
add #![rustc_no_implicit_bounds] #142671
Conversation
HIR ty lowering was modified cc @fmease |
|
||
#![feature(rustc_attrs)] | ||
#![rustc_no_implicit_bounds] | ||
|
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.
for unsize coercions/trait object coercions test, the attribute makes them a bit confusing/harder to read for me 🤔
so maybe only limit the attribute to tests for the trait solver 🤔
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.
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
d746230
to
22a9327
Compare
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