mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
421a94fc88
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
```