Skip to content

remove IsTypeConst from hir::TraitItemKind#157330

Open
josetorrs wants to merge 7 commits into
rust-lang:mainfrom
josetorrs:remove-is-type-const
Open

remove IsTypeConst from hir::TraitItemKind#157330
josetorrs wants to merge 7 commits into
rust-lang:mainfrom
josetorrs:remove-is-type-const

Conversation

@josetorrs

@josetorrs josetorrs commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #152940

following up on #152940 (comment)

r? @BoxyUwU

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 2, 2026
@rustbot

rustbot commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

Comment thread compiler/rustc_hir/src/hir.rs Outdated
Comment on lines +3365 to +3366
// FIXME(mgca) eventually want to move the option that is around `ConstItemRhs<'hir>`
// into `ConstItemRhs`, much like `ast::ConstItemRhsKind`, but for now mark whether
// this node is a TypeConst with a flag.
// into `ConstItemRhs`, much like `ast::ConstItemRhsKind`

@josetorrs josetorrs Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think resolving the FIXME deserves it's own issue, would like to give it a try if there's an appetite for it

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I expect we probably actually have no reason to do this FIXME anymore now that we can get type-constness from the defid

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should we remove this FIXME all together then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah that seems reasonable

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jun 2, 2026
@josetorrs josetorrs marked this pull request as ready for review June 3, 2026 09:25
@rustbot

rustbot commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

The Clippy subtree was changed

cc @rust-lang/clippy

The Miri subtree was changed

cc @rust-lang/miri

@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 Jun 3, 2026

@RalfJung RalfJung Jun 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you accidentally re-format this file...?
Please avoid format-only changes.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah my bad, reverted in 29a658c

@BoxyUwU

BoxyUwU commented Jun 7, 2026

Copy link
Copy Markdown
Member

can you put Fixes #issue in the description so that merging this closes the associated issue? thanks :3

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 7, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 7, 2026
remove `IsTypeConst` from `hir::TraitItemKind`
@rust-bors

rust-bors Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: de700f1 (de700f1a1abf34db2c53c62f6d07cea6fda5e7d2, parent: 43a4909ee98ed4d006d9d773f5d94dc58e34f846)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (de700f1): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Cycles

Results (secondary 3.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.4% [2.7%, 4.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 516.093s -> 515.618s (-0.09%)
Artifact size: 400.83 MiB -> 400.83 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 8, 2026
@josetorrs

Copy link
Copy Markdown
Contributor Author

can you put Fixes #issue in the description so that merging this closes the associated issue?

updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

mGCA: Track whether a const is a type const as part of DefKind

6 participants