Skip to content

MGCA: Support literals as direct const arguments - #150699

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Human9000-bit:literals-as-direct-const-args
Jan 9, 2026
Merged

MGCA: Support literals as direct const arguments#150699
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Human9000-bit:literals-as-direct-const-args

Conversation

@Human9000-bit

Copy link
Copy Markdown
Member

Fixes#150168

  • initial changes for mcga literals
  • rustfmt

r? @BoxyUwU

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. labels Jan 5, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

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

@Human9000-bit

Human9000-bit commented Jan 5, 2026

Copy link
Copy Markdown
MemberAuthor

rn this is very basic changes, lots of todo!() s
took me some time to figure out what to do

@rust-log-analyzer

This comment has been minimized.

@BoxyUwUBoxyUwU left a comment

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.

This is looking good already! You've touched pretty much everywhere that will be necessary for this change so it's only filling out these todo!s now :)

View changes since this review

Comment threadcompiler/rustc_hir/src/hir.rs Outdated
Comment threadcompiler/rustc_ast_lowering/src/lib.rs Outdated
Comment threadcompiler/rustc_hir/src/intravisit.rs Outdated
Comment threadcompiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
Comment threadcompiler/rustc_hir_pretty/src/lib.rs Outdated
Comment threadsrc/librustdoc/clean/mod.rs Outdated
Comment threadsrc/librustdoc/clean/mod.rs Outdated
@Human9000-bit
Human9000-bit marked this pull request as ready for review January 6, 2026 11:35
@rustbotrustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 6, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbotrustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 6, 2026
@rustbot

This comment has been minimized.

@rustbotrustbot added the has-merge-commits PR has merge commits, merge with caution. label Jan 6, 2026
@Human9000-bit

Copy link
Copy Markdown
MemberAuthor

too bad I have made a merge commit

@rust-log-analyzer

This comment has been minimized.

@Human9000-bit
Human9000-bitforce-pushed the literals-as-direct-const-args branch from acd1271 to 78149e6CompareJanuary 6, 2026 12:31
@rustbot

This comment has been minimized.

@rustbotrustbot removed the has-merge-commits PR has merge commits, merge with caution. label Jan 6, 2026
@Human9000-bit
Human9000-bit marked this pull request as draft January 6, 2026 12:31
@rustbotrustbot 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 6, 2026
@Human9000-bit
Human9000-bitforce-pushed the literals-as-direct-const-args branch 2 times, most recently from d60c5dd to 37f084aCompareJanuary 6, 2026 13:05
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Comment threadcompiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs Outdated
@Human9000-bit

Human9000-bit commented Jan 8, 2026

Copy link
Copy Markdown
MemberAuthor

😅 I've noticed i named it MCGA instead of MGCA

@Human9000-bit
Human9000-bitforce-pushed the literals-as-direct-const-args branch from 1d10a8f to 9f3956fCompareJanuary 8, 2026 15:29
Comment threadcompiler/rustc_hir/src/intravisit.rs
@BoxyUwU

Copy link
Copy Markdown
Member

@bors r+ rollup

there's definitely follow up work here:

  • negated literals (important for isize const generics)
  • lit_to_const is very ICEy on wrong types and we should have proper diagnostics

so if you're interested in doing more work here that'd be very cool :)

@rust-borsrust-borsBot 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 8, 2026
@rust-bors

rust-borsBot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9f3956f has been approved by BoxyUwU

