enum variant ctor inherits stability of variant
This commit is contained in:
parent
569788e47e
commit
b821ce6097
@ -460,7 +460,7 @@ fn visit_variant(&mut self, var: &'tcx Variant<'tcx>) {
|
||||
AnnotationKind::Required,
|
||||
InheritDeprecation::Yes,
|
||||
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…
Reference in New Issue
Block a user