Bless test fallout
This commit is contained in:
parent
cbd27db9a9
commit
a57b8b91db
5 changed files with 14 additions and 6 deletions
|
@ -17,18 +17,21 @@ mod submod {
|
||||||
// if any of these are implemented without global calls for any
|
// if any of these are implemented without global calls for any
|
||||||
// function calls, then being in a submodule will (correctly)
|
// function calls, then being in a submodule will (correctly)
|
||||||
// cause errors about unrecognised module `std` (or `extra`)
|
// cause errors about unrecognised module `std` (or `extra`)
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
|
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
|
||||||
enum A {
|
enum A {
|
||||||
A1(usize),
|
A1(usize),
|
||||||
A2(isize),
|
A2(isize),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
|
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
|
||||||
struct B {
|
struct B {
|
||||||
x: usize,
|
x: usize,
|
||||||
y: isize,
|
y: isize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
|
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
|
||||||
struct C(usize, isize);
|
struct C(usize, isize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ pub const s: u8 = 1;
|
||||||
pub const state: u8 = 1;
|
pub const state: u8 = 1;
|
||||||
pub const cmp: u8 = 1;
|
pub const cmp: u8 = 1;
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(Ord, Eq, PartialOrd, PartialEq, Debug, Decodable, Encodable, Hash)]
|
#[derive(Ord, Eq, PartialOrd, PartialEq, Debug, Decodable, Encodable, Hash)]
|
||||||
struct Foo {}
|
struct Foo {}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![deny(dead_code)]
|
#![deny(dead_code)]
|
||||||
|
|
||||||
struct T1; //~ ERROR struct `T1` is never constructed
|
struct T1; //~ ERROR struct `T1` is never constructed
|
||||||
pub struct T2(i32); //~ ERROR struct `T2` is never constructed
|
pub struct T2(i32); //~ ERROR field `0` is never read
|
||||||
struct T3;
|
struct T3;
|
||||||
|
|
||||||
trait Trait1 { //~ ERROR trait `Trait1` is never used
|
trait Trait1 { //~ ERROR trait `Trait1` is never used
|
||||||
|
|
|
@ -10,11 +10,15 @@ note: the lint level is defined here
|
||||||
LL | #![deny(dead_code)]
|
LL | #![deny(dead_code)]
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: struct `T2` is never constructed
|
error: field `0` is never read
|
||||||
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:4:12
|
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:4:15
|
||||||
|
|
|
|
||||||
LL | pub struct T2(i32);
|
LL | pub struct T2(i32);
|
||||||
| ^^
|
| -- ^^^
|
||||||
|
| |
|
||||||
|
| field in this struct
|
||||||
|
|
|
||||||
|
= help: consider removing this field
|
||||||
|
|
||||||
error: trait `Trait1` is never used
|
error: trait `Trait1` is never used
|
||||||
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:7:7
|
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:7:7
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
error: missing `struct` for struct definition
|
error: missing `struct` for struct definition
|
||||||
--> $DIR/pub-ident-struct-4.rs:3:4
|
--> $DIR/pub-ident-struct-4.rs:3:1
|
||||||
|
|
|
|
||||||
LL | pub T(#[allow(dead_code)] String);
|
LL | pub T(#[allow(dead_code)] String);
|
||||||
| ^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
help: add `struct` here to parse `T` as a struct
|
help: add `struct` here to parse `T` as a struct
|
||||||
|
|
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue