-
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
Take supertraits into account when calculating associated types #55687
Conversation
This comment has been minimized.
This comment has been minimized.
(If someone else would rather take it, feel free to r? yourself, per above.) |
This comment has been minimized.
This comment has been minimized.
@craterbot run start=6cfc6033955dd2685dfa7baeec6f6bc3bfdfe2f1 end=6cfc6033955dd2685dfa7baeec6f6bc3bfdfe2f1+rustflags=-Dduplicate_associated_type_bindings mode=check-only |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
This comment has been minimized.
This comment has been minimized.
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.
First pass, will review in detail when back on a pc
Uh, woops. @craterbot abort |
🗑️ Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Wrong commit hash... @craterbot run start=24e66c28980442a48d9458f1a4f9b76cc722dc8a end=24e66c28980442a48d9458f1a4f9b76cc722dc8a+rustflags=-Dduplicate_associated_type_bindings mode=check-only |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@craterbot abort |
🗑️ Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
...forgot this is not my local branch... @craterbot run start=master#24e66c28980442a48d9458f1a4f9b76cc722dc8a end=master#24e66c28980442a48d9458f1a4f9b76cc722dc8a+rustflags=-Dduplicate_associated_type_bindings mode=check-only |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Seems like @scalexm is on this? =) |
92ac02a
to
19d71f2
Compare
This comment has been minimized.
This comment has been minimized.
🎉 Experiment
|
5825653
to
4c1d24a
Compare
This has been replaced by the hard error E0719.
@bors r+ |
📌 Commit 90a1438 has been approved by |
Take supertraits into account when calculating associated types Fixes rust-lang#24010 and rust-lang#23856. Applies to trait aliases too. As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See rust-lang#50589 for more info. I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+. N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this. CC @carllerche @theemathas @durka @mbrubeck
Rollup of 17 pull requests Successful merges: - #55630 (resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition) - #55687 (Take supertraits into account when calculating associated types) - #55745 (Convert `outlives_components`' return value to a `SmallVec` outparam.) - #55764 (Fix Rc/Arc allocation layout) - #55792 (Prevent ICE in const-prop array oob check) - #55799 (Removed unneeded instance of `// revisions` from a lint test) - #55800 (Fix ICE in `return_type_impl_trait`) - #55801 (NLL: Update box insensitivity test) - #55802 (Don't inline virtual calls (take 2)) - #55816 (Use `SmallVec` to avoid allocations in `from_decimal_string`.) - #55819 (Typecheck patterns of all match arms first, so we get types for bindings) - #55822 (ICE with #![feature(nll)] and elided lifetimes) - #55828 (Add missing `rustc_promotable` attribute to unsigned `min_value` and `max_value`) - #55839 (Fix docstring spelling mistakes) - #55844 (Fix documentation typos.) - #55845 (Set BINARYEN_TRAP_MODE=clamp) - #55856 (rustdoc: refactor: move all static-file include!s into a single module)
Fixes #24010 and #23856. Applies to trait aliases too.
As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See #50589 for more info.
I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+.
N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this.
CC @carllerche @theemathas @durka @mbrubeck