Skip to content

Commit 8a5b75a

Browse files
Update ui tests
1 parent f9fdb10 commit 8a5b75a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+244
-192
lines changed

tests/ui/author/issue_3849.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(dead_code)]
22
#![allow(clippy::zero_ptr)]
33
#![allow(clippy::transmute_ptr_to_ref)]
4-
#![allow(clippy::transmuting_null)]
4+
#![allow(clippy::transmuting_null, clippy::missing_transmute_annotations)]
55

66
pub const ZPTR: *const usize = 0 as *const _;
77

tests/ui/blocks_in_conditions.fixed

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![warn(clippy::blocks_in_conditions)]
2-
#![allow(unused, clippy::let_and_return, clippy::needless_if)]
2+
#![allow(
3+
unused,
4+
clippy::let_and_return,
5+
clippy::needless_if,
6+
clippy::missing_transmute_annotations
7+
)]
38
#![warn(clippy::nonminimal_bool)]
49

510
macro_rules! blocky {

tests/ui/blocks_in_conditions.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![warn(clippy::blocks_in_conditions)]
2-
#![allow(unused, clippy::let_and_return, clippy::needless_if)]
2+
#![allow(
3+
unused,
4+
clippy::let_and_return,
5+
clippy::needless_if,
6+
clippy::missing_transmute_annotations
7+
)]
38
#![warn(clippy::nonminimal_bool)]
49

510
macro_rules! blocky {

tests/ui/blocks_in_conditions.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
2-
--> $DIR/blocks_in_conditions.rs:23:5
2+
--> $DIR/blocks_in_conditions.rs:28:5
33
|
44
LL | / if {
55
LL | |
@@ -20,13 +20,13 @@ LL ~ }; if res {
2020
|
2121

2222
error: omit braces around single expression condition
23-
--> $DIR/blocks_in_conditions.rs:35:8
23+
--> $DIR/blocks_in_conditions.rs:40:8
2424
|
2525
LL | if { true } { 6 } else { 10 }
2626
| ^^^^^^^^ help: try: `true`
2727

2828
error: this boolean expression can be simplified
29-
--> $DIR/blocks_in_conditions.rs:41:8
29+
--> $DIR/blocks_in_conditions.rs:46:8
3030
|
3131
LL | if true && x == 3 { 6 } else { 10 }
3232
| ^^^^^^^^^^^^^^ help: try: `x == 3`
@@ -35,7 +35,7 @@ LL | if true && x == 3 { 6 } else { 10 }
3535
= help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]`
3636

3737
error: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
38-
--> $DIR/blocks_in_conditions.rs:68:5
38+
--> $DIR/blocks_in_conditions.rs:73:5
3939
|
4040
LL | / match {
4141
LL | |

tests/ui/crashes/ice-1782.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(dead_code, unused_variables)]
2-
#![allow(clippy::unnecessary_cast)]
2+
#![allow(clippy::unnecessary_cast, clippy::missing_transmute_annotations)]
33

44
/// Should not trigger an ICE in `SpanlessEq` / `consts::constant`
55
///

tests/ui/crashes/ice-4968.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test for https://github.com/rust-lang/rust-clippy/issues/4968
22

33
#![warn(clippy::unsound_collection_transmute)]
4-
#![allow(clippy::transmute_undefined_repr)]
4+
#![allow(clippy::transmute_undefined_repr, clippy::missing_transmute_annotations)]
55

66
trait Trait {
77
type Assoc;

tests/ui/eager_transmute.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(rustc_attrs)]
22
#![warn(clippy::eager_transmute)]
3-
#![allow(clippy::transmute_int_to_non_zero)]
3+
#![allow(clippy::transmute_int_to_non_zero, clippy::missing_transmute_annotations)]
44

55
use std::num::NonZeroU8;
66

tests/ui/eager_transmute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(rustc_attrs)]
22
#![warn(clippy::eager_transmute)]
3-
#![allow(clippy::transmute_int_to_non_zero)]
3+
#![allow(clippy::transmute_int_to_non_zero, clippy::missing_transmute_annotations)]
44

55
use std::num::NonZeroU8;
66

tests/ui/missing_const_for_fn/could_be_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::missing_const_for_fn)]
2-
#![allow(incomplete_features, clippy::let_and_return)]
2+
#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations)]
33
#![feature(const_mut_refs)]
44
#![feature(const_trait_impl)]
55

tests/ui/missing_transmute_annotations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![warn(clippy::missing_transmute_annotation)]
1+
#![warn(clippy::missing_transmute_annotations)]
22

33
macro_rules! bad_transmute {
44
($e:expr) => {

0 commit comments

Comments
 (0)