mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Removed/Updated some cases and simplified match
This commit is contained in:
parent
c4396f476e
commit
0d69a02c31
@ -1284,7 +1284,7 @@ crate fn print_constness_with_space(
|
||||
)
|
||||
| (hir::Constness::Const, None) => "const ",
|
||||
// const unstable or not const
|
||||
(hir::Constness::Const, _) | (hir::Constness::NotConst, _) => "",
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,51 +20,32 @@ pub const fn foo() -> u32 { 42 }
|
||||
pub const unsafe fn foo_unsafe() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2.html' '//pre' 'pub const fn foo2() -> u32'
|
||||
// @!has - '//span[@class="since"]'
|
||||
#[unstable(feature = "humans", issue = "none")]
|
||||
pub const fn foo2() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2_unsafe.html' '//pre' 'pub const unsafe fn foo2_unsafe() -> u32'
|
||||
#[unstable(feature = "humans", issue = "none")]
|
||||
pub const unsafe fn foo2_unsafe() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar2.html' '//pre' 'pub const fn bar2() -> u32'
|
||||
// @has - //span '1.0.0 (const: 1.0.0)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
|
||||
pub const fn bar2() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar2_unsafe.html' '//pre' 'pub const unsafe fn bar2_unsafe() -> u32'
|
||||
// @has - //span '1.0.0 (const: 1.0.0)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
|
||||
pub const unsafe fn bar2_unsafe() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2_gated.html' '//pre' 'pub const fn foo2_gated() -> u32'
|
||||
// @!has - '//span[@class="since"]'
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
pub const fn foo2_gated() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2_gated_unsafe.html' '//pre' 'pub const unsafe fn foo2_gated_unsafe() -> u32'
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
pub const unsafe fn foo2_gated_unsafe() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar2_gated.html' '//pre' 'pub const fn bar2_gated() -> u32'
|
||||
// @has - '//span[@class="since"]' '1.0.0 (const: 1.0.0)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
|
||||
pub const fn bar2_gated() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar2_gated_unsafe.html' '//pre' 'pub const unsafe fn bar2_gated_unsafe() -> u32'
|
||||
// @has - '//span[@class="since"]' '1.0.0 (const: 1.0.0)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
|
||||
pub const unsafe fn bar2_gated_unsafe() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar_not_gated.html' '//pre' 'pub const fn bar_not_gated() -> u32'
|
||||
// @!has - '//span[@class="since"]'
|
||||
pub const fn bar_not_gated() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar_not_gated_unsafe.html' '//pre' 'pub const unsafe fn bar_not_gated_unsafe() -> u32'
|
||||
pub const unsafe fn bar_not_gated_unsafe() -> u32 { 42 }
|
||||
|
||||
pub struct Foo;
|
||||
|
||||
impl Foo {
|
||||
@ -85,10 +66,4 @@ impl Foo {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "rust1", since = "1.2.0")]
|
||||
pub const fn stable_impl() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/struct.Foo.html' '//div[@id="method.stable_impl_unsafe"]/code' 'pub const unsafe fn stable_impl_unsafe() -> u32'
|
||||
// @has - '//span[@class="since"]' '1.0.0 (const: 1.2.0)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "rust1", since = "1.2.0")]
|
||||
pub const unsafe fn stable_impl_unsafe() -> u32 { 42 }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user