Skip to content

Remove duplicated Flags methods.#155425

Open
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:rm-dup-Flags-methods
Open

Remove duplicated Flags methods.#155425
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:rm-dup-Flags-methods

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

The Flags trait has two methods: flags and outer_exclusive_binder. Multiple types impl this trait and then also have duplicate inherent methods with the same names; these are all marked with "Think about removing this" comments. This is left over from things being moved into rustc_type_ir.

This commit removes those inherent methods. This requires adding use Flags to a number of files.

r? @lcnr

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 17, 2026

Some changes occurred to the core trait solver

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

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 17, 2026
@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Apr 17, 2026

will be on vacation next week, seems generally good

r? types

@rustbot rustbot added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Apr 17, 2026
@rustbot rustbot assigned nikomatsakis and unassigned lcnr Apr 17, 2026
@rust-bors

This comment has been minimized.

@nnethercote nnethercote force-pushed the rm-dup-Flags-methods branch from caa1c43 to ec5c2d7 Compare April 20, 2026 00:07
@rustbot

This comment has been minimized.

The `Flags` trait has two methods: `flags` and `outer_exclusive_binder`.
Multiple types impl this trait and then also have duplicate inherent
methods with the same names; these are all marked with "Think about
removing this" comments. This is left over from things being moved into
`rustc_type_ir`.

This commit removes those inherent methods. This requires adding `use
Flags` to a number of files.
@nnethercote nnethercote force-pushed the rm-dup-Flags-methods branch from ec5c2d7 to e192eec Compare April 20, 2026 00:25
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 20, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@nikomatsakis
Copy link
Copy Markdown
Contributor

@bors r+ rollup=always

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 21, 2026

📌 Commit e192eec has been approved by nikomatsakis

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 21, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 21, 2026
…r=nikomatsakis

Remove duplicated `Flags` methods.

The `Flags` trait has two methods: `flags` and `outer_exclusive_binder`. Multiple types impl this trait and then also have duplicate inherent methods with the same names; these are all marked with "Think about removing this" comments. This is left over from things being moved into `rustc_type_ir`.

This commit removes those inherent methods. This requires adding `use Flags` to a number of files.

r? @lcnr
rust-bors Bot pushed a commit that referenced this pull request Apr 21, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #155546 (Improve E0308 error message for `impl Trait` return mismatches)
 - #152834 (Fix incorrect `let` to `const` suggestion for pattern bindings)
 - #155425 (Remove duplicated `Flags` methods.)
 - #155547 (Use per-parent disambiguators everywhere)
 - #155590 (Remove AttributeLintKind variants - part 5)
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants