5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -766,6 +766,7 @@ impl fmt::Display for AbiSpace {
766
766
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
767
767
match self . 0 {
768
768
Abi :: Rust => Ok ( ( ) ) ,
769
+ Abi :: C => write ! ( f, "extern " ) ,
769
770
abi => write ! ( f, "extern "{}" " , abi. name( ) ) ,
770
771
}
771
772
}
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ impl Foo {
18
18
pub fn rust0 ( ) { }
19
19
// @has - '//code' 'fn rust1()'
20
20
pub extern "Rust" fn rust1 ( ) { }
21
- // @has - '//code' 'extern "C" fn c0()'
21
+ // @has - '//code' 'extern fn c0()'
22
22
pub extern fn c0 ( ) { }
23
- // @has - '//code' 'extern "C" fn c1()'
23
+ // @has - '//code' 'extern fn c1()'
24
24
pub extern "C" fn c1 ( ) { }
25
25
// @has - '//code' 'extern "system" fn system0()'
26
26
pub extern "system" fn system0 ( ) { }
@@ -31,7 +31,7 @@ pub trait Bar {}
31
31
32
32
// @has - '//code' 'impl Bar for fn()'
33
33
impl Bar for fn ( ) { }
34
- // @has - '//code' 'impl Bar for extern "C" fn()'
34
+ // @has - '//code' 'impl Bar for extern fn()'
35
35
impl Bar for extern fn ( ) { }
36
36
// @has - '//code' 'impl Bar for extern "system" fn()'
37
37
impl Bar for extern "system" fn ( ) { }
Original file line number Diff line number Diff line change 13
13
14
14
extern crate rustdoc_ffi as lib;
15
15
16
- // @has ffi/fn.foreigner.html //pre 'pub unsafe extern "C" fn foreigner(cold_as_ice: u32)'
16
+ // @has ffi/fn.foreigner.html //pre 'pub unsafe extern fn foreigner(cold_as_ice: u32)'
17
17
pub use lib:: foreigner;
18
18
19
19
extern "C" {
20
- // @has ffi/fn.another.html //pre 'pub unsafe extern "C" fn another(cold_as_ice: u32)'
20
+ // @has ffi/fn.another.html //pre 'pub unsafe extern fn another(cold_as_ice: u32)'
21
21
pub fn another ( cold_as_ice : u32 ) ;
22
22
}
Original file line number Diff line number Diff line change 10
10
11
11
extern {
12
12
// @has issue_22038/fn.foo1.html \
13
- // '//*[@class="rust fn"]' 'pub unsafe extern "C" fn foo1()'
13
+ // '//*[@class="rust fn"]' 'pub unsafe extern fn foo1()'
14
14
pub fn foo1 ( ) ;
15
15
}
16
16
@@ -21,7 +21,7 @@ extern "system" {
21
21
}
22
22
23
23
// @has issue_22038/fn.bar.html \
24
- // '//*[@class="rust fn"]' 'pub extern "C" fn bar()'
24
+ // '//*[@class="rust fn"]' 'pub extern fn bar()'
25
25
pub extern fn bar ( ) { }
26
26
27
27
// @has issue_22038/fn.baz.html \
Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
extern "C" {
12
- // @has variadic/fn.foo.html //pre 'pub unsafe extern "C" fn foo(x: i32, ...)'
12
+ // @has variadic/fn.foo.html //pre 'pub unsafe extern fn foo(x: i32, ...)'
13
13
pub fn foo ( x : i32 , ...) ;
14
14
}
0 commit comments