Skip to content

Panic on StableHash of a Path with GenericArgs - #163893

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
joshtriplett:ast-path-hash-args
Oct 7, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
joshtriplett:ast-path-hash-args

Conversation

@joshtriplett

Copy link
Copy Markdown
Member

The StableHash implementation for Path is used for attributes, which never have generic args. However, nothing prevents using StableHash for an arbitrary Path that might have generic args. Add a check for this and panic.

Credit to Nick Nethercote (@nnethercote) for catching this.

The `StableHash` implementation for `Path` is used for attributes, which
never have generic args. However, nothing *prevents* using `StableHash`
for an arbitrary `Path` that might have generic args. Add a check for
this and panic.

Credit to Nick Nethercote for catching this.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 6, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 6, 2026
@rustbot

rustbot commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

r? @camelid

rustbot has assigned @camelid.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, parser
  • compiler, parser expanded to 77 candidates
  • Random selection from 18 candidates

@joshtriplett

Copy link
Copy Markdown
Member Author

r? @nnethercote

@rustbot rustbot assigned nnethercote and unassigned camelid Oct 6, 2026
@nnethercote

Copy link
Copy Markdown
Contributor

Thanks for following up!

@bors r+ rollup

@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 308801e has been approved by nnethercote

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 Oct 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…=nnethercote

Panic on `StableHash` of a `Path` with `GenericArgs`

The `StableHash` implementation for `Path` is used for attributes, which never have generic args. However, nothing *prevents* using `StableHash` for an arbitrary `Path` that might have generic args. Add a check for this and panic.

Credit to Nick Nethercote (@nnethercote) for catching this.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…=nnethercote

Panic on `StableHash` of a `Path` with `GenericArgs`

The `StableHash` implementation for `Path` is used for attributes, which never have generic args. However, nothing *prevents* using `StableHash` for an arbitrary `Path` that might have generic args. Add a check for this and panic.

Credit to Nick Nethercote (@nnethercote) for catching this.
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #163887 (Remove `NonOwner` variant from `AstOwner`)
 - #163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - #162156 (add IBM f128 type)
 - #163925 (Submodule update of rustc-perf)
 - #163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - #163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - #163874 (explicitly check for fresh vars in canonicalize)
 - #163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - #163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - #163894 (revisions for TAIT in env bug)
 - #163902 (Clean up Reference annotations that drifted)
 - #163905 (Remove redundant closure in bootstrap)
 - #163921 (abby DSL: implement ambiguity)
 - #163927 (abby DSL: change `where` syntax to `predicates`)
 - #163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - #163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
@rust-bors
rust-bors Bot merged commit e49979e into rust-lang:main Oct 7, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 7, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
Rollup merge of #163893 - joshtriplett:ast-path-hash-args, r=nnethercote

Panic on `StableHash` of a `Path` with `GenericArgs`

The `StableHash` implementation for `Path` is used for attributes, which never have generic args. However, nothing *prevents* using `StableHash` for an arbitrary `Path` that might have generic args. Add a check for this and panic.

Credit to Nick Nethercote (@nnethercote) for catching this.
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Oct 8, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
@joshtriplett
joshtriplett deleted the ast-path-hash-args branch October 8, 2026 06:45
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Oct 8, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
makai410 pushed a commit to makai410/rustc_public that referenced this pull request Oct 9, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants