Skip to content

Commit

Permalink
Fix clippy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Dec 13, 2021
1 parent 8fea1d9 commit e1139cf
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 32 deletions.
4 changes: 2 additions & 2 deletions tests/ui/asm_syntax.rs
@@ -1,11 +1,10 @@
// only-x86_64
// ignore-aarch64

#![feature(asm)]

#[warn(clippy::inline_asm_x86_intel_syntax)]
mod warn_intel {
pub(super) unsafe fn use_asm() {
use std::arch::asm;
asm!("");
asm!("", options());
asm!("", options(nostack));
Expand All @@ -17,6 +16,7 @@ mod warn_intel {
#[warn(clippy::inline_asm_x86_att_syntax)]
mod warn_att {
pub(super) unsafe fn use_asm() {
use std::arch::asm;
asm!("");
asm!("", options());
asm!("", options(nostack));
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/asm_syntax.stderr
@@ -1,5 +1,5 @@
error: Intel x86 assembly syntax used
--> $DIR/asm_syntax.rs:9:9
--> $DIR/asm_syntax.rs:8:9
|
LL | asm!("");
| ^^^^^^^^
Expand All @@ -8,15 +8,15 @@ LL | asm!("");
= help: use AT&T x86 assembly syntax

error: Intel x86 assembly syntax used
--> $DIR/asm_syntax.rs:10:9
--> $DIR/asm_syntax.rs:9:9
|
LL | asm!("", options());
| ^^^^^^^^^^^^^^^^^^^
|
= help: use AT&T x86 assembly syntax

error: Intel x86 assembly syntax used
--> $DIR/asm_syntax.rs:11:9
--> $DIR/asm_syntax.rs:10:9
|
LL | asm!("", options(nostack));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/entry.fixed
Expand Up @@ -2,8 +2,8 @@

#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]
#![warn(clippy::map_entry)]
#![feature(asm)]

use std::arch::asm;
use std::collections::HashMap;
use std::hash::Hash;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/entry.rs
Expand Up @@ -2,8 +2,8 @@

#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]
#![warn(clippy::map_entry)]
#![feature(asm)]

use std::arch::asm;
use std::collections::HashMap;
use std::hash::Hash;

Expand Down
3 changes: 2 additions & 1 deletion tests/ui/missing-doc.rs
Expand Up @@ -2,10 +2,11 @@
// When denying at the crate level, be sure to not get random warnings from the
// injected intrinsics by the compiler.
#![allow(dead_code)]
#![feature(global_asm)]
//! Some garbage docs for the crate here
#![doc = "More garbage"]

use std::arch::global_asm;

type Typedef = String;
pub type PubTypedef = String;

Expand Down
48 changes: 24 additions & 24 deletions tests/ui/missing-doc.stderr
@@ -1,43 +1,43 @@
error: missing documentation for a type alias
--> $DIR/missing-doc.rs:9:1
--> $DIR/missing-doc.rs:10:1
|
LL | type Typedef = String;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::missing-docs-in-private-items` implied by `-D warnings`

error: missing documentation for a type alias
--> $DIR/missing-doc.rs:10:1
--> $DIR/missing-doc.rs:11:1
|
LL | pub type PubTypedef = String;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a module
--> $DIR/missing-doc.rs:12:1
--> $DIR/missing-doc.rs:13:1
|
LL | mod module_no_dox {}
| ^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a module
--> $DIR/missing-doc.rs:13:1
--> $DIR/missing-doc.rs:14:1
|
LL | pub mod pub_module_no_dox {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a function
--> $DIR/missing-doc.rs:17:1
--> $DIR/missing-doc.rs:18:1
|
LL | pub fn foo2() {}
| ^^^^^^^^^^^^^^^^

error: missing documentation for a function
--> $DIR/missing-doc.rs:18:1
--> $DIR/missing-doc.rs:19:1
|
LL | fn foo3() {}
| ^^^^^^^^^^^^

error: missing documentation for an enum
--> $DIR/missing-doc.rs:32:1
--> $DIR/missing-doc.rs:33:1
|
LL | / enum Baz {
LL | | BazA { a: isize, b: isize },
Expand All @@ -46,75 +46,75 @@ LL | | }
| |_^

error: missing documentation for a variant
--> $DIR/missing-doc.rs:33:5
--> $DIR/missing-doc.rs:34:5
|
LL | BazA { a: isize, b: isize },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a struct field
--> $DIR/missing-doc.rs:33:12
--> $DIR/missing-doc.rs:34:12
|
LL | BazA { a: isize, b: isize },
| ^^^^^^^^

error: missing documentation for a struct field
--> $DIR/missing-doc.rs:33:22
--> $DIR/missing-doc.rs:34:22
|
LL | BazA { a: isize, b: isize },
| ^^^^^^^^

error: missing documentation for a variant
--> $DIR/missing-doc.rs:34:5
--> $DIR/missing-doc.rs:35:5
|
LL | BarB,
| ^^^^

error: missing documentation for an enum
--> $DIR/missing-doc.rs:37:1
--> $DIR/missing-doc.rs:38:1
|
LL | / pub enum PubBaz {
LL | | PubBazA { a: isize },
LL | | }
| |_^

error: missing documentation for a variant
--> $DIR/missing-doc.rs:38:5
--> $DIR/missing-doc.rs:39:5
|
LL | PubBazA { a: isize },
| ^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a struct field
--> $DIR/missing-doc.rs:38:15
--> $DIR/missing-doc.rs:39:15
|
LL | PubBazA { a: isize },
| ^^^^^^^^

error: missing documentation for a constant
--> $DIR/missing-doc.rs:58:1
--> $DIR/missing-doc.rs:59:1
|
LL | const FOO: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^

error: missing documentation for a constant
--> $DIR/missing-doc.rs:65:1
--> $DIR/missing-doc.rs:66:1
|
LL | pub const FOO4: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a static
--> $DIR/missing-doc.rs:67:1
--> $DIR/missing-doc.rs:68:1
|
LL | static BAR: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a static
--> $DIR/missing-doc.rs:74:1
--> $DIR/missing-doc.rs:75:1
|
LL | pub static BAR4: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a module
--> $DIR/missing-doc.rs:76:1
--> $DIR/missing-doc.rs:77:1
|
LL | / mod internal_impl {
LL | | /// dox
Expand All @@ -126,31 +126,31 @@ LL | | }
| |_^

error: missing documentation for a function
--> $DIR/missing-doc.rs:79:5
--> $DIR/missing-doc.rs:80:5
|
LL | pub fn undocumented1() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a function
--> $DIR/missing-doc.rs:80:5
--> $DIR/missing-doc.rs:81:5
|
LL | pub fn undocumented2() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a function
--> $DIR/missing-doc.rs:81:5
--> $DIR/missing-doc.rs:82:5
|
LL | fn undocumented3() {}
| ^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a function
--> $DIR/missing-doc.rs:86:9
--> $DIR/missing-doc.rs:87:9
|
LL | pub fn also_undocumented1() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: missing documentation for a function
--> $DIR/missing-doc.rs:87:9
--> $DIR/missing-doc.rs:88:9
|
LL | fn also_undocumented2() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit e1139cf

Please sign in to comment.