From 69f99e74ac2266dff4b5adc7c59b35236f0abef1 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sat, 14 Dec 2019 08:40:43 -0500 Subject: [PATCH] Update tests for revert of never type stabilization --- tests/ui/infallible_destructuring_match.fixed | 2 +- tests/ui/infallible_destructuring_match.rs | 2 +- tests/ui/must_use_candidates.fixed | 1 + tests/ui/must_use_candidates.rs | 1 + tests/ui/must_use_candidates.stderr | 10 +++++----- tests/ui/result_map_unit_fn_unfixable.rs | 1 + tests/ui/result_map_unit_fn_unfixable.stderr | 8 ++++---- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tests/ui/infallible_destructuring_match.fixed b/tests/ui/infallible_destructuring_match.fixed index a92063bf807..f16f0fd0019 100644 --- a/tests/ui/infallible_destructuring_match.fixed +++ b/tests/ui/infallible_destructuring_match.fixed @@ -1,5 +1,5 @@ // run-rustfix -#![feature(exhaustive_patterns)] +#![feature(exhaustive_patterns, never_type)] #![allow(dead_code, unreachable_code, unused_variables)] #![allow(clippy::let_and_return)] diff --git a/tests/ui/infallible_destructuring_match.rs b/tests/ui/infallible_destructuring_match.rs index 4dd9e837b6d..a4823ad60ad 100644 --- a/tests/ui/infallible_destructuring_match.rs +++ b/tests/ui/infallible_destructuring_match.rs @@ -1,5 +1,5 @@ // run-rustfix -#![feature(exhaustive_patterns)] +#![feature(exhaustive_patterns, never_type)] #![allow(dead_code, unreachable_code, unused_variables)] #![allow(clippy::let_and_return)] diff --git a/tests/ui/must_use_candidates.fixed b/tests/ui/must_use_candidates.fixed index bac05c0931c..ff74857530f 100644 --- a/tests/ui/must_use_candidates.fixed +++ b/tests/ui/must_use_candidates.fixed @@ -1,4 +1,5 @@ // run-rustfix +#![feature(never_type)] #![allow(unused_mut)] #![warn(clippy::must_use_candidate)] use std::rc::Rc; diff --git a/tests/ui/must_use_candidates.rs b/tests/ui/must_use_candidates.rs index df265b6eac9..29c0752994a 100644 --- a/tests/ui/must_use_candidates.rs +++ b/tests/ui/must_use_candidates.rs @@ -1,4 +1,5 @@ // run-rustfix +#![feature(never_type)] #![allow(unused_mut)] #![warn(clippy::must_use_candidate)] use std::rc::Rc; diff --git a/tests/ui/must_use_candidates.stderr b/tests/ui/must_use_candidates.stderr index 2f33f5df5f4..0fa3849d03b 100644 --- a/tests/ui/must_use_candidates.stderr +++ b/tests/ui/must_use_candidates.stderr @@ -1,5 +1,5 @@ error: this function could have a `#[must_use]` attribute - --> $DIR/must_use_candidates.rs:11:1 + --> $DIR/must_use_candidates.rs:12:1 | LL | pub fn pure(i: u8) -> u8 { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn pure(i: u8) -> u8` @@ -7,25 +7,25 @@ LL | pub fn pure(i: u8) -> u8 { = note: `-D clippy::must-use-candidate` implied by `-D warnings` error: this method could have a `#[must_use]` attribute - --> $DIR/must_use_candidates.rs:16:5 + --> $DIR/must_use_candidates.rs:17:5 | LL | pub fn inherent_pure(&self) -> u8 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn inherent_pure(&self) -> u8` error: this function could have a `#[must_use]` attribute - --> $DIR/must_use_candidates.rs:47:1 + --> $DIR/must_use_candidates.rs:48:1 | LL | pub fn with_marker(_d: std::marker::PhantomData<&mut u32>) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn with_marker(_d: std::marker::PhantomData<&mut u32>) -> bool` error: this function could have a `#[must_use]` attribute - --> $DIR/must_use_candidates.rs:59:1 + --> $DIR/must_use_candidates.rs:60:1 | LL | pub fn rcd(_x: Rc) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn rcd(_x: Rc) -> bool` error: this function could have a `#[must_use]` attribute - --> $DIR/must_use_candidates.rs:67:1 + --> $DIR/must_use_candidates.rs:68:1 | LL | pub fn arcd(_x: Arc) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn arcd(_x: Arc) -> bool` diff --git a/tests/ui/result_map_unit_fn_unfixable.rs b/tests/ui/result_map_unit_fn_unfixable.rs index cc01976df99..78a99de92d9 100644 --- a/tests/ui/result_map_unit_fn_unfixable.rs +++ b/tests/ui/result_map_unit_fn_unfixable.rs @@ -1,4 +1,5 @@ #![warn(clippy::result_map_unit_fn)] +#![feature(never_type)] #![allow(unused)] fn do_nothing(_: T) {} diff --git a/tests/ui/result_map_unit_fn_unfixable.stderr b/tests/ui/result_map_unit_fn_unfixable.stderr index 16caac5828a..949c2294679 100644 --- a/tests/ui/result_map_unit_fn_unfixable.stderr +++ b/tests/ui/result_map_unit_fn_unfixable.stderr @@ -1,23 +1,23 @@ error[E0425]: cannot find value `x` in this scope - --> $DIR/result_map_unit_fn_unfixable.rs:16:5 + --> $DIR/result_map_unit_fn_unfixable.rs:17:5 | LL | x.field.map(|value| { do_nothing(value); do_nothing(value) }); | ^ not found in this scope error[E0425]: cannot find value `x` in this scope - --> $DIR/result_map_unit_fn_unfixable.rs:18:5 + --> $DIR/result_map_unit_fn_unfixable.rs:19:5 | LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value) }); | ^ not found in this scope error[E0425]: cannot find value `x` in this scope - --> $DIR/result_map_unit_fn_unfixable.rs:22:5 + --> $DIR/result_map_unit_fn_unfixable.rs:23:5 | LL | x.field.map(|value| { | ^ not found in this scope error[E0425]: cannot find value `x` in this scope - --> $DIR/result_map_unit_fn_unfixable.rs:26:5 + --> $DIR/result_map_unit_fn_unfixable.rs:27:5 | LL | x.field.map(|value| { do_nothing(value); do_nothing(value); }); | ^ not found in this scope