It is now in the queue for this repository.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
rust-borsBot added a commit that referenced this pull request Jan 8, 2026
Rollup of 12 pull requests
Successful merges:
- #149961 (tidy: add if-installed prefix condition to extra checks system)
- #150475 (std: sys: fs: uefi: Implement initial File)
- #150533 (std: sys: fs: uefi: Implement remove_dir_all)
- #150549 (fix missing_panics_doc in `std::os::fd::owned`)
- #150699 (MGCA: Support literals as direct const arguments)
- #150721 (Deprecated doc intra link)
- #150752 (Update libc to v0.2.180)
- #150802 (Minor cleanups to fn_abi_new_uncached)
- #150803 (compiler-builtins subtree update)
- #150809 (Update `literal-escaper` version to `0.0.7`)
- #150811 (Store defids instead of symbol names in the aliases list)
- #150825 (Query associated_item_def_ids when needed)
r? @ghost
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
…oxyUwU
MGCA: Support literals as direct const arguments
Fixes [rust-lang#150168](rust-lang#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
This was referenced Jan 8, 2026
rust-borsBot added a commit that referenced this pull request Jan 8, 2026
Rollup of 11 pull requests
Successful merges:
- #149961 (tidy: add if-installed prefix condition to extra checks system)
- #150475 (std: sys: fs: uefi: Implement initial File)
- #150533 (std: sys: fs: uefi: Implement remove_dir_all)
- #150549 (fix missing_panics_doc in `std::os::fd::owned`)
- #150699 (MGCA: Support literals as direct const arguments)
- #150721 (Deprecated doc intra link)
- #150802 (Minor cleanups to fn_abi_new_uncached)
- #150803 (compiler-builtins subtree update)
- #150809 (Update `literal-escaper` version to `0.0.7`)
- #150811 (Store defids instead of symbol names in the aliases list)
- #150825 (Query associated_item_def_ids when needed)
r? @ghost
@rust-bors
rust-borsBot merged commit cb3b2d8 into rust-lang:mainJan 9, 2026
11 checks passed
@rustbotrustbot added this to the 1.94.0 milestone Jan 9, 2026
rust-timer added a commit that referenced this pull request Jan 9, 2026
Rollup merge of #150699 - literals-as-direct-const-args, r=BoxyUwU
MGCA: Support literals as direct const arguments
Fixes [#150168](#150618)
- **initial changes for mcga literals**
- **rustfmt**
r? @BoxyUwU
github-actionsBot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Jan 29, 2026
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#149961 (tidy: add if-installed prefix condition to extra checks system)
- rust-lang/rust#150475 (std: sys: fs: uefi: Implement initial File)
- rust-lang/rust#150533 (std: sys: fs: uefi: Implement remove_dir_all)
- rust-lang/rust#150549 (fix missing_panics_doc in `std::os::fd::owned`)
- rust-lang/rust#150699 (MGCA: Support literals as direct const arguments)
- rust-lang/rust#150721 (Deprecated doc intra link)
- rust-lang/rust#150802 (Minor cleanups to fn_abi_new_uncached)
- rust-lang/rust#150803 (compiler-builtins subtree update)
- rust-lang/rust#150809 (Update `literal-escaper` version to `0.0.7`)
- rust-lang/rust#150811 (Store defids instead of symbol names in the aliases list)
- rust-lang/rust#150825 (Query associated_item_def_ids when needed)
r? @ghost
tgross35 pushed a commit to rust-lang/compiler-builtins that referenced this pull request Jan 31, 2026
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#149961 (tidy: add if-installed prefix condition to extra checks system)
- rust-lang/rust#150475 (std: sys: fs: uefi: Implement initial File)
- rust-lang/rust#150533 (std: sys: fs: uefi: Implement remove_dir_all)
- rust-lang/rust#150549 (fix missing_panics_doc in `std::os::fd::owned`)
- rust-lang/rust#150699 (MGCA: Support literals as direct const arguments)
- rust-lang/rust#150721 (Deprecated doc intra link)
- rust-lang/rust#150802 (Minor cleanups to fn_abi_new_uncached)
- rust-lang/rust#150803 (compiler-builtins subtree update)
- rust-lang/rust#150809 (Update `literal-escaper` version to `0.0.7`)
- rust-lang/rust#150811 (Store defids instead of symbol names in the aliases list)
- rust-lang/rust#150825 (Query associated_item_def_ids when needed)
r? @ghost
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#149961 (tidy: add if-installed prefix condition to extra checks system)
- rust-lang/rust#150475 (std: sys: fs: uefi: Implement initial File)
- rust-lang/rust#150533 (std: sys: fs: uefi: Implement remove_dir_all)
- rust-lang/rust#150549 (fix missing_panics_doc in `std::os::fd::owned`)
- rust-lang/rust#150699 (MGCA: Support literals as direct const arguments)
- rust-lang/rust#150721 (Deprecated doc intra link)
- rust-lang/rust#150802 (Minor cleanups to fn_abi_new_uncached)
- rust-lang/rust#150803 (compiler-builtins subtree update)
- rust-lang/rust#150809 (Update `literal-escaper` version to `0.0.7`)
- rust-lang/rust#150811 (Store defids instead of symbol names in the aliases list)
- rust-lang/rust#150825 (Query associated_item_def_ids when needed)
r? @ghost
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant 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: Support literals as direct const arguments

5 participants

@Human9000-bit@rustbot@rust-log-analyzer@BoxyUwU@camelid