-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Implement negative bounds for internal testing purposes #110791
Conversation
@@ -1,16 +1,16 @@ | |||
// run-rustfix |
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.
I removed the logic that suggested to just remove the negative bounds :/
It was more complicated than it was worth... though I guess I could add it back if the reviewer desires.
This is probably ready for initial review. This is an internal-only feature (...for now), so I'm assuming that it doesn't need T-lang support (though cc @rust-lang/lang if anyone disagrees). I wish I could've added support via a r? types |
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
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.
Looks good to me.
Would prefer if someone else takes a look at this too.
r? types
No concerns from me about this going in feature-gated. We have https://github.com/rust-lang/negative-impls-initiative too, so experimentation in related places seems like it can be considered approved. |
fbd607d
to
6fca051
Compare
@bors r+ |
Rollup of 11 pull requests Successful merges: - rust-lang#107978 (Correctly convert an NT path to a Win32 path in `read_link`) - rust-lang#110436 (Support loading version information from xz tarballs) - rust-lang#110791 (Implement negative bounds for internal testing purposes) - rust-lang#110874 (Adjust obligation cause code for `find_and_report_unsatisfied_index_impl`) - rust-lang#110908 (resolve: One more attempt to simplify `module_children`) - rust-lang#110943 (interpret: fail more gracefully on uninit unsized locals) - rust-lang#111062 (Don't bail out early when checking invalid `repr` attr) - rust-lang#111069 (remove pointless `FIXME` in `bootstrap::download`) - rust-lang#111086 (Remove `MemEncoder`) - rust-lang#111097 (Avoid ICEing miri on layout query cycles) - rust-lang#111112 (Add some triagebot notifications for nnethercote.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Implements partial support the
!
negative polarity on trait bounds. This is incomplete, but should allow us to at least be able to play with the feature.Not even gonna consider them as a public-facing feature, but I'm implementing them because would've been nice to have in UI tests, for example in #110671.