Skip to content

Implement RFC 3624 supertrait_item_shadowing (v2) #125782

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

Merged
merged 5 commits into from
Feb 13, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented May 30, 2024

Implements RFC 3624 and the associated lint in the RFC.

Implements:

  • Shadowing algorithm
  • Lint for call-site shadowing (allow by default, gated)
  • Lint for definition-site shadowing (allow by default, gated)

Tracking:

cc @Amanieu and rust-lang/rfcs#3624 and #89151

@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 May 30, 2024
@compiler-errors compiler-errors changed the title Implement RFC 3624 supertrait_item_shadowing Implement RFC 3624 supertrait_item_shadowing (v2) May 30, 2024
@traviscross traviscross added the F-supertrait_item_shadowing `#![feature(supertrait_item_shadowing)]` label May 30, 2024
@bors
Copy link
Collaborator

bors commented Jul 29, 2024

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

@Dylan-DPC Dylan-DPC added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2024
@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch 3 times, most recently from e95db1b to 8665a82 Compare September 19, 2024 01:39
@compiler-errors
Copy link
Member Author

OK, this is ready pending RFC approval.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from 8665a82 to d03f75d Compare September 19, 2024 01:48
@compiler-errors compiler-errors marked this pull request as ready for review September 19, 2024 15:51
@compiler-errors
Copy link
Member Author

The RFC is now in FCP, so this could probably get reviewed preliminarily but should probably not land until the RFC is merged.

r? compiler

@bors
Copy link
Collaborator

bors commented Sep 20, 2024

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

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 20, 2024
@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from d03f75d to ffbb443 Compare October 11, 2024 08:26
@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from ffbb443 to 1ab7845 Compare November 21, 2024 01:42
@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from 1ab7845 to e59cf24 Compare November 21, 2024 04:00
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there’s a few missing words in the lint comments, and maybe some places that say “method” should say “item”?

@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from e59cf24 to 8409aaa Compare January 25, 2025 17:30
@compiler-errors
Copy link
Member Author

@rustbot ready

This PR is ready for review since the corresponding RFC has landed.

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 25, 2025
@BoxyUwU BoxyUwU 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 Feb 10, 2025
@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from 8409aaa to 55afddf Compare February 10, 2025 17:08
@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from 55afddf to 4dbe963 Compare February 10, 2025 17:58
@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from 4dbe963 to af659b4 Compare February 10, 2025 18:57
@bors
Copy link
Collaborator

bors commented Feb 13, 2025

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

@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from af659b4 to 1824221 Compare February 13, 2025 05:41
@compiler-errors
Copy link
Member Author

@bors r=BoxyUwU

@bors
Copy link
Collaborator

bors commented Feb 13, 2025

📌 Commit 1824221 has been approved by BoxyUwU

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 13, 2025
@compiler-errors compiler-errors force-pushed the supertrait-item-shadowing branch from 1824221 to 72b4df3 Compare February 13, 2025 05:45
@compiler-errors
Copy link
Member Author

@bors r=BoxyUwU

@bors
Copy link
Collaborator

bors commented Feb 13, 2025

📌 Commit 72b4df3 has been approved by BoxyUwU

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 13, 2025

⌛ Testing commit 72b4df3 with merge 3cb0272...

@bors
Copy link
Collaborator

bors commented Feb 13, 2025

☀️ Test successful - checks-actions
Approved by: BoxyUwU
Pushing 3cb0272 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 13, 2025
@bors bors merged commit 3cb0272 into rust-lang:master Feb 13, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 13, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3cb0272): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.3%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.3%, secondary -1.0%)

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.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
-3.0% [-3.0%, -3.0%] 1
All ❌✅ (primary) -1.3% [-1.3%, -1.3%] 1

Cycles

Results (primary -2.6%, secondary 2.5%)

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)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

Binary size

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

Bootstrap: 788.303s -> 789.524s (0.15%)
Artifact size: 347.81 MiB -> 347.86 MiB (0.01%)

@compiler-errors compiler-errors deleted the supertrait-item-shadowing branch February 25, 2025 01:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
F-supertrait_item_shadowing `#![feature(supertrait_item_shadowing)]` 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants