Skip to content
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

rustdoc: synthetic auto: filter out clauses from the implementor's ParamEnv #123638

Merged

Conversation

fmease
Copy link
Member

@fmease fmease commented Apr 8, 2024

... 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

…ramEnv

not just the ones from the elaborated clauses.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 8, 2024
@@ -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();
Copy link
Member Author

@fmease fmease Apr 8, 2024

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:

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,"
Copy link
Member Author

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,

@GuillaumeGomez
Copy link
Member

Awesome, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 9, 2024

📌 Commit 114e88c has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 9, 2024
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2024
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2024
…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
@bors bors merged commit 2e042ea into rust-lang:master Apr 9, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2024
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
@fmease fmease deleted the rustdoc-synth-auto-yeet-item-param-env-clauses branch April 9, 2024 14:23
tamird added a commit to tamird/aya that referenced this pull request Apr 10, 2024
This is roughly a revert of af1a9b3;
see rust-lang/rust#123638.
@tamird
Copy link
Contributor

tamird commented Apr 10, 2024

Thanks! This indeed addressed #123340 (comment).

tamird added a commit to aya-rs/aya that referenced this pull request Apr 10, 2024
This is roughly a revert of af1a9b3;
see rust-lang/rust#123638.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants