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

Skip possible where_clause_object_safety lints when checking multiple_supertrait_upcastable #106253

Merged
merged 4 commits into from
Jan 29, 2023

Conversation

nbdd0121
Copy link
Contributor

Fix #106247

To achieve this, I lifted the WhereClauseReferencesSelf out from object_safety_violations and move it into is_object_safe (which is changed to a new query).

cc @dtolnay
r? @compiler-errors

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 29, 2022
@bors
Copy link
Contributor

bors commented Dec 31, 2022

☔ The latest upstream changes (presumably #106324) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

This needs a rebase just to add the lint back. I think the changes look fine, maybe is_object_safe needs to be renamed so it can reflect the fact that it has side-effects ("check_is_object_safe"?)

@compiler-errors
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 27, 2023
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Jan 28, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 28, 2023

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@nbdd0121
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 28, 2023
@compiler-errors
Copy link
Member

Looks good to me!

@bors r+

@bors
Copy link
Contributor

bors commented Jan 28, 2023

📌 Commit 66f3ab9 has been approved by compiler-errors

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 Jan 28, 2023
@bors
Copy link
Contributor

bors commented Jan 29, 2023

⌛ Testing commit 66f3ab9 with merge d117135...

@bors
Copy link
Contributor

bors commented Jan 29, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing d117135 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Jan 29, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing d117135 to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Jan 29, 2023
@bors bors merged commit d117135 into rust-lang:master Jan 29, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 29, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d117135): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [1.4%, 1.8%] 2
Improvements ✅
(primary)
-2.8% [-2.8%, -2.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.8% [-2.8%, -2.8%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) - - 0

@nbdd0121 nbdd0121 deleted the upcast branch April 13, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

where_clauses_object_safety regression on a trait where it shouldn't trigger
5 participants