enum variant ctor inherits stability of variant
This commit is contained in:
parent
569788e47e
commit
b821ce6097
3 changed files with 17 additions and 1 deletions
|
@ -460,7 +460,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
|
||||||
AnnotationKind::Required,
|
AnnotationKind::Required,
|
||||||
InheritDeprecation::Yes,
|
InheritDeprecation::Yes,
|
||||||
InheritConstStability::No,
|
InheritConstStability::No,
|
||||||
InheritStability::No,
|
InheritStability::Yes,
|
||||||
|_| {},
|
|_| {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#![crate_type = "lib"]
|
||||||
|
#![feature(staged_api)]
|
||||||
|
#![stable(feature = "none", since = "1.0")]
|
||||||
|
|
||||||
|
#[stable(feature = "none", since = "1.0")]
|
||||||
|
pub enum Foo {
|
||||||
|
A,
|
||||||
|
}
|
8
src/test/ui/stability-attribute/ctor-stability.rs
Normal file
8
src/test/ui/stability-attribute/ctor-stability.rs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
// aux-build:ctor-stability.rs
|
||||||
|
// check-pass
|
||||||
|
|
||||||
|
extern crate ctor_stability;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let _ = ctor_stability::Foo::A;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue