Auto merge of #74936 - GuillaumeGomez:const-rustc_const_unstable, r=jyn514
Don't print "const" keyword on non-nightly build if rustc_const_unstable is used on the item Fixes #74579.
This commit is contained in:
commit
1275cc15d6
2 changed files with 32 additions and 5 deletions
|
|
@ -32,3 +32,12 @@ pub const unsafe fn bar2_gated() -> u32 { 42 }
|
|||
|
||||
// @has 'foo/fn.bar_not_gated.html' '//pre' 'pub unsafe fn bar_not_gated() -> u32'
|
||||
pub const unsafe fn bar_not_gated() -> u32 { 42 }
|
||||
|
||||
pub struct Foo;
|
||||
|
||||
impl Foo {
|
||||
// @has 'foo/struct.Foo.html' '//h4[@id="method.gated"]/code' 'pub unsafe fn gated() -> u32'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature="foo", issue = "none")]
|
||||
pub const unsafe fn gated() -> u32 { 42 }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue