Files
Jonathan Brouwer 421a94fc88 Rollup merge of #154481 - ferrocene:hoverbear/flag-off-unused-code, r=wesleywiser
Mark a function only used in nightly as nightly only

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:

https://github.com/rust-lang/rust/blob/fda6d37bb88ee12fd50fa54d15859f1f91b74f55/compiler/rustc_abi/src/callconv.rs#L52

https://github.com/rust-lang/rust/blob/fda6d37bb88ee12fd50fa54d15859f1f91b74f55/compiler/rustc_abi/src/callconv.rs#L131

https://github.com/rust-lang/rust/blob/fda6d37bb88ee12fd50fa54d15859f1f91b74f55/compiler/rustc_abi/src/callconv.rs#L167

This does the flag off.

Test on `main` and this branch:

```
./x.py test rustc_next_trait_solver
```
2026-04-23 09:38:23 +02:00
..