]> git.lizzy.rs Git - rust.git/blob - src/test/ui/stability-attribute/stability-attribute-implies-using-unstable.rs
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / stability-attribute / stability-attribute-implies-using-unstable.rs
1 // aux-build:stability-attribute-implies.rs
2 #![deny(stable_features)]
3 #![feature(foo)]
4 //~^ ERROR the feature `foo` has been partially stabilized since 1.62.0 and is succeeded by the feature `foobar`
5
6 // Tests that the use of `implied_by` in the `#[unstable]` attribute results in a diagnostic
7 // mentioning partial stabilization and that given the implied unstable feature is used (there is a
8 // `foobar` call), that the compiler suggests changing to that feature and doesn't error about its
9 // use.
10
11 extern crate stability_attribute_implies;
12 use stability_attribute_implies::{foo, foobar};
13
14 fn main() {
15     foo();
16     foobar(); // no error!
17 }