File tree 2 files changed +21
-3
lines changed
2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 12
12
#[ rustc_const_unstable( feature="foo" , issue = "none" ) ]
13
13
pub const unsafe fn foo ( ) -> u32 { 42 }
14
14
15
- // @has 'foo/fn.foo2.html' '//pre' 'pub fn foo2() -> u32'
15
+ // @has 'foo/fn.foo2.html' '//pre' 'pub const fn foo2() -> u32'
16
16
#[ unstable( feature = "humans" , issue = "none" ) ]
17
17
pub const fn foo2 ( ) -> u32 { 42 }
18
18
@@ -21,7 +21,7 @@ pub const fn foo2() -> u32 { 42 }
21
21
#[ rustc_const_stable( feature = "rust1" , since = "1.0.0" ) ]
22
22
pub const fn bar2 ( ) -> u32 { 42 }
23
23
24
- // @has 'foo/fn.foo2_gated.html' '//pre' 'pub unsafe fn foo2_gated() -> u32'
24
+ // @has 'foo/fn.foo2_gated.html' '//pre' 'pub const unsafe fn foo2_gated() -> u32'
25
25
#[ unstable( feature = "foo2" , issue = "none" ) ]
26
26
pub const unsafe fn foo2_gated ( ) -> u32 { 42 }
27
27
@@ -30,7 +30,7 @@ pub const unsafe fn foo2_gated() -> u32 { 42 }
30
30
#[ rustc_const_stable( feature = "rust1" , since = "1.0.0" ) ]
31
31
pub const unsafe fn bar2_gated ( ) -> u32 { 42 }
32
32
33
- // @has 'foo/fn.bar_not_gated.html' '//pre' 'pub unsafe fn bar_not_gated() -> u32'
33
+ // @has 'foo/fn.bar_not_gated.html' '//pre' 'pub const unsafe fn bar_not_gated() -> u32'
34
34
pub const unsafe fn bar_not_gated ( ) -> u32 { 42 }
35
35
36
36
pub struct Foo ;
Original file line number Diff line number Diff line change
1
+ #![ feature( const_fn) ]
2
+
3
+ // @has 'issue_76501/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32'
4
+ /// A useless function that always returns 1.
5
+ pub const fn bloop ( ) -> i32 {
6
+ 1
7
+ }
8
+
9
+ /// A struct.
10
+ pub struct Struct { }
11
+
12
+ impl Struct {
13
+ // @has 'issue_76501/struct.Struct.html' '//*[@class="method"]' 'pub const fn bloop() -> i32'
14
+ /// A useless function that always returns 1.
15
+ pub const fn bloop ( ) -> i32 {
16
+ 1
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments