mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Fix clippy tests
This commit is contained in:
parent
8fea1d94f3
commit
e1139cf570
@ -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));
|
||||
@ -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));
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: Intel x86 assembly syntax used
|
||||
--> $DIR/asm_syntax.rs:9:9
|
||||
--> $DIR/asm_syntax.rs:8:9
|
||||
|
|
||||
LL | asm!("");
|
||||
| ^^^^^^^^
|
||||
@ -8,7 +8,7 @@ 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());
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -16,7 +16,7 @@ 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));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: missing documentation for a type alias
|
||||
--> $DIR/missing-doc.rs:9:1
|
||||
--> $DIR/missing-doc.rs:10:1
|
||||
|
|
||||
LL | type Typedef = String;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -7,37 +7,37 @@ 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 },
|
||||
@ -46,31 +46,31 @@ 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 },
|
||||
@ -78,43 +78,43 @@ 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
|
||||
@ -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() {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user