diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-09-01 17:12:52 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-01-13 07:49:16 -0500 |
| commit | 8a3edb1d661ed5ce685bd5dcfa600b6e02897b86 (patch) | |
| tree | 5615826fc30a674b49dcc89fc09ff84a1fced008 /src/test/rustdoc | |
| parent | c4a8d7f86a5d54a2f3b3875e703d06acd12ae7cc (diff) | |
| download | rust-8a3edb1d661ed5ce685bd5dcfa600b6e02897b86.tar.gz rust-8a3edb1d661ed5ce685bd5dcfa600b6e02897b86.zip | |
Update tests for extern block linting
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/auxiliary/issue-34274.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/foreigntype-reexport.rs | 10 | ||||
| -rw-r--r-- | src/test/rustdoc/foreigntype.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/inline_local/glob-extern-no-defaults.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/inline_local/glob-extern.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-22038.rs | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/sanitizer-option.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/titles.rs | 6 |
8 files changed, 15 insertions, 15 deletions
diff --git a/src/test/rustdoc/auxiliary/issue-34274.rs b/src/test/rustdoc/auxiliary/issue-34274.rs index b0c3b4f5629..c46660579a8 100644 --- a/src/test/rustdoc/auxiliary/issue-34274.rs +++ b/src/test/rustdoc/auxiliary/issue-34274.rs @@ -1,3 +1,3 @@ -extern { +extern "C" { pub fn extern_c_fn(); } diff --git a/src/test/rustdoc/foreigntype-reexport.rs b/src/test/rustdoc/foreigntype-reexport.rs index 616826ce7b4..1dec0ef3e0f 100644 --- a/src/test/rustdoc/foreigntype-reexport.rs +++ b/src/test/rustdoc/foreigntype-reexport.rs @@ -1,7 +1,7 @@ #![feature(extern_types)] mod sub { - extern { + extern "C" { /// Another extern type. pub type C2; pub fn f2(); @@ -10,7 +10,7 @@ mod sub { } pub mod sub2 { - extern { + extern "C" { // @has foreigntype_reexport/sub2/foreigntype.C.html pub type C; // @has foreigntype_reexport/sub2/fn.f.html @@ -21,7 +21,7 @@ pub mod sub2 { } mod sub3 { - extern { + extern "C" { pub type C4; pub fn f4(); pub static K4: usize; @@ -35,7 +35,7 @@ mod sub3 { // @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C2' // @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f2' // @has foreigntype_reexport/index.html '//a[@class="static"]' 'K2' -pub use self::sub::{C2, f2, K as K2}; +pub use self::sub::{f2, C2, K as K2}; // @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C' // @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f' @@ -43,7 +43,7 @@ pub use self::sub::{C2, f2, K as K2}; // @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::C as C3;' // @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::f as f3;' // @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::K3;' -pub use self::sub2::{C as C3, f as f3, K3}; +pub use self::sub2::{f as f3, C as C3, K3}; // @has foreigntype_reexport/foreigntype.C4.html // @has foreigntype_reexport/fn.f4.html diff --git a/src/test/rustdoc/foreigntype.rs b/src/test/rustdoc/foreigntype.rs index bd8766c0cf1..891cdd5fed7 100644 --- a/src/test/rustdoc/foreigntype.rs +++ b/src/test/rustdoc/foreigntype.rs @@ -1,6 +1,6 @@ #![feature(extern_types)] -extern { +extern "C" { // @has foreigntype/foreigntype.ExtType.html pub type ExtType; } diff --git a/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs b/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs index 276e4091c02..55c75dfe27b 100644 --- a/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs +++ b/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs @@ -3,7 +3,7 @@ #![crate_name = "foo"] mod mod1 { - extern { + extern "C" { pub fn public_fn(); fn private_fn(); } diff --git a/src/test/rustdoc/inline_local/glob-extern.rs b/src/test/rustdoc/inline_local/glob-extern.rs index a23ec3640ee..686e55de392 100644 --- a/src/test/rustdoc/inline_local/glob-extern.rs +++ b/src/test/rustdoc/inline_local/glob-extern.rs @@ -1,7 +1,7 @@ #![crate_name = "foo"] mod mod1 { - extern { + extern "C" { pub fn public_fn(); fn private_fn(); } diff --git a/src/test/rustdoc/issue-22038.rs b/src/test/rustdoc/issue-22038.rs index 2db42b561f7..ff5813dac80 100644 --- a/src/test/rustdoc/issue-22038.rs +++ b/src/test/rustdoc/issue-22038.rs @@ -1,4 +1,4 @@ -extern { +extern "C" { // @has issue_22038/fn.foo1.html \ // '//*[@class="rust fn"]' 'pub unsafe extern "C" fn foo1()' pub fn foo1(); @@ -12,7 +12,7 @@ extern "system" { // @has issue_22038/fn.bar.html \ // '//*[@class="rust fn"]' 'pub extern "C" fn bar()' -pub extern fn bar() {} +pub extern "C" fn bar() {} // @has issue_22038/fn.baz.html \ // '//*[@class="rust fn"]' 'pub extern "system" fn baz()' diff --git a/src/test/rustdoc/sanitizer-option.rs b/src/test/rustdoc/sanitizer-option.rs index a79b37ee082..1abba468feb 100644 --- a/src/test/rustdoc/sanitizer-option.rs +++ b/src/test/rustdoc/sanitizer-option.rs @@ -7,7 +7,7 @@ // correctly, then linking will fail. /// ``` -/// extern { +/// extern "C" { /// fn __sanitizer_print_stack_trace(); /// } /// diff --git a/src/test/rustdoc/titles.rs b/src/test/rustdoc/titles.rs index 3b4c42d865d..2084e851799 100644 --- a/src/test/rustdoc/titles.rs +++ b/src/test/rustdoc/titles.rs @@ -7,7 +7,7 @@ pub mod foo_mod { pub struct __Thing {} } -extern { +extern "C" { // @matches 'foo/fn.foo_ffn.html' '//h1' 'Function foo::foo_ffn' pub fn foo_ffn(); } @@ -30,7 +30,7 @@ pub type FooType = FooStruct; // @matches 'foo/macro.foo_macro.html' '//h1' 'Macro foo::foo_macro' #[macro_export] macro_rules! foo_macro { - () => (); + () => {}; } // @matches 'foo/primitive.bool.html' '//h1' 'Primitive Type bool' @@ -40,7 +40,7 @@ mod bool {} // @matches 'foo/static.FOO_STATIC.html' '//h1' 'Static foo::FOO_STATIC' pub static FOO_STATIC: FooStruct = FooStruct; -extern { +extern "C" { // @matches 'foo/static.FOO_FSTATIC.html' '//h1' 'Static foo::FOO_FSTATIC' pub static FOO_FSTATIC: FooStruct; } |
