Skip to content

Commit 0142573

Browse files
Bless test fallout
1 parent 9a6133b commit 0142573

5 files changed

+14
-6
lines changed

tests/ui-fulldeps/deriving-global.rs

+3
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@ mod submod {
1717
// if any of these are implemented without global calls for any
1818
// function calls, then being in a submodule will (correctly)
1919
// cause errors about unrecognised module `std` (or `extra`)
20+
#[allow(dead_code)]
2021
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
2122
enum A {
2223
A1(usize),
2324
A2(isize),
2425
}
2526

27+
#[allow(dead_code)]
2628
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
2729
struct B {
2830
x: usize,
2931
y: isize,
3032
}
3133

34+
#[allow(dead_code)]
3235
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone, Debug, Encodable, Decodable)]
3336
struct C(usize, isize);
3437
}

tests/ui-fulldeps/deriving-hygiene.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub const s: u8 = 1;
2020
pub const state: u8 = 1;
2121
pub const cmp: u8 = 1;
2222

23+
#[allow(dead_code)]
2324
#[derive(Ord, Eq, PartialOrd, PartialEq, Debug, Decodable, Encodable, Hash)]
2425
struct Foo {}
2526

tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![deny(dead_code)]
22

33
struct T1; //~ ERROR struct `T1` is never constructed
4-
pub struct T2(i32); //~ ERROR struct `T2` is never constructed
4+
pub struct T2(i32); //~ ERROR field `0` is never read
55
struct T3;
66

77
trait Trait1 { //~ ERROR trait `Trait1` is never used

tests/ui/lint/dead-code/unused-adt-impl-pub-trait-with-assoc-const.stderr

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ note: the lint level is defined here
1010
LL | #![deny(dead_code)]
1111
| ^^^^^^^^^
1212

13-
error: struct `T2` is never constructed
14-
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:4:12
13+
error: field `0` is never read
14+
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:4:15
1515
|
1616
LL | pub struct T2(i32);
17-
| ^^
17+
| -- ^^^
18+
| |
19+
| field in this struct
20+
|
21+
= help: consider removing this field
1822

1923
error: trait `Trait1` is never used
2024
--> $DIR/unused-adt-impl-pub-trait-with-assoc-const.rs:7:7

tests/ui/pub/pub-ident-struct-4.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: missing `struct` for struct definition
2-
--> $DIR/pub-ident-struct-4.rs:3:4
2+
--> $DIR/pub-ident-struct-4.rs:3:1
33
|
44
LL | pub T(#[allow(dead_code)] String);
5-
| ^
5+
| ^^^^^
66
|
77
help: add `struct` here to parse `T` as a struct
88
|

0 commit comments

Comments
 (0)