-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv #123638
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
rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv #123638
Conversation
…ramEnv not just the ones from the elaborated clauses.
@@ -168,7 +168,7 @@ fn clean_param_env<'tcx>( | |||
|
|||
// FIXME(#111101): Incorporate the explicit predicates of the item here... | |||
let item_predicates: FxIndexSet<_> = | |||
tcx.predicates_of(item_def_id).predicates.iter().map(|(pred, _)| pred).collect(); | |||
tcx.param_env(item_def_id).caller_bounds().iter().collect(); |
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.
This is basically a smol revert. Before my refactoring PR it looked very similar:
rust/src/librustdoc/clean/auto_trait.rs
Line 442 in da01cce
let orig_bounds: FxHashSet<_> = tcx.param_env(item_def_id).caller_bounds().iter().collect(); |
|
||
// @has supertrait_bounds/struct.Type.html | ||
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ | ||
// "impl<T> Send for Type<T>where T: Send," |
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.
On master, this gets rendered as:
impl<T> Send for Type<T>where T: Copy + Clone + 'static + Send,
Once/if I fix #111101 (might need an FCP, not sure), this will get rendered as:
impl<T> Send for Type<T>where T: Bound + Send,
Awesome, thanks! @bors r+ rollup |
…m-param-env-clauses, r=GuillaumeGomez rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv ... not just the elaborated clauses. Fixes another regression introduced by me in rust-lang#123340, oops! Fixes rust-lang#123340 (comment), cc `@tamird.` An earlier local iteration of branch `rustdoc-simplify-auto-trait-impl-synth` (PR rust-lang#123340) contained a fix for issue rust-lang#111101 before I decided to limit the scope. I must've introduced this bug when manually reverting that part of the code. r? `@GuillaumeGomez` or rustdoc
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#123485 (macOS: Use `libc` definitions for copyfile) - rust-lang#123633 (Store all args in the unsupported Command implementation) - rust-lang#123638 (rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv) - rust-lang#123653 (Split `non_local_definitions` lint tests in separate test files) - rust-lang#123662 (Don't rely on upvars being assigned just because coroutine-closure kind is assigned) - rust-lang#123665 (Fix typo in `Future::poll()` docs) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#123254 (Do not allocate for ZST ThinBox (attempt 2 using const_allocate)) - rust-lang#123626 (Add MC/DC support to coverage test tools) - rust-lang#123638 (rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv) - rust-lang#123653 (Split `non_local_definitions` lint tests in separate test files) - rust-lang#123658 (Stop making any assumption about the projections applied to the upvars in the `ByMoveBody` pass) - rust-lang#123662 (Don't rely on upvars being assigned just because coroutine-closure kind is assigned) - rust-lang#123665 (Fix typo in `Future::poll()` docs) - rust-lang#123672 (compiletest: unset `RUSTC_LOG_COLOR`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123638 - fmease:rustdoc-synth-auto-yeet-item-param-env-clauses, r=GuillaumeGomez rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv ... not just the elaborated clauses. Fixes another regression introduced by me in rust-lang#123340, oops! Fixes rust-lang#123340 (comment), cc ``@tamird.`` An earlier local iteration of branch `rustdoc-simplify-auto-trait-impl-synth` (PR rust-lang#123340) contained a fix for issue rust-lang#111101 before I decided to limit the scope. I must've introduced this bug when manually reverting that part of the code. r? ``@GuillaumeGomez`` or rustdoc
This is roughly a revert of af1a9b3; see rust-lang/rust#123638.
Thanks! This indeed addressed #123340 (comment). |
This is roughly a revert of af1a9b3; see rust-lang/rust#123638.
... not just the elaborated clauses.
Fixes another regression introduced by me in #123340, oops!
Fixes #123340 (comment), cc @tamird.
An earlier local iteration of branch
rustdoc-simplify-auto-trait-impl-synth
(PR #123340) included a fix for issue #111101 before I decided to limit the scope of the patch. I must've introduced this bug when manually reverting that part of the code.r? @GuillaumeGomez or rustdoc