Skip to content

Mark a function only used in nightly as nightly only#154481

Open
Hoverbear wants to merge 1 commit intorust-lang:mainfrom
ferrocene:hoverbear/flag-off-unused-code
Open

Mark a function only used in nightly as nightly only#154481
Hoverbear wants to merge 1 commit intorust-lang:mainfrom
ferrocene:hoverbear/flag-off-unused-code

Conversation

@Hoverbear
Copy link
Copy Markdown
Contributor

If you run ./x.py test rustc_next_trait_solver you'll currently see a failure:

warning: method `merge` is never used
  --> compiler/rustc_abi/src/callconv.rs:38:8
   |
25 | impl HomogeneousAggregate {
   | ------------------------- method in this implementation
...
38 |     fn merge(self, other: HomogeneousAggregate) -> Result<HomogeneousAggregate, Heterogeneous> {
   |        ^^^^^
   |
   = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: `rustc_abi` (lib) generated 1 warning

This is because the usages are behind a nightly feature flag:

#[cfg(feature = "nightly")]

result = result.merge(field.homogeneous_aggregate(cx)?)?;

result = result.merge(variant_result)?;

This does the flag off.

Test on main and this branch:

./x.py test rustc_next_trait_solver

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 27, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 27, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 27, 2026

r? @wesleywiser

rustbot has assigned @wesleywiser.
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: codegen, compiler
  • codegen, compiler expanded to 69 candidates
  • Random selection from 12 candidates

Hoverbear added a commit to ferrocene/ferrocene that referenced this pull request Mar 27, 2026
@Hoverbear Hoverbear changed the title Mark code only used in nightly as nightly only Mark a function only used in nightly as nightly only Mar 27, 2026
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-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.

3 participants