Skip to content

add test for direct-const-arg - #162301

Closed
reddevilmidzy wants to merge 1 commit into
rust-lang:mainfrom
reddevilmidzy:test
Closed

add test for direct-const-arg#162301
reddevilmidzy wants to merge 1 commit into
rust-lang:mainfrom
reddevilmidzy:test

Conversation

@reddevilmidzy

@reddevilmidzy reddevilmidzy commented Sep 4, 2026

Copy link
Copy Markdown
Member

close: #159558

The generic argument count was unrelated to the ICE, so I added a const argument.

cc: @khyperia

@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 Sep 4, 2026
@rustbot

rustbot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
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
  • compiler expanded to 75 candidates
  • Random selection from 19 candidates

@khyperia

khyperia commented Sep 4, 2026

Copy link
Copy Markdown
Member

thanks for adding this test! but it's pretty much an exact duplicate of tests/ui/const-generics/mgca/direct_const_arg-infer-as-type.rs. #159558 should be closed referencing that test.

that file was added in #160216 which states:

add test for direct_const_arg!(_) inferring to a type - this test should have been added in #159058 which added this behavior (well, changed the behavior from an ICE to inferring to a type)

that linked pull is the commit linked in #159558 that fixed that issue.

#160984 is also very relevant here, although not directly related to this very specific ICE!

@reddevilmidzy

Copy link
Copy Markdown
Member Author

thanks for adding this test! but it's pretty much an exact duplicate of tests/ui/const-generics/mgca/direct_const_arg-infer-as-type.rs. #159558 should be closed referencing that test.

that file was added in #160216 which states:

add test for direct_const_arg!(_) inferring to a type - this test should have been added in #159058 which added this behavior (well, changed the behavior from an ICE to inferring to a type)

that linked pull is the commit linked in #159558 that fixed that issue.

#160984 is also very relevant here, although not directly related to this very specific ICE!

Ah, you're right! I only looked at #159058, so I missed the test that was added in a later PR. I'll also take a look at the other PRs you referenced. Thanks!

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 5, 2026
@reddevilmidzy
reddevilmidzy deleted the test branch September 5, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[ICE]: mgca: fn foo() -> S<core::direct_const_arg!(_)>

4 participants