diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index cf0d0ceadca91..ac6a7f0c2baa8 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -68,6 +68,7 @@ use middle::region; use traits::{ObligationCause, ObligationCauseCode}; use ty::{self, subst::Subst, Region, Ty, TyCtxt, TypeFoldable, TyKind}; use ty::error::TypeError; +use session::config::BorrowckMode; use syntax::ast::DUMMY_NODE_ID; use syntax_pos::{Pos, Span}; use errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString}; @@ -303,40 +304,16 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { ) { debug!("report_region_errors(): {} errors to start", errors.len()); - if will_later_be_reported_by_nll && - // FIXME: `use_mir_borrowck` seems wrong here... - self.tcx.use_mir_borrowck() && - // ... this is a band-aid; may be better to explicitly - // match on every borrowck_mode variant to guide decision - // here. - !self.tcx.migrate_borrowck() { - - // With `#![feature(nll)]`, we want to present a nice user - // experience, so don't even mention the errors from the - // AST checker. - if self.tcx.features().nll { - return; + // If the errors will later be reported by NLL, choose wether to display them or not based + // on the borrowck mode + if will_later_be_reported_by_nll { + match self.tcx.borrowck_mode() { + // If we're on AST or Migrate mode, report AST region errors + BorrowckMode::Ast | BorrowckMode::Migrate => {}, + // If we're on MIR or Compare mode, don't report AST region errors as they should + // be reported by NLL + BorrowckMode::Compare | BorrowckMode::Mir => return, } - - // But with nll, it's nice to have some note for later. - for error in errors { - match *error { - RegionResolutionError::ConcreteFailure(ref origin, ..) - | RegionResolutionError::GenericBoundFailure(ref origin, ..) => { - self.tcx - .sess - .span_warn(origin.span(), "not reporting region error due to nll"); - } - - RegionResolutionError::SubSupConflict(ref rvo, ..) => { - self.tcx - .sess - .span_warn(rvo.span(), "not reporting region error due to nll"); - } - } - } - - return; } // try to pre-process the errors, which will group some of them diff --git a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr index 5b8223ff29258..674d85d959112 100644 --- a/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr +++ b/src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:32:12 - | -LL | let z: I::A = if cond { x } else { y }; - | ^^^^ - error: unsatisfied lifetime constraints --> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:32:29 | diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr index ac758a8926f28..b61ea27ebe19b 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-contravariant.rs:53:16 - | -LL | let a = bar(foo, y); - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-contravariant.rs:54:16 - | -LL | let b = bar(foo, x); - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/project-fn-ret-contravariant.rs:53:12 | diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr index 75c35d077c4c4..b5cba945fb11a 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-contravariant.rs:48:8 - | -LL | bar(foo, x) //[transmute]~ ERROR E0495 - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/project-fn-ret-contravariant.rs:48:4 | diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr index 4b2ba24eb0eb8..971448997e3f6 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-invariant.rs:63:16 - | -LL | let a = bar(foo, y); //[krisskross]~ ERROR E0623 - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-invariant.rs:64:16 - | -LL | let b = bar(foo, x); - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/project-fn-ret-invariant.rs:63:12 | diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr index a669c7ac73bc5..a9c2bb3763988 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-invariant.rs:47:12 - | -LL | let f = foo; // <-- No consistent type can be inferred for `f` here. - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/project-fn-ret-invariant.rs:48:12 | diff --git a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr index 604974a25008d..bb1be40980dad 100644 --- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr +++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/project-fn-ret-invariant.rs:58:8 - | -LL | bar(foo, x) //[transmute]~ ERROR E0495 - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/project-fn-ret-invariant.rs:58:4 | diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr index b7aad5c2b80dc..e3211f8385099 100644 --- a/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr +++ b/src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:19:18 - | -LL | S { pointer: &mut *p.pointer } - | ^^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:19:5 | diff --git a/src/test/ui/borrowck/issue-45983.nll.stderr b/src/test/ui/borrowck/issue-45983.nll.stderr index 9d62c7dba75ff..18411b528a3e3 100644 --- a/src/test/ui/borrowck/issue-45983.nll.stderr +++ b/src/test/ui/borrowck/issue-45983.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-45983.rs:36:27 - | -LL | give_any(|y| x = Some(y)); - | ^ - error: borrowed data escapes outside of closure --> $DIR/issue-45983.rs:36:18 | diff --git a/src/test/ui/borrowck/issue-45983.rs b/src/test/ui/borrowck/issue-45983.rs index 5ed425e958a58..ec2a2887127ad 100644 --- a/src/test/ui/borrowck/issue-45983.rs +++ b/src/test/ui/borrowck/issue-45983.rs @@ -36,7 +36,6 @@ fn main() { give_any(|y| x = Some(y)); //[ast]~^ ERROR borrowed data cannot be stored outside of its closure //[migrate]~^^ ERROR borrowed data cannot be stored outside of its closure - //[nll]~^^^ WARN not reporting region error due to nll - //[nll]~| ERROR borrowed data escapes outside of closure + //[nll]~^^^ ERROR borrowed data escapes outside of closure //[nll]~| ERROR cannot assign to `x`, as it is not declared as mutable } diff --git a/src/test/ui/borrowck/issue-7573.nll.stderr b/src/test/ui/borrowck/issue-7573.nll.stderr index b0fbcd3ad9f39..372df61d78c45 100644 --- a/src/test/ui/borrowck/issue-7573.nll.stderr +++ b/src/test/ui/borrowck/issue-7573.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-7573.rs:27:31 - | -LL | let mut lines_to_use: Vec<&CrateId> = Vec::new(); - | ^ - error: borrowed data escapes outside of closure --> $DIR/issue-7573.rs:32:9 | diff --git a/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr b/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr index 1a18817e94365..787fc4d872996 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-escape-bound-fn-2.rs:18:27 - | -LL | with_int(|y| x = Some(y)); - | ^ - error: borrowed data escapes outside of closure --> $DIR/regions-escape-bound-fn-2.rs:18:18 | diff --git a/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr b/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr index 62ea9a0854bde..91f1f00ce30ff 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-escape-bound-fn.rs:18:22 - | -LL | with_int(|y| x = Some(y)); - | ^^^^^^^ - error: borrowed data escapes outside of closure --> $DIR/regions-escape-bound-fn.rs:18:18 | diff --git a/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr b/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr index 44eead9fb5a98..44e7018fdd764 100644 --- a/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr +++ b/src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-escape-unboxed-closure.rs:16:27 - | -LL | with_int(&mut |y| x = Some(y)); - | ^^^^^^^ - error: borrowed data escapes outside of closure --> $DIR/regions-escape-unboxed-closure.rs:16:23 | diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr index fe857001bfaef..ae3e3a262b5ad 100644 --- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/expect-fn-supply-fn.rs:24:52 - | -LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {}); - | ^^^^^^^^^^^ - error[E0631]: type mismatch in closure arguments --> $DIR/expect-fn-supply-fn.rs:40:5 | diff --git a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr index ca82020a2ccb1..4bc5034f93e4d 100644 --- a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr +++ b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr @@ -1,13 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:15:9 - | -LL | bar(|| { - | _________^ -LL | | //~^ ERROR explicit lifetime required in the type of `x` [E0621] -LL | | let _ = x; -LL | | }) - | |_____^ - error[E0621]: explicit lifetime required in the type of `x` --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:15:5 | diff --git a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr index 8658c618bf24c..7f842c40ece5a 100644 --- a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr +++ b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/expect-region-supply-region.rs:28:13 - | -LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/expect-region-supply-region.rs:38:13 - | -LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/expect-region-supply-region.rs:47:33 - | -LL | closure_expecting_bound(|x: &'x u32| { - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/expect-region-supply-region.rs:52:13 - | -LL | f = Some(x); - | ^^^^^^^ - error: borrowed data escapes outside of closure --> $DIR/expect-region-supply-region.rs:28:9 | diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr index caedc79d80732..65008380f9e17 100644 --- a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5 - | -LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 - | ^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/E0621-does-not-trigger-for-closures.rs:25:45 | diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr index 84af8e1dca2b1..a480f54ac1873 100644 --- a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr +++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr @@ -7,12 +7,6 @@ LL | let z: i32 = x; //~ ERROR mismatched types = note: expected type `i32` found type `WrongGeneric::<&{integer}>` -warning: not reporting region error due to nll - --> $DIR/generic_type_does_not_live_long_enough.rs:19:1 - | -LL | existential type WrongGeneric: 'static; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr index bb4e922fdc0d2..cadb552697e65 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr @@ -1,23 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/hr-subtype.rs:43:26 - | -LL | gimme::<$t2>(None::<$t1>); - | ^^^^^^^^^^^ -... -LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), -LL | | fn(Inv<'y>)) } - | |__________________________________________________- in this macro invocation - -warning: not reporting region error due to nll - --> $DIR/hr-subtype.rs:49:26 - | -LL | gimme::<$t1>(None::<$t2>); - | ^^^^^^^^^^^ -... -LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), -LL | | fn(Inv<'y>)) } - | |__________________________________________________- in this macro invocation - error: unsatisfied lifetime constraints --> $DIR/hr-subtype.rs:43:13 | diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr index c33e6fbfde72c..c1bcd146b3489 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr @@ -1,13 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/hr-subtype.rs:49:26 - | -LL | gimme::<$t1>(None::<$t2>); - | ^^^^^^^^^^^ -... -LL | / check! { free_x_vs_free_y: (fn(&'x u32), -LL | | fn(&'y u32)) } - | |__________________________________________- in this macro invocation - error: unsatisfied lifetime constraints --> $DIR/hr-subtype.rs:49:13 | diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr b/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr index f5d98e04ad804..45ee808950e25 100644 --- a/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr +++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/dyn-trait.rs:32:16 - | -LL | static_val(x); //~ ERROR cannot infer - | ^ - error: borrowed data escapes outside of function --> $DIR/dyn-trait.rs:32:5 | diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr index 97cb2cc16e45e..1e3e997b111ac 100644 --- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr +++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr @@ -1,33 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/must_outlive_least_region_or_bound.rs:13:35 - | -LL | fn elided(x: &i32) -> impl Copy { x } - | ^ - -warning: not reporting region error due to nll - --> $DIR/must_outlive_least_region_or_bound.rs:16:44 - | -LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x } - | ^ - -warning: not reporting region error due to nll - --> $DIR/must_outlive_least_region_or_bound.rs:22:69 - | -LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x } - | ^ - -warning: not reporting region error due to nll - --> $DIR/must_outlive_least_region_or_bound.rs:29:5 - | -LL | move |_| println!("{}", y) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/must_outlive_least_region_or_bound.rs:32:51 - | -LL | fn ty_param_wont_outlive_static(x: T) -> impl Debug + 'static { - | ^^^^^^^^^^^^^^^^^^^^ - error[E0621]: explicit lifetime required in the type of `x` --> $DIR/must_outlive_least_region_or_bound.rs:13:35 | diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr index c1e12978c5179..2568eb2ed3fc1 100644 --- a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/static-return-lifetime-infered.rs:17:16 - | -LL | self.x.iter().map(|a| a.0) - | ^^^^ - -warning: not reporting region error due to nll - --> $DIR/static-return-lifetime-infered.rs:21:16 - | -LL | self.x.iter().map(|a| a.0) - | ^^^^ - error: unsatisfied lifetime constraints --> $DIR/static-return-lifetime-infered.rs:17:9 | diff --git a/src/test/ui/impl-trait/type_parameters_captured.nll.stderr b/src/test/ui/impl-trait/type_parameters_captured.nll.stderr index 823ee4467299e..3c2c86fffded0 100644 --- a/src/test/ui/impl-trait/type_parameters_captured.nll.stderr +++ b/src/test/ui/impl-trait/type_parameters_captured.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/type_parameters_captured.rs:17:20 - | -LL | fn foo(x: T) -> impl Any + 'static { - | ^^^^^^^^^^^^^^^^^^ - error[E0310]: the parameter type `T` may not live long enough --> $DIR/type_parameters_captured.rs:19:5 | diff --git a/src/test/ui/in-band-lifetimes/mismatched.nll.stderr b/src/test/ui/in-band-lifetimes/mismatched.nll.stderr index c07921bce2d72..c8b2f849b32a7 100644 --- a/src/test/ui/in-band-lifetimes/mismatched.nll.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/mismatched.rs:14:42 - | -LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required - | ^ - -warning: not reporting region error due to nll - --> $DIR/mismatched.rs:16:46 - | -LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch - | ^ - error[E0621]: explicit lifetime required in the type of `y` --> $DIR/mismatched.rs:14:42 | diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.nll.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait.nll.stderr deleted file mode 100644 index a01f3219dc5e4..0000000000000 --- a/src/test/ui/in-band-lifetimes/mismatched_trait.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/mismatched_trait.rs:16:9 - | -LL | y //~ ERROR explicit lifetime required - | ^ - -error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/mismatched_trait.rs:16:9 - | -LL | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { - | ---- help: add explicit lifetime `'a` to the type of `y`: `&'a u32` -LL | y //~ ERROR explicit lifetime required - | ^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/issues/issue-10291.nll.stderr b/src/test/ui/issues/issue-10291.nll.stderr index 48dad040f9d0c..d19c4d880c7c8 100644 --- a/src/test/ui/issues/issue-10291.nll.stderr +++ b/src/test/ui/issues/issue-10291.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-10291.rs:13:9 - | -LL | x //~ ERROR E0312 - | ^ - error: unsatisfied lifetime constraints --> $DIR/issue-10291.rs:12:5 | diff --git a/src/test/ui/issues/issue-13058.nll.stderr b/src/test/ui/issues/issue-13058.nll.stderr index 146385f3de2d8..33c0eefbfaa28 100644 --- a/src/test/ui/issues/issue-13058.nll.stderr +++ b/src/test/ui/issues/issue-13058.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-13058.rs:24:21 - | -LL | let cont_iter = cont.iter(); - | ^^^^ - -warning: not reporting region error due to nll - --> $DIR/issue-13058.rs:24:26 - | -LL | let cont_iter = cont.iter(); - | ^^^^ - error[E0308]: mismatched types --> $DIR/issue-13058.rs:36:11 | diff --git a/src/test/ui/issues/issue-14285.nll.stderr b/src/test/ui/issues/issue-14285.nll.stderr deleted file mode 100644 index cf3e44f7874aa..0000000000000 --- a/src/test/ui/issues/issue-14285.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/issue-14285.rs:22:7 - | -LL | B(a) //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621] - | ^ - -error[E0621]: explicit lifetime required in the type of `a` - --> $DIR/issue-14285.rs:22:5 - | -LL | fn foo<'a>(a: &Foo) -> B<'a> { - | ---- help: add explicit lifetime `'a` to the type of `a`: `&'a (dyn Foo + 'a)` -LL | B(a) //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621] - | ^^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/issues/issue-15034.nll.stderr b/src/test/ui/issues/issue-15034.nll.stderr index 8dd18fa0cab89..aa5ceabfb1174 100644 --- a/src/test/ui/issues/issue-15034.nll.stderr +++ b/src/test/ui/issues/issue-15034.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-15034.rs:27:9 - | -LL | Parser { lexer: lexer } - | ^^^^^^ - error[E0621]: explicit lifetime required in the type of `lexer` --> $DIR/issue-15034.rs:27:9 | diff --git a/src/test/ui/issues/issue-16683.nll.stderr b/src/test/ui/issues/issue-16683.nll.stderr index 890bb426441e2..29d9948f61a42 100644 --- a/src/test/ui/issues/issue-16683.nll.stderr +++ b/src/test/ui/issues/issue-16683.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-16683.rs:14:9 - | -LL | self.a(); //~ ERROR cannot infer - | ^^^^ - -warning: not reporting region error due to nll - --> $DIR/issue-16683.rs:14:14 - | -LL | self.a(); //~ ERROR cannot infer - | ^ - error: borrowed data escapes outside of function --> $DIR/issue-16683.rs:14:9 | diff --git a/src/test/ui/issues/issue-16922.nll.stderr b/src/test/ui/issues/issue-16922.nll.stderr index 1bd26faedaae3..3406d53489660 100644 --- a/src/test/ui/issues/issue-16922.nll.stderr +++ b/src/test/ui/issues/issue-16922.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-16922.rs:14:14 - | -LL | Box::new(value) as Box - | ^^^^^ - error[E0621]: explicit lifetime required in the type of `value` --> $DIR/issue-16922.rs:14:5 | diff --git a/src/test/ui/issues/issue-17728.nll.stderr b/src/test/ui/issues/issue-17728.nll.stderr index b9931e45bd238..2cb6f831d8568 100644 --- a/src/test/ui/issues/issue-17728.nll.stderr +++ b/src/test/ui/issues/issue-17728.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-17728.rs:23:49 - | -LL | let maybe_room = room.direction_to_room.get(&direction); - | ^^^ - error[E0308]: match arms have incompatible types --> $DIR/issue-17728.rs:110:5 | diff --git a/src/test/ui/issues/issue-17758.nll.stderr b/src/test/ui/issues/issue-17758.nll.stderr index c51a72f885d6c..87e01ace64a1b 100644 --- a/src/test/ui/issues/issue-17758.nll.stderr +++ b/src/test/ui/issues/issue-17758.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-17758.rs:17:9 - | -LL | self.foo(); - | ^^^^ - -warning: not reporting region error due to nll - --> $DIR/issue-17758.rs:17:14 - | -LL | self.foo(); - | ^^^ - error: borrowed data escapes outside of function --> $DIR/issue-17758.rs:17:9 | diff --git a/src/test/ui/issues/issue-26217.nll.stderr b/src/test/ui/issues/issue-26217.nll.stderr index 94e3692d53db5..f28b065409906 100644 --- a/src/test/ui/issues/issue-26217.nll.stderr +++ b/src/test/ui/issues/issue-26217.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-26217.rs:14:5 - | -LL | foo::<&'a i32>(); - | ^^^^^^^^^^^^^^ - error[E0131]: `main` function is not allowed to have generic parameters --> $DIR/issue-26217.rs:13:8 | diff --git a/src/test/ui/issues/issue-3154.nll.stderr b/src/test/ui/issues/issue-3154.nll.stderr deleted file mode 100644 index 3cd7ce8cd5409..0000000000000 --- a/src/test/ui/issues/issue-3154.nll.stderr +++ /dev/null @@ -1,23 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/issue-3154.rs:16:15 - | -LL | thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621] - | ^ - -warning: not reporting region error due to nll - --> $DIR/issue-3154.rs:16:5 - | -LL | thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621] - | ^^^^^ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/issue-3154.rs:16:5 - | -LL | fn thing<'a,Q>(x: &Q) -> thing<'a,Q> { - | -- help: add explicit lifetime `'a` to the type of `x`: `&'a Q` -LL | thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621] - | ^^^^^^^^^^^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/issues/issue-40288-2.nll.stderr b/src/test/ui/issues/issue-40288-2.nll.stderr index dcc9e0a8a65a5..e15e4e86dbcbf 100644 --- a/src/test/ui/issues/issue-40288-2.nll.stderr +++ b/src/test/ui/issues/issue-40288-2.nll.stderr @@ -1,39 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-40288-2.rs:17:20 - | -LL | slice[0] = y; - | ^ - -warning: not reporting region error due to nll - --> $DIR/issue-40288-2.rs:16:20 - | -LL | let slice: &mut [_] = &mut out; - | ^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/issue-40288-2.rs:14:19 - | -LL | let mut out = [x]; - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/issue-40288-2.rs:32:20 - | -LL | dst.head = y; - | ^ - -warning: not reporting region error due to nll - --> $DIR/issue-40288-2.rs:31:18 - | -LL | let dst: &mut Struct<_, [()]> = &mut out; - | ^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/issue-40288-2.rs:29:19 - | -LL | let mut out = Struct { head: x, _tail: [()] }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - error[E0621]: explicit lifetime required in the type of `y` --> $DIR/issue-40288-2.rs:17:9 | diff --git a/src/test/ui/issues/issue-52213.nll.stderr b/src/test/ui/issues/issue-52213.nll.stderr index 7a04aeb963547..dab3fd866ba64 100644 --- a/src/test/ui/issues/issue-52213.nll.stderr +++ b/src/test/ui/issues/issue-52213.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-52213.rs:12:11 - | -LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime - | ^^^^^ - error: unsatisfied lifetime constraints --> $DIR/issue-52213.rs:13:20 | diff --git a/src/test/ui/issues/issue-52533-1.nll.stderr b/src/test/ui/issues/issue-52533-1.nll.stderr index 2dfa46dc2288e..cc5f4df79f8f5 100644 --- a/src/test/ui/issues/issue-52533-1.nll.stderr +++ b/src/test/ui/issues/issue-52533-1.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-52533-1.rs:19:18 - | -LL | gimme(|x, y| y) - | ^ - error: unsatisfied lifetime constraints --> $DIR/issue-52533-1.rs:19:18 | diff --git a/src/test/ui/issues/issue-52533.nll.stderr b/src/test/ui/issues/issue-52533.nll.stderr index 17218429822e8..37ab2a3b84d2f 100644 --- a/src/test/ui/issues/issue-52533.nll.stderr +++ b/src/test/ui/issues/issue-52533.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/issue-52533.rs:15:16 - | -LL | foo(|a, b| b) - | ^ - error: unsatisfied lifetime constraints --> $DIR/issue-52533.rs:15:16 | diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr index 8f24baf7fc46f..d484632f4c34e 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr @@ -40,12 +40,6 @@ LL | let a: &Gettable = &t; = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` -warning: not reporting region error due to nll - --> $DIR/kindck-impl-type-params.rs:42:13 - | -LL | let a = &t as &Gettable<&'a isize>; - | ^^ - error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:48:13 | diff --git a/src/test/ui/kindck/kindck-send-object1.nll.stderr b/src/test/ui/kindck/kindck-send-object1.nll.stderr index 6613a29cd7688..a45ba157bf9a3 100644 --- a/src/test/ui/kindck/kindck-send-object1.nll.stderr +++ b/src/test/ui/kindck/kindck-send-object1.nll.stderr @@ -12,12 +12,6 @@ note: required by `assert_send` LL | fn assert_send() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: not reporting region error due to nll - --> $DIR/kindck-send-object1.rs:24:5 - | -LL | assert_send::<&'a (Dummy+Sync)>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely --> $DIR/kindck-send-object1.rs:39:5 | diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr index ab9bb19563127..bc15df264cc3b 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/lifetime-bound-will-change-warning.rs:44:13 - | -LL | ref_obj(x) //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/lifetime-bound-will-change-warning.rs:49:18 - | -LL | lib::ref_obj(x) //~ ERROR mismatched types - | ^ - error: borrowed data escapes outside of function --> $DIR/lifetime-bound-will-change-warning.rs:44:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.nll.stderr deleted file mode 100644 index 3fb0252315cbf..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/42701_one_named_and_one_anonymous.rs:20:9 - | -LL | &*x //~ ERROR explicit lifetime - | ^^^ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/42701_one_named_and_one_anonymous.rs:20:9 - | -LL | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { - | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` -... -LL | &*x //~ ERROR explicit lifetime - | ^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.nll.stderr deleted file mode 100644 index 817d7c8736375..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21 - | -LL | other //~ ERROR explicit lifetime - | ^^^^^ - -error[E0621]: explicit lifetime required in the type of `other` - --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21 - | -LL | fn bar(&self, other: Foo) -> Foo<'a> { - | --- help: add explicit lifetime `'a` to the type of `other`: `Foo<'a>` -... -LL | other //~ ERROR explicit lifetime - | ^^^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.nll.stderr deleted file mode 100644 index a10c38a88d4c4..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 - | -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 - | -LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { - | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.nll.stderr deleted file mode 100644 index e33b89c56d5d8..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 - | -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ - -error[E0621]: explicit lifetime required in parameter type - --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 - | -LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { - | --------------- help: add explicit lifetime `'a` to type: `(&'a i32, &'a i32)` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.nll.stderr deleted file mode 100644 index a3b2c3f6f19c3..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:14:15 - | -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:14:15 - | -LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { - | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.nll.stderr deleted file mode 100644 index e13a710508d05..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:18:36 - | -LL | if true { &self.field } else { x } //~ ERROR explicit lifetime - | ^ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:18:36 - | -LL | fn foo<'a>(&'a self, x: &i32) -> &i32 { - | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` -LL | -LL | if true { &self.field } else { x } //~ ERROR explicit lifetime - | ^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr index 4ce3a613c315e..4e3193ccbfd5c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 - | -LL | if x > y { x } else { y } //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.nll.stderr deleted file mode 100644 index 5b4b28acee7c8..0000000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 - | -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ - -error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 - | -LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { - | ---- help: add explicit lifetime `'a` to the type of `y`: `&'a i32` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime - | ^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr index 272ae0b12519a..3413203fa7f06 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5 - | -LL | x //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr index 2106546325b2d..239419967f6c1 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30 - | -LL | if true { x } else { self } //~ ERROR lifetime mismatch - | ^^^^ - error: unsatisfied lifetime constraints --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr index a5fa83266a3db..709d9f84db3f9 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2a-push-one-existing-name-2.rs:16:12 - | -LL | y.push(x); //~ ERROR explicit lifetime - | ^ - error[E0621]: explicit lifetime required in the type of `x` --> $DIR/ex2a-push-one-existing-name-2.rs:16:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr index b4cbed03153a7..1e608fe16e413 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12 - | -LL | x.push(y); //~ ERROR explicit lifetime required - | ^ - error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr index 294a9106619a0..1419435209395 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2a-push-one-existing-name.rs:16:12 - | -LL | x.push(y); //~ ERROR explicit lifetime - | ^ - error[E0621]: explicit lifetime required in the type of `y` --> $DIR/ex2a-push-one-existing-name.rs:16:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr index b7c252cac9bc7..fc5f02fbc721d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2b-push-no-existing-names.rs:16:12 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex2b-push-no-existing-names.rs:16:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr index c34278b4d9fa1..a5053244dc1f0 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2c-push-inference-variable.rs:16:13 - | -LL | let z = Ref { data: y.data }; - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex2c-push-inference-variable.rs:17:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr index 3097d18e86c67..361fb708d4013 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2d-push-inference-variable-2.rs:17:13 - | -LL | let b = Ref { data: y.data }; - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex2d-push-inference-variable-2.rs:18:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr index ce0e9be300698..5d0f07054dfed 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex2e-push-inference-variable-3.rs:17:13 - | -LL | let b = Ref { data: y.data }; - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex2e-push-inference-variable-3.rs:18:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr index c7f1a0ede3c1c..017c3e977475c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-2.rs:12:10 - | -LL | *v = x; //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-2.rs:12:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr index 09980e44c52d6..e1872dcf777ec 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-3.rs:12:13 - | -LL | z.push((x,y)); //~ ERROR lifetime mismatch - | ^ - -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-3.rs:12:15 - | -LL | z.push((x,y)); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-3.rs:12:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr index 618817fd57b31..b8e1b483081ba 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:11 - | -LL | x.b = y.b; //~ ERROR lifetime mismatch - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr index b4767afd4138a..4b7352fe22491 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:11 - | -LL | x.a = x.b; //~ ERROR lifetime mismatch - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr index e2fcbaa4c3c55..53a2fef480671 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:11 - | -LL | x.a = x.b; //~ ERROR lifetime mismatch - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr index aed0dcc1a67ea..7f814b730fff5 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:12 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr index 7790d37d1c40d..f38dceb331bfb 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:12 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr index 79f1a8c0ccf7d..39a7154c8e955 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr index 459a93813a8ca..d59480cefcc69 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:12 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr index 0bacd894e6e9a..749b576092967 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:9 - | -LL | y = x.b; //~ ERROR lifetime mismatch - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr index f40c67b8d114c..d098354d98393 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:11 - | -LL | y.b = x; //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr index f9168dcf5837b..17a70aa85beeb 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:11 - | -LL | y.b = x; //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr index c43f847723240..2ebdedddc5075 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:11 - | -LL | x.b = y; //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr index 9680e8c2f6935..898f997779d1d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5 - | -LL | x //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr index 6fbe8e982093e..bdb9b306cdaea 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19 - | -LL | if true { x } else { self } //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr index 2829ec3500043..2e4df170d6cd5 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:10 - | -LL | y.push(z); //~ ERROR lifetime mismatch - | ^ - error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:3 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr index 44d68df4b5590..8d743608438ba 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:16 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:9 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr index 5d3c6f38ad808..a2dc0e4bda3b7 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:10 - | -LL | y.push(z); //~ ERROR lifetime mismatch - | ^ - error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:3 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr index 6460e5d687ff0..0d674162eea05 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ex3-both-anon-regions.rs:12:12 - | -LL | x.push(y); //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions.rs:12:5 | diff --git a/src/test/ui/lub-if.nll.stderr b/src/test/ui/lub-if.nll.stderr index d3f5cdca1759e..2405e30a8cd00 100644 --- a/src/test/ui/lub-if.nll.stderr +++ b/src/test/ui/lub-if.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/lub-if.rs:38:9 - | -LL | s //~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/lub-if.rs:45:9 - | -LL | s //~ ERROR E0312 - | ^ - error: unsatisfied lifetime constraints --> $DIR/lub-if.rs:38:9 | diff --git a/src/test/ui/lub-match.nll.stderr b/src/test/ui/lub-match.nll.stderr index bbddcc7d8b36a..5a39dd14e4c42 100644 --- a/src/test/ui/lub-match.nll.stderr +++ b/src/test/ui/lub-match.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/lub-match.rs:40:13 - | -LL | s //~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/lub-match.rs:49:13 - | -LL | s //~ ERROR E0312 - | ^ - error: unsatisfied lifetime constraints --> $DIR/lub-match.rs:40:13 | diff --git a/src/test/ui/match/match-ref-mut-invariance.nll.stderr b/src/test/ui/match/match-ref-mut-invariance.nll.stderr index 40dd9e25a1739..d5167bbaeab07 100644 --- a/src/test/ui/match/match-ref-mut-invariance.nll.stderr +++ b/src/test/ui/match/match-ref-mut-invariance.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/match-ref-mut-invariance.rs:20:37 - | -LL | match self.0 { ref mut x => x } //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/match-ref-mut-invariance.rs:20:9 | diff --git a/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr b/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr index 5314f37a3f88c..54915865d8899 100644 --- a/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr +++ b/src/test/ui/match/match-ref-mut-let-invariance.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/match-ref-mut-let-invariance.rs:21:9 - | -LL | x //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/match-ref-mut-let-invariance.rs:21:9 | diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.rs b/src/test/ui/nll/closure-requirements/escape-argument-callee.rs index 78208d6d7db7d..3c417493bc579 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.rs +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.rs @@ -35,7 +35,6 @@ fn test() { let y = 22; let mut closure = expect_sig(|p, y| *p = y); //~^ ERROR - //~| WARNING not reporting region error due to nll closure(&mut p, &y); } diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr index 862d1f0b179c0..72b60188c4c6c 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/escape-argument-callee.rs:36:50 - | -LL | let mut closure = expect_sig(|p, y| *p = y); - | ^ - note: No external requirements --> $DIR/escape-argument-callee.rs:36:38 | diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs index b879f9a33986d..4f2ec80b0d251 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs @@ -53,7 +53,6 @@ fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell |_outlives1, _outlives2, _outlives3, x, y| { // Only works if 'x: 'y: let p = x.get(); - //~^ WARN not reporting region error due to nll demand_y(x, y, p) //~ ERROR }, ); diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr index 72b7104b99dd3..892910686433a 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr @@ -1,16 +1,9 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-approximated-fail-no-postdom.rs:55:21 - | -LL | let p = x.get(); - | ^^^^^^^ - note: No external requirements --> $DIR/propagate-approximated-fail-no-postdom.rs:53:9 | LL | / |_outlives1, _outlives2, _outlives3, x, y| { LL | | // Only works if 'x: 'y: LL | | let p = x.get(); -LL | | //~^ WARN not reporting region error due to nll LL | | demand_y(x, y, p) //~ ERROR LL | | }, | |_________^ @@ -21,7 +14,7 @@ LL | | }, ] error: unsatisfied lifetime constraints - --> $DIR/propagate-approximated-fail-no-postdom.rs:57:13 + --> $DIR/propagate-approximated-fail-no-postdom.rs:56:13 | LL | |_outlives1, _outlives2, _outlives3, x, y| { | ---------- ---------- has type `std::cell::Cell<&'2 &u32>` diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs index d79be8b83c61f..700c0dffb7011 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs @@ -54,7 +54,7 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { //~^ ERROR unsatisfied lifetime constraints // Only works if 'x: 'y: - demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll + demand_y(x, y, x.get()) }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr index fe67ca0293e06..1ff9374c21267 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-approximated-ref.rs:57:9 - | -LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll - | ^^^^^^^^^^^^^^^^^^^^^^^ - note: External requirements --> $DIR/propagate-approximated-ref.rs:53:47 | @@ -12,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, LL | | //~^ ERROR unsatisfied lifetime constraints LL | | LL | | // Only works if 'x: 'y: -LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll +LL | | demand_y(x, y, x.get()) LL | | }); | |_____^ | @@ -48,7 +42,7 @@ LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, LL | | //~^ ERROR unsatisfied lifetime constraints LL | | LL | | // Only works if 'x: 'y: -LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll +LL | | demand_y(x, y, x.get()) LL | | }); | |______^ argument requires that `'a` must outlive `'b` diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs index a8ab41cebacce..54f9453797e6d 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs @@ -29,7 +29,6 @@ fn case1() { let a = 0; let cell = Cell::new(&a); foo(cell, |cell_a, cell_x| { - //~^ WARNING not reporting region error due to nll cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure //~^ ERROR }) diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index 43c39dee2448a..c855cee3c606a 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -1,15 +1,8 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5 - | -LL | foo(cell, |cell_a, cell_x| { - | ^^^ - note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15 | LL | foo(cell, |cell_a, cell_x| { | _______________^ -LL | | //~^ WARNING not reporting region error due to nll LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure LL | | //~^ ERROR LL | | }) @@ -21,13 +14,12 @@ LL | | }) ] error: borrowed data escapes outside of closure - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:32:9 | LL | foo(cell, |cell_a, cell_x| { | ------ ------ `cell_x` is a reference that is only valid in the closure body | | | `cell_a` is declared here, outside of the closure body -LL | //~^ WARNING not reporting region error due to nll LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure | ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here @@ -46,7 +38,7 @@ LL | | } = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs [] note: External requirements - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:46:15 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:45:15 | LL | foo(cell, |cell_a, cell_x| { | _______________^ @@ -62,7 +54,7 @@ LL | | }) = note: where '_#1r: '_#0r note: No external requirements - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:39:1 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:38:1 | LL | / fn case2() { LL | | let a = 0; @@ -76,7 +68,7 @@ LL | | } = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs [] error[E0597]: `a` does not live long enough - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:41:26 + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:40:26 | LL | let cell = Cell::new(&a); | ^^ borrowed value does not live long enough diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs index 26faccdde71ae..e32a4395f88e1 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs @@ -46,7 +46,7 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { //~^ ERROR // Only works if 'x: 'y: - demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll + demand_y(x, y, x.get()) }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index c3bbf1035dbc5..0d47935630484 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:49:9 - | -LL | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll - | ^^^^^^^^^^^^^^^^^^^^^^^ - note: External requirements --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 | @@ -12,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { LL | | //~^ ERROR LL | | LL | | // Only works if 'x: 'y: -LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll +LL | | demand_y(x, y, x.get()) LL | | }); | |_____^ | @@ -46,7 +40,7 @@ LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { LL | | //~^ ERROR LL | | LL | | // Only works if 'x: 'y: -LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll +LL | | demand_y(x, y, x.get()) LL | | }); | |______^ `cell_a` escapes the function body here diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs index 703d60371cdfc..0334f9ffd86fc 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs @@ -49,7 +49,6 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { //~^ ERROR // Only works if 'x: 'y: demand_y(x, y, x.get()) - //~^ WARNING not reporting region error due to nll }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index 9f259e2dee590..88743169fcbee 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9 - | -LL | demand_y(x, y, x.get()) - | ^^^^^^^^^^^^^^^^^^^^^^^ - note: External requirements --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 | @@ -12,7 +6,6 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, LL | | //~^ ERROR LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ WARNING not reporting region error due to nll LL | | }); | |_____^ | @@ -30,7 +23,7 @@ LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { LL | | //~^ ERROR LL | | // Only works if 'x: 'y: -... | +LL | | demand_y(x, y, x.get()) LL | | }); LL | | } | |_^ @@ -46,7 +39,6 @@ LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, LL | | //~^ ERROR LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ WARNING not reporting region error due to nll LL | | }); | |______^ `cell_a` escapes the function body here diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs index bf24557398d16..75641943f2fac 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs @@ -47,7 +47,7 @@ fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { //~^ ERROR unsatisfied lifetime constraints // Only works if 'x: 'y: - demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll + demand_y(outlives1, outlives2, x.get()) }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr index ed1fc6e1a712f..71dbc412fef4c 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-approximated-val.rs:50:9 - | -LL | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - note: External requirements --> $DIR/propagate-approximated-val.rs:46:45 | @@ -12,7 +6,7 @@ LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| LL | | //~^ ERROR unsatisfied lifetime constraints LL | | LL | | // Only works if 'x: 'y: -LL | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll +LL | | demand_y(outlives1, outlives2, x.get()) LL | | }); | |_____^ | @@ -48,7 +42,7 @@ LL | / establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| LL | | //~^ ERROR unsatisfied lifetime constraints LL | | LL | | // Only works if 'x: 'y: -LL | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll +LL | | demand_y(outlives1, outlives2, x.get()) LL | | }); | |______^ argument requires that `'a` must outlive `'b` diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr index 0888b1380e69e..d189385213fa1 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-despite-same-free-region.rs:54:21 - | -LL | let p = x.get(); - | ^^^^^^^ - note: External requirements --> $DIR/propagate-despite-same-free-region.rs:52:9 | diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs index 4b1f5231b3e87..31f38abf28022 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs @@ -45,8 +45,7 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { // Only works if 'x: 'y: demand_y(x, y, x.get()) - //~^ WARN not reporting region error due to nll - //~| ERROR + //~^ ERROR }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index cd5e6f29f5f48..a63c6b1670837 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9 - | -LL | demand_y(x, y, x.get()) - | ^^^^^^^^^^^^^^^^^^^^^^^ - note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47 | @@ -11,8 +5,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ WARN not reporting region error due to nll -LL | | //~| ERROR +LL | | //~^ ERROR LL | | }); | |_____^ | @@ -39,7 +32,7 @@ LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -... | +LL | | //~^ ERROR LL | | }); LL | | } | |_^ diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs index 62a20c1bfe76e..a4ff408b76625 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs @@ -49,8 +49,7 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { // Only works if 'x: 'y: demand_y(x, y, x.get()) - //~^ WARN not reporting region error due to nll - //~| ERROR + //~^ ERROR }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr index 2176575e0aa12..67510a5a81f11 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9 - | -LL | demand_y(x, y, x.get()) - | ^^^^^^^^^^^^^^^^^^^^^^^ - note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47 | @@ -11,8 +5,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, | _______________________________________________^ LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ WARN not reporting region error due to nll -LL | | //~| ERROR +LL | | //~^ ERROR LL | | }); | |_____^ | @@ -39,7 +32,7 @@ LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -... | +LL | | //~^ ERROR LL | | }); LL | | } | |_^ diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs index 7baf24f88f8fa..a6542d73fdb55 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs @@ -53,7 +53,6 @@ where // The latter does not hold. require(value); - //~^ WARNING not reporting region error due to nll }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr index 8f8a99df5f052..fda9743fb6b9b 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/propagate-from-trait-match.rs:55:9 - | -LL | require(value); - | ^^^^^^^ - note: External requirements --> $DIR/propagate-from-trait-match.rs:42:36 | @@ -13,7 +7,7 @@ LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | LL | | // This function call requires that ... | -LL | | //~^ WARNING not reporting region error due to nll +LL | | require(value); LL | | }); | |_____^ | @@ -52,7 +46,7 @@ LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | LL | | // This function call requires that ... | -LL | | //~^ WARNING not reporting region error due to nll +LL | | require(value); LL | | }); | |_____^ | diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs index a6b2e531ac28f..4382be05f031b 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs +++ b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs @@ -17,8 +17,7 @@ fn foo(x: &u32) -> &'static u32 { &*x - //~^ WARN not reporting region error due to nll - //~| ERROR explicit lifetime required in the type of `x` + //~^ ERROR explicit lifetime required in the type of `x` } fn main() { } diff --git a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr index a019a7224c630..9962e801653b3 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 - | -LL | &*x - | ^^^ - error[E0621]: explicit lifetime required in the type of `x` --> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5 | diff --git a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs index b5e8c95bc13b7..d2dcfd86ac096 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs +++ b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs @@ -17,8 +17,7 @@ fn foo<'a>(x: &'a u32) -> &'static u32 { &*x - //~^ WARN not reporting region error due to nll - //~| ERROR + //~^ ERROR } fn main() { } diff --git a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr index 00d79a9ed7e84..ff36017c3d0e5 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 - | -LL | &*x - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5 | diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs index a883e7b199473..d793b0ba0be58 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs +++ b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs @@ -17,8 +17,7 @@ fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { &*x - //~^ WARN not reporting region error due to nll - //~| ERROR unsatisfied lifetime constraints + //~^ ERROR unsatisfied lifetime constraints } fn main() { } diff --git a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr index bcdae17c47ce0..2392e75538d37 100644 --- a/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr +++ b/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 - | -LL | &*x - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5 | diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs index d88729d04d95b..d45b7182305a8 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs @@ -19,8 +19,7 @@ #[rustc_regions] fn test() { expect_sig(|a, b| b); // ought to return `a` - //~^ WARN not reporting region error due to nll - //~| ERROR + //~^ ERROR } fn expect_sig(f: F) -> F diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr index 8dc10de702f7a..d3eb3d46d21e7 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/return-wrong-bound-region.rs:21:23 - | -LL | expect_sig(|a, b| b); // ought to return `a` - | ^ - note: No external requirements --> $DIR/return-wrong-bound-region.rs:21:16 | @@ -29,8 +23,7 @@ note: No external requirements | LL | / fn test() { LL | | expect_sig(|a, b| b); // ought to return `a` -LL | | //~^ WARN not reporting region error due to nll -LL | | //~| ERROR +LL | | //~^ ERROR LL | | } | |_^ | diff --git a/src/test/ui/nll/mir_check_cast_closure.rs b/src/test/ui/nll/mir_check_cast_closure.rs index a111699c3f70d..577fdd7b54864 100644 --- a/src/test/ui/nll/mir_check_cast_closure.rs +++ b/src/test/ui/nll/mir_check_cast_closure.rs @@ -15,8 +15,7 @@ fn bar<'a, 'b>() -> fn(&'a u32, &'b u32) -> &'a u32 { let g: fn(_, _) -> _ = |_x, y| y; g - //~^ WARNING not reporting region error due to nll - //~^^ ERROR unsatisfied lifetime constraints + //~^ ERROR unsatisfied lifetime constraints } fn main() {} diff --git a/src/test/ui/nll/mir_check_cast_closure.stderr b/src/test/ui/nll/mir_check_cast_closure.stderr index 6805dbf6f3055..6433668031b98 100644 --- a/src/test/ui/nll/mir_check_cast_closure.stderr +++ b/src/test/ui/nll/mir_check_cast_closure.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/mir_check_cast_closure.rs:17:5 - | -LL | g - | ^ - error: unsatisfied lifetime constraints --> $DIR/mir_check_cast_closure.rs:17:5 | diff --git a/src/test/ui/nll/mir_check_cast_reify.rs b/src/test/ui/nll/mir_check_cast_reify.rs index 3a530c1e7473d..93f10b96c2220 100644 --- a/src/test/ui/nll/mir_check_cast_reify.rs +++ b/src/test/ui/nll/mir_check_cast_reify.rs @@ -44,7 +44,6 @@ fn bar<'a>(x: &'a u32) -> &'static u32 { // The MIR type checker must therefore relate `'?0` to `'?1` and `'?2` // as part of checking the `ReifyFnPointer`. let f: fn(_) -> _ = foo; - //~^ WARNING not reporting region error due to nll f(x) //~^ ERROR } diff --git a/src/test/ui/nll/mir_check_cast_reify.stderr b/src/test/ui/nll/mir_check_cast_reify.stderr index c6e5fb397b9e6..fdb71b17287d9 100644 --- a/src/test/ui/nll/mir_check_cast_reify.stderr +++ b/src/test/ui/nll/mir_check_cast_reify.stderr @@ -1,11 +1,5 @@ -warning: not reporting region error due to nll - --> $DIR/mir_check_cast_reify.rs:46:25 - | -LL | let f: fn(_) -> _ = foo; - | ^^^ - error: unsatisfied lifetime constraints - --> $DIR/mir_check_cast_reify.rs:48:5 + --> $DIR/mir_check_cast_reify.rs:47:5 | LL | fn bar<'a>(x: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/mir_check_cast_unsafe_fn.rs b/src/test/ui/nll/mir_check_cast_unsafe_fn.rs index 4a840da028d81..71dcfc8886cc5 100644 --- a/src/test/ui/nll/mir_check_cast_unsafe_fn.rs +++ b/src/test/ui/nll/mir_check_cast_unsafe_fn.rs @@ -16,7 +16,6 @@ fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 { // Here the NLL checker must relate the types in `f` to the types // in `g`. These are related via the `UnsafeFnPointer` cast. let g: unsafe fn(_) -> _ = f; - //~^ WARNING not reporting region error due to nll unsafe { g(input) } //~^ ERROR } diff --git a/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr b/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr index e8315d341a7f3..c14fb93a525e5 100644 --- a/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr +++ b/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr @@ -1,11 +1,5 @@ -warning: not reporting region error due to nll - --> $DIR/mir_check_cast_unsafe_fn.rs:18:32 - | -LL | let g: unsafe fn(_) -> _ = f; - | ^ - error: unsatisfied lifetime constraints - --> $DIR/mir_check_cast_unsafe_fn.rs:20:14 + --> $DIR/mir_check_cast_unsafe_fn.rs:19:14 | LL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 { | -- lifetime `'a` defined here diff --git a/src/test/ui/nll/mir_check_cast_unsize.rs b/src/test/ui/nll/mir_check_cast_unsize.rs index 7ef6572a5d799..b1889b8aab2fe 100644 --- a/src/test/ui/nll/mir_check_cast_unsize.rs +++ b/src/test/ui/nll/mir_check_cast_unsize.rs @@ -17,7 +17,6 @@ use std::fmt::Debug; fn bar<'a>(x: &'a u32) -> &'static dyn Debug { x //~^ ERROR unsatisfied lifetime constraints - //~| WARNING not reporting region error due to nll } fn main() {} diff --git a/src/test/ui/nll/mir_check_cast_unsize.stderr b/src/test/ui/nll/mir_check_cast_unsize.stderr index a965e611f992a..526dfb6013386 100644 --- a/src/test/ui/nll/mir_check_cast_unsize.stderr +++ b/src/test/ui/nll/mir_check_cast_unsize.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/mir_check_cast_unsize.rs:18:5 - | -LL | x - | ^ - error: unsatisfied lifetime constraints --> $DIR/mir_check_cast_unsize.rs:18:5 | diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.rs b/src/test/ui/nll/ty-outlives/impl-trait-captures.rs index f21127064d4c2..3d9b194484565 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-captures.rs +++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.rs @@ -19,8 +19,7 @@ impl<'a, T> Foo<'a> for T { } fn foo<'a, T>(x: &T) -> impl Foo<'a> { x - //~^ WARNING not reporting region error due to nll - //~| ERROR explicit lifetime required in the type of `x` [E0621] + //~^ ERROR explicit lifetime required in the type of `x` [E0621] } fn main() {} diff --git a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr index a4f0e53386f9f..7cf24a1967701 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-captures.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/impl-trait-captures.rs:21:5 - | -LL | x - | ^ - error[E0621]: explicit lifetime required in the type of `x` --> $DIR/impl-trait-captures.rs:21:5 | diff --git a/src/test/ui/nll/ty-outlives/impl-trait-outlives.rs b/src/test/ui/nll/ty-outlives/impl-trait-outlives.rs index 182e11da082f8..4366636589223 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.rs +++ b/src/test/ui/nll/ty-outlives/impl-trait-outlives.rs @@ -15,7 +15,6 @@ use std::fmt::Debug; fn no_region<'a, T>(x: Box) -> impl Debug + 'a - //~^ WARNING not reporting region error due to nll where T: Debug, { @@ -31,7 +30,6 @@ where } fn wrong_region<'a, 'b, T>(x: Box) -> impl Debug + 'a - //~^ WARNING not reporting region error due to nll where T: 'b + Debug, { diff --git a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr index 50b80282e6241..05b674f8a9db5 100644 --- a/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr +++ b/src/test/ui/nll/ty-outlives/impl-trait-outlives.stderr @@ -1,17 +1,5 @@ -warning: not reporting region error due to nll - --> $DIR/impl-trait-outlives.rs:17:35 - | -LL | fn no_region<'a, T>(x: Box) -> impl Debug + 'a - | ^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/impl-trait-outlives.rs:33:42 - | -LL | fn wrong_region<'a, 'b, T>(x: Box) -> impl Debug + 'a - | ^^^^^^^^^^^^^^^ - error[E0309]: the parameter type `T` may not live long enough - --> $DIR/impl-trait-outlives.rs:22:5 + --> $DIR/impl-trait-outlives.rs:21:5 | LL | x | ^ @@ -19,7 +7,7 @@ LL | x = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error[E0309]: the parameter type `T` may not live long enough - --> $DIR/impl-trait-outlives.rs:38:5 + --> $DIR/impl-trait-outlives.rs:36:5 | LL | x | ^ diff --git a/src/test/ui/nll/ty-outlives/projection-implied-bounds.rs b/src/test/ui/nll/ty-outlives/projection-implied-bounds.rs index d8f077467d9fc..1509ac8abd93d 100644 --- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.rs +++ b/src/test/ui/nll/ty-outlives/projection-implied-bounds.rs @@ -43,8 +43,7 @@ where #[rustc_errors] fn generic2(value: T) { twice(value, |value_ref, item| invoke2(value_ref, item)); - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn invoke2<'a, T, U>(a: &T, b: Cell<&'a Option>) diff --git a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr index 0a2bd3247655a..17de9f79e3231 100644 --- a/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr +++ b/src/test/ui/nll/ty-outlives/projection-implied-bounds.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/projection-implied-bounds.rs:45:36 - | -LL | twice(value, |value_ref, item| invoke2(value_ref, item)); - | ^^^^^^^ - error[E0310]: the parameter type `T` may not live long enough --> $DIR/projection-implied-bounds.rs:45:18 | diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs index 4767b75d89c1a..d61bbf27809dc 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs @@ -33,8 +33,7 @@ where T: Iterator, { with_signature(x, |mut y| Box::new(y.next())) - //~^ WARNING not reporting region error due to nll - //~| ERROR the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } #[rustc_regions] @@ -51,8 +50,7 @@ where T: 'b + Iterator, { with_signature(x, |mut y| Box::new(y.next())) - //~^ WARNING not reporting region error due to nll - //~| ERROR the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } #[rustc_regions] diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index 6d2170729ffb9..61e9794b76e2e 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/projection-no-regions-closure.rs:35:31 - | -LL | with_signature(x, |mut y| Box::new(y.next())) - | ^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-no-regions-closure.rs:53:31 - | -LL | with_signature(x, |mut y| Box::new(y.next())) - | ^^^^^^^^^^^^^^^^^^ - note: External requirements --> $DIR/projection-no-regions-closure.rs:35:23 | @@ -32,8 +20,8 @@ LL | / fn no_region<'a, T>(x: Box) -> Box LL | | where LL | | T: Iterator, LL | | { -... | -LL | | //~| ERROR the associated type `::Item` may not live long enough +LL | | with_signature(x, |mut y| Box::new(y.next())) +LL | | //~^ ERROR the associated type `::Item` may not live long enough LL | | } | |_^ | @@ -51,7 +39,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... note: External requirements - --> $DIR/projection-no-regions-closure.rs:45:23 + --> $DIR/projection-no-regions-closure.rs:44:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -66,7 +54,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#2r note: No external requirements - --> $DIR/projection-no-regions-closure.rs:41:1 + --> $DIR/projection-no-regions-closure.rs:40:1 | LL | / fn correct_region<'a, T>(x: Box) -> Box LL | | where @@ -82,7 +70,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:53:23 + --> $DIR/projection-no-regions-closure.rs:52:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,14 +86,14 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#3r note: No external requirements - --> $DIR/projection-no-regions-closure.rs:49:1 + --> $DIR/projection-no-regions-closure.rs:48:1 | LL | / fn wrong_region<'a, 'b, T>(x: Box) -> Box LL | | where LL | | T: 'b + Iterator, LL | | { -... | -LL | | //~| ERROR the associated type `::Item` may not live long enough +LL | | with_signature(x, |mut y| Box::new(y.next())) +LL | | //~^ ERROR the associated type `::Item` may not live long enough LL | | } | |_^ | @@ -116,7 +104,7 @@ LL | | } ] error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-closure.rs:53:23 + --> $DIR/projection-no-regions-closure.rs:52:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -124,7 +112,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... note: External requirements - --> $DIR/projection-no-regions-closure.rs:64:23 + --> $DIR/projection-no-regions-closure.rs:62:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,7 +128,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#3r note: No external requirements - --> $DIR/projection-no-regions-closure.rs:59:1 + --> $DIR/projection-no-regions-closure.rs:57:1 | LL | / fn outlives_region<'a, 'b, T>(x: Box) -> Box LL | | where diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs index dea2daf7e8eeb..286aa6ca6e033 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs @@ -21,8 +21,7 @@ where T: Iterator, { Box::new(x.next()) - //~^ WARNING not reporting region error due to nll - //~| the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } fn correct_region<'a, T>(mut x: T) -> Box @@ -37,8 +36,7 @@ where T: 'b + Iterator, { Box::new(x.next()) - //~^ WARNING not reporting region error due to nll - //~| the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } fn outlives_region<'a, 'b, T>(mut x: T) -> Box diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr index 3199ec151335d..5f365557ae258 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/projection-no-regions-fn.rs:23:5 - | -LL | Box::new(x.next()) - | ^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-no-regions-fn.rs:39:5 - | -LL | Box::new(x.next()) - | ^^^^^^^^^^^^^^^^^^ - error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:23:5 | @@ -19,7 +7,7 @@ LL | Box::new(x.next()) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-fn.rs:39:5 + --> $DIR/projection-no-regions-fn.rs:38:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs index 0a8801a3c4d6d..995c4d6dc8133 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs @@ -53,8 +53,7 @@ where T: Anything<'b>, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough //~| ERROR } @@ -65,8 +64,7 @@ where 'a: 'a, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough //~| ERROR } @@ -87,8 +85,7 @@ where // can do better here with a more involved verification step. with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough //~| ERROR } diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index 2b0e682f85161..918cf53cf36fa 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:55:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:67:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:89:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - note: External requirements --> $DIR/projection-one-region-closure.rs:55:29 | @@ -69,7 +51,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`... note: External requirements - --> $DIR/projection-one-region-closure.rs:67:29 + --> $DIR/projection-one-region-closure.rs:66:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -86,7 +68,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-closure.rs:62:1 + --> $DIR/projection-one-region-closure.rs:61:1 | LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -104,7 +86,7 @@ LL | | } ] error: unsatisfied lifetime constraints - --> $DIR/projection-one-region-closure.rs:67:5 + --> $DIR/projection-one-region-closure.rs:66:5 | LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) | -- -- lifetime `'b` defined here @@ -115,7 +97,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a` error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:67:29 + --> $DIR/projection-one-region-closure.rs:66:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -123,7 +105,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... note: External requirements - --> $DIR/projection-one-region-closure.rs:89:29 + --> $DIR/projection-one-region-closure.rs:87:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,7 +122,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-closure.rs:74:1 + --> $DIR/projection-one-region-closure.rs:72:1 | LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -158,7 +140,7 @@ LL | | } ] error: unsatisfied lifetime constraints - --> $DIR/projection-one-region-closure.rs:89:5 + --> $DIR/projection-one-region-closure.rs:87:5 | LL | fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) | -- -- lifetime `'b` defined here @@ -169,7 +151,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a` error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:89:29 + --> $DIR/projection-one-region-closure.rs:87:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -177,7 +159,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... note: External requirements - --> $DIR/projection-one-region-closure.rs:102:29 + --> $DIR/projection-one-region-closure.rs:99:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -194,7 +176,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-closure.rs:96:1 + --> $DIR/projection-one-region-closure.rs:93:1 | LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs index 6317d6eca1f1d..923faadc29618 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs @@ -45,8 +45,7 @@ where T: Anything<'b>, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR + //~^ ERROR } #[rustc_regions] @@ -56,8 +55,7 @@ where 'a: 'a, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR + //~^ ERROR } #[rustc_regions] @@ -77,8 +75,7 @@ where // can do better here with a more involved verification step. with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR + //~^ ERROR } #[rustc_regions] diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index 739bde4a481c5..ab1ad42f2a97e 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:47:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:58:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:79:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:47:29 | @@ -38,8 +20,8 @@ LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b>, LL | | { -... | -LL | | //~| ERROR +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | //~^ ERROR LL | | } | |_^ | @@ -60,7 +42,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a` note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:58:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:57:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -76,14 +58,14 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:53:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:52:1 | LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b>, LL | | 'a: 'a, ... | -LL | | //~| ERROR +LL | | //~^ ERROR LL | | } | |_^ | @@ -94,7 +76,7 @@ LL | | } ] error: unsatisfied lifetime constraints - --> $DIR/projection-one-region-trait-bound-closure.rs:58:5 + --> $DIR/projection-one-region-trait-bound-closure.rs:57:5 | LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) | -- -- lifetime `'b` defined here @@ -105,7 +87,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a` note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:79:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:77:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -121,14 +103,14 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:64:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:62:1 | LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b>, LL | | T::AssocType: 'a, ... | -LL | | //~| ERROR +LL | | //~^ ERROR LL | | } | |_^ | @@ -139,7 +121,7 @@ LL | | } ] error: unsatisfied lifetime constraints - --> $DIR/projection-one-region-trait-bound-closure.rs:79:5 + --> $DIR/projection-one-region-trait-bound-closure.rs:77:5 | LL | fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) | -- -- lifetime `'b` defined here @@ -150,7 +132,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a` note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:90:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:87:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -166,7 +148,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:85:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:82:1 | LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -184,7 +166,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:102:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:99:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -199,7 +181,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#1r: '_#2r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:94:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:91:1 | LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs index 4e51a2bedc8c5..72c1a631396be 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs @@ -46,8 +46,7 @@ where T: Anything<'b, 'c>, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR associated type `>::AssocType` may not live long enough + //~^ ERROR associated type `>::AssocType` may not live long enough } #[rustc_regions] @@ -57,8 +56,7 @@ where 'a: 'a, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR associated type `>::AssocType` may not live long enough + //~^ ERROR associated type `>::AssocType` may not live long enough } #[rustc_regions] @@ -78,8 +76,7 @@ where // can do better here with a more involved verification step. with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR associated type `>::AssocType` may not live long enough + //~^ ERROR associated type `>::AssocType` may not live long enough } #[rustc_regions] @@ -106,8 +103,7 @@ where T: Anything<'b, 'b>, { with_signature(cell, t, |cell, t| require(cell, t)); - //~^ WARNING not reporting region error due to nll - //~| ERROR + //~^ ERROR } #[rustc_regions] diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index 6838e0f3b3d01..9cabd29b12dc4 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:48:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:59:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:80:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:108:39 - | -LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^ - note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:48:29 | @@ -45,8 +21,8 @@ LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b, 'c>, LL | | { -... | -LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | //~^ ERROR associated type `>::AssocType` may not live long enough LL | | } | |_^ | @@ -65,7 +41,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`... note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:59:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:58:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -82,14 +58,14 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:54:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:53:1 | LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b, 'c>, LL | | 'a: 'a, ... | -LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | //~^ ERROR associated type `>::AssocType` may not live long enough LL | | } | |_^ | @@ -101,7 +77,7 @@ LL | | } ] error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:59:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:58:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -109,7 +85,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:80:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:78:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -126,14 +102,14 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:65:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:63:1 | LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b, 'c>, LL | | T::AssocType: 'a, ... | -LL | | //~| ERROR associated type `>::AssocType` may not live long enough +LL | | //~^ ERROR associated type `>::AssocType` may not live long enough LL | | } | |_^ | @@ -145,7 +121,7 @@ LL | | } ] error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:80:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:78:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -153,7 +129,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:91:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:88:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -170,7 +146,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:86:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:83:1 | LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -189,7 +165,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:100:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:97:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -206,7 +182,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:95:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:92:1 | LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -225,7 +201,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:108:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:105:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -240,14 +216,14 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#2r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:104:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:101:1 | LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where LL | | T: Anything<'b, 'b>, LL | | { -... | -LL | | //~| ERROR +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | //~^ ERROR LL | | } | |_^ | @@ -257,7 +233,7 @@ LL | | } ] error: unsatisfied lifetime constraints - --> $DIR/projection-two-region-trait-bound-closure.rs:108:5 + --> $DIR/projection-two-region-trait-bound-closure.rs:105:5 | LL | fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) | -- -- lifetime `'b` defined here @@ -268,7 +244,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a` note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:119:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:115:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -284,7 +260,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#3r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:114:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:110:1 | LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -302,7 +278,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:131:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:127:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -317,7 +293,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#2r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:123:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:119:1 | LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs index 7ff4b484af17b..ec6914f2630b1 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs @@ -32,17 +32,12 @@ where fn generic(value: T) { let cell = Cell::new(&()); twice(cell, value, |a, b| invoke(a, b)); - //~^ WARNING not reporting region error - // - // This error from the old region solver looks bogus. } #[rustc_regions] fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { twice(cell, value, |a, b| invoke(a, b)); - //~^ WARNING not reporting region error - //~| WARNING not reporting region error - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn invoke<'a, 'x, T>(x: Option>, y: &T) diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index 87f55b4e14d96..6050e627c71fd 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:31 - | -LL | twice(cell, value, |a, b| invoke(a, b)); - | ^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31 - | -LL | twice(cell, value, |a, b| invoke(a, b)); - | ^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31 - | -LL | twice(cell, value, |a, b| invoke(a, b)); - | ^^^^^^^^^^^^ - note: External requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:24 | @@ -36,9 +18,6 @@ note: No external requirements LL | / fn generic(value: T) { LL | | let cell = Cell::new(&()); LL | | twice(cell, value, |a, b| invoke(a, b)); -LL | | //~^ WARNING not reporting region error -LL | | // -LL | | // This error from the old region solver looks bogus. LL | | } | |_^ | @@ -47,7 +26,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:39:24 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ @@ -61,13 +40,11 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = note: where T: '_#1r note: No external requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:41:1 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:38:1 | LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { LL | | twice(cell, value, |a, b| invoke(a, b)); -LL | | //~^ WARNING not reporting region error -LL | | //~| WARNING not reporting region error -LL | | //~| ERROR the parameter type `T` may not live long enough +LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | } | |_^ | @@ -76,7 +53,7 @@ LL | | } ] error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:39:24 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs index b5cbd07b99c18..cd47cc524d4ab 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs @@ -34,8 +34,7 @@ where // `'a` (and subsequently reports an error). with_signature(x, |y| y) - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn correct_region<'a, T>(x: Box) -> Box @@ -50,8 +49,7 @@ where T: 'b + Debug, { x - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn outlives_region<'a, 'b, T>(x: Box) -> Box diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index aec0d98c79aa4..5215f6a527711 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:27 - | -LL | with_signature(x, |y| y) - | ^ - -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5 - | -LL | x - | ^ - note: External requirements --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23 | @@ -33,7 +21,7 @@ LL | | where LL | | T: Debug, LL | | { ... | -LL | | //~| ERROR the parameter type `T` may not live long enough +LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | } | |_^ | @@ -51,7 +39,7 @@ LL | with_signature(x, |y| y) = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:51:5 | LL | x | ^ diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs index edaaeac080d4d..aadf56e1fd088 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs @@ -42,7 +42,6 @@ fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { // function, there is no where clause *anywhere*, and hence we // get an error (but reported by the closure creator). require(&x, &y) - //~^ WARNING not reporting region error due to nll }) } @@ -76,7 +75,6 @@ where //~^ ERROR the parameter type `T` may not live long enough // See `correct_region` require(&x, &y) - //~^ WARNING not reporting region error due to nll }) } diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index 67a158860d64c..7129ec397de75 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:44:9 - | -LL | require(&x, &y) - | ^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:78:9 - | -LL | require(&x, &y) - | ^^^^^^^ - note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26 | @@ -19,7 +7,7 @@ LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | // LL | | // See `correct_region`, which explains the point of this ... | -LL | | //~^ WARNING not reporting region error due to nll +LL | | require(&x, &y) LL | | }) | |_____^ | @@ -56,14 +44,14 @@ LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | // LL | | // See `correct_region`, which explains the point of this ... | -LL | | //~^ WARNING not reporting region error due to nll +LL | | require(&x, &y) LL | | }) | |_____^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`... note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:54:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:53:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -85,7 +73,7 @@ LL | | }) = note: where T: '_#2r note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:50:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:49:1 | LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) LL | | where @@ -102,14 +90,13 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:74:26 | LL | with_signature(a, b, |x, y| { | __________________________^ LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | // See `correct_region` LL | | require(&x, &y) -LL | | //~^ WARNING not reporting region error due to nll LL | | }) | |_____^ | @@ -123,7 +110,7 @@ LL | | }) = note: where T: '_#2r note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:71:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:70:1 | LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) LL | | where @@ -140,21 +127,20 @@ LL | | } ] error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:74:26 | LL | with_signature(a, b, |x, y| { | __________________________^ LL | | //~^ ERROR the parameter type `T` may not live long enough LL | | // See `correct_region` LL | | require(&x, &y) -LL | | //~^ WARNING not reporting region error due to nll LL | | }) | |_____^ | = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`... note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:89:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:87:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -174,7 +160,7 @@ LL | | }) = note: where T: '_#3r note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:84:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:82:1 | LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs b/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs index 6226108ef196f..10709327684cd 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs @@ -27,8 +27,7 @@ fn region_within_body(t: T) { // Error here, because T: 'a is not satisfied. fn region_static<'a, T>(cell: Cell<&'a usize>, t: T) { outlives(cell, t) - //~^ WARNING not reporting region error due to nll - //~| ERROR the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn outlives<'a, T>(x: Cell<&'a usize>, y: T) diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr index 537f12234708e..d6caae090a4b5 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ty-param-fn-body.rs:29:5 - | -LL | outlives(cell, t) - | ^^^^^^^^ - error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn-body.rs:29:5 | diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.rs b/src/test/ui/nll/ty-outlives/ty-param-fn.rs index 258d77eb2b078..1e49f7e5b19a3 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.rs @@ -19,8 +19,7 @@ where T: Debug, { x - //~^ WARNING not reporting region error due to nll - //~| the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn correct_region<'a, T>(x: Box) -> Box @@ -35,8 +34,7 @@ where T: 'b + Debug, { x - //~^ WARNING not reporting region error due to nll - //~| the parameter type `T` may not live long enough + //~^ ERROR the parameter type `T` may not live long enough } fn outlives_region<'a, 'b, T>(x: Box) -> Box diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr index 5ce50d8118578..7f137dcf05c81 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/ty-param-fn.rs:21:5 - | -LL | x - | ^ - -warning: not reporting region error due to nll - --> $DIR/ty-param-fn.rs:37:5 - | -LL | x - | ^ - error[E0309]: the parameter type `T` may not live long enough --> $DIR/ty-param-fn.rs:21:5 | @@ -19,7 +7,7 @@ LL | x = help: consider adding an explicit lifetime bound `T: 'a`... error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn.rs:37:5 + --> $DIR/ty-param-fn.rs:36:5 | LL | x | ^ diff --git a/src/test/ui/nll/where_clauses_in_functions.rs b/src/test/ui/nll/where_clauses_in_functions.rs index 0efdd19df3c88..0cadc802d06e7 100644 --- a/src/test/ui/nll/where_clauses_in_functions.rs +++ b/src/test/ui/nll/where_clauses_in_functions.rs @@ -22,7 +22,6 @@ where fn bar<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { foo(x, y) //~^ ERROR unsatisfied lifetime constraints - //~| WARNING not reporting region error due to nll } fn main() {} diff --git a/src/test/ui/nll/where_clauses_in_functions.stderr b/src/test/ui/nll/where_clauses_in_functions.stderr index 3d5dd4beb04f6..0c6913911ed5c 100644 --- a/src/test/ui/nll/where_clauses_in_functions.stderr +++ b/src/test/ui/nll/where_clauses_in_functions.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/where_clauses_in_functions.rs:23:5 - | -LL | foo(x, y) - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/where_clauses_in_functions.rs:23:5 | diff --git a/src/test/ui/nll/where_clauses_in_structs.rs b/src/test/ui/nll/where_clauses_in_structs.rs index 92e7db8617344..4b5a49dfae707 100644 --- a/src/test/ui/nll/where_clauses_in_structs.rs +++ b/src/test/ui/nll/where_clauses_in_structs.rs @@ -22,7 +22,6 @@ struct Foo<'a: 'b, 'b> { fn bar<'a, 'b>(x: Cell<&'a u32>, y: Cell<&'b u32>) { Foo { x, y }; //~^ ERROR unsatisfied lifetime constraints - //~| WARNING not reporting region error due to nll } fn main() {} diff --git a/src/test/ui/nll/where_clauses_in_structs.stderr b/src/test/ui/nll/where_clauses_in_structs.stderr index c7ad9879b29cf..636498eae927c 100644 --- a/src/test/ui/nll/where_clauses_in_structs.stderr +++ b/src/test/ui/nll/where_clauses_in_structs.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/where_clauses_in_structs.rs:23:5 - | -LL | Foo { x, y }; - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/where_clauses_in_structs.rs:23:11 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr index 2dc0a10f425ae..e132ec67b9632 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-elision.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-elision.rs:81:5 - | -LL | ss - | ^^ - error: unsatisfied lifetime constraints --> $DIR/object-lifetime-default-elision.rs:81:5 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr index 19279b53c1c8b..e0c291928283c 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-from-box-error.rs:28:5 - | -LL | ss.r //~ ERROR explicit lifetime required in the type of `ss` [E0621] - | ^^^^ - -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-from-box-error.rs:41:12 - | -LL | ss.r = b; //~ ERROR 41:12: 41:13: explicit lifetime required in the type of `ss` [E0621] - | ^ - error[E0621]: explicit lifetime required in the type of `ss` --> $DIR/object-lifetime-default-from-box-error.rs:28:5 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr index 42bcdf2bd8c55..e62b9b070213d 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-from-rptr-box-error.rs:25:12 - | -LL | ss.t = t; //~ ERROR mismatched types - | ^ - error: borrowed data escapes outside of function --> $DIR/object-lifetime-default-from-rptr-box-error.rs:25:5 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr index 73b419d511343..803f9d3fd7e5c 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:31:12 - | -LL | ss.t = t; //~ ERROR mismatched types - | ^ - error: borrowed data escapes outside of function --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:31:5 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr index 14a3cbf9e2948..41988b31e9745 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-mybox.rs:37:5 - | -LL | a //~ ERROR lifetime mismatch - | ^ - -warning: not reporting region error due to nll - --> $DIR/object-lifetime-default-mybox.rs:41:11 - | -LL | load0(ss) //~ ERROR mismatched types - | ^^ - error: unsatisfied lifetime constraints --> $DIR/object-lifetime-default-mybox.rs:37:5 | diff --git a/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr b/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr index 9fc12ae05b44f..c9714de1f0975 100644 --- a/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr +++ b/src/test/ui/regions/region-invariant-static-error-reporting.nll.stderr @@ -1,14 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-invariant-static-error-reporting.rs:24:15 - | -LL | let bad = if x.is_some() { - | _______________^ -LL | | x.unwrap() -LL | | } else { -LL | | mk_static() -LL | | }; - | |_____^ - error: borrowed data escapes outside of function --> $DIR/region-invariant-static-error-reporting.rs:25:9 | diff --git a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr index 9124347831344..01bc022acb1cb 100644 --- a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr +++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:18:10 - | -LL | *x = *y; //~ ERROR E0623 - | ^^ - -warning: not reporting region error due to nll - --> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:24:5 - | -LL | a(x, y); //~ ERROR 24:7: 24:8: lifetime mismatch [E0623] - | ^ - error[E0308]: mismatched types --> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:30:43 | diff --git a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr index 655b199fc65a8..44f8f9e46f3fe 100644 --- a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr +++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:19:10 - | -LL | *x = *y; //~ ERROR E0623 - | ^^ - -warning: not reporting region error due to nll - --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:20:10 - | -LL | *z = *y; //~ ERROR E0623 - | ^^ - -warning: not reporting region error due to nll - --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:26:5 - | -LL | a(x, y, z); //~ ERROR 26:7: 26:8: lifetime mismatch [E0623] - | ^ - error[E0308]: mismatched types --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:32:56 | diff --git a/src/test/ui/regions/region-object-lifetime-2.nll.stderr b/src/test/ui/regions/region-object-lifetime-2.nll.stderr index 135a115cecfa5..4e1b8b7e1a076 100644 --- a/src/test/ui/regions/region-object-lifetime-2.nll.stderr +++ b/src/test/ui/regions/region-object-lifetime-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-object-lifetime-2.rs:20:7 - | -LL | x.borrowed() //~ ERROR cannot infer - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/region-object-lifetime-2.rs:20:5 | diff --git a/src/test/ui/regions/region-object-lifetime-4.nll.stderr b/src/test/ui/regions/region-object-lifetime-4.nll.stderr index 7bae6ccb37c92..5f1f70dfe1935 100644 --- a/src/test/ui/regions/region-object-lifetime-4.nll.stderr +++ b/src/test/ui/regions/region-object-lifetime-4.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-object-lifetime-4.rs:22:7 - | -LL | x.borrowed() //~ ERROR cannot infer - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/region-object-lifetime-4.rs:22:5 | diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr index f0def1888b9cd..e8c1d7e74a038 100644 --- a/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr +++ b/src/test/ui/regions/region-object-lifetime-in-coercion.nll.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/region-object-lifetime-in-coercion.rs:18:42 - | -LL | let x: Box = Box::new(v); - | ^ - -warning: not reporting region error due to nll - --> $DIR/region-object-lifetime-in-coercion.rs:24:14 - | -LL | Box::new(v) - | ^ - -warning: not reporting region error due to nll - --> $DIR/region-object-lifetime-in-coercion.rs:31:14 - | -LL | Box::new(v) - | ^ - -warning: not reporting region error due to nll - --> $DIR/region-object-lifetime-in-coercion.rs:36:14 - | -LL | Box::new(v) - | ^ - error[E0621]: explicit lifetime required in the type of `v` --> $DIR/region-object-lifetime-in-coercion.rs:18:33 | diff --git a/src/test/ui/regions/regions-addr-of-self.nll.stderr b/src/test/ui/regions/regions-addr-of-self.nll.stderr index cad1384f198f7..18578a1813445 100644 --- a/src/test/ui/regions/regions-addr-of-self.nll.stderr +++ b/src/test/ui/regions/regions-addr-of-self.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-addr-of-self.rs:17:37 - | -LL | let p: &'static mut usize = &mut self.cats_chased; //~ ERROR cannot infer - | ^^^^^^^^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-addr-of-self.rs:17:37 | diff --git a/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr b/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr index 0ee86172368cf..d20cf12f4161a 100644 --- a/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr +++ b/src/test/ui/regions/regions-addr-of-upvar-self.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-addr-of-upvar-self.rs:20:41 - | -LL | let p: &'static mut usize = &mut self.food; //~ ERROR cannot infer - | ^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-addr-of-upvar-self.rs:20:41 | diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr index 553eedec398ce..a292bacc674bf 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-bounded-method-type-parameters-cross-crate.rs:30:7 - | -LL | a.bigger_region(b) //~ ERROR 30:7: 30:20: lifetime mismatch [E0623] - | ^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-bounded-method-type-parameters-cross-crate.rs:30:5 | diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr index adcf4921e539d..99c31783acdcc 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-bounded-method-type-parameters-trait-bound.rs:30:7 - | -LL | f.method(b); //~ ERROR 30:7: 30:13: lifetime mismatch [E0623] - | ^^^^^^ - error: borrowed data escapes outside of function --> $DIR/regions-bounded-method-type-parameters-trait-bound.rs:30:5 | diff --git a/src/test/ui/regions/regions-bounds.nll.stderr b/src/test/ui/regions/regions-bounds.nll.stderr index a59a485f444ca..e50e806da12a3 100644 --- a/src/test/ui/regions/regions-bounds.nll.stderr +++ b/src/test/ui/regions/regions-bounds.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-bounds.rs:19:12 - | -LL | return e; //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-bounds.rs:23:12 - | -LL | return e; //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-bounds.rs:19:12 | diff --git a/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr b/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr index 5bec650a41d11..90d38a49c4a82 100644 --- a/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr +++ b/src/test/ui/regions/regions-close-associated-type-into-object.nll.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-associated-type-into-object.rs:25:5 - | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough - | ^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-associated-type-into-object.rs:32:5 - | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough - | ^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-associated-type-into-object.rs:38:5 - | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough - | ^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-associated-type-into-object.rs:45:5 - | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough - | ^^^^^^^^^^^^^^ - error[E0310]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:25:5 | diff --git a/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr index 85724cfabd814..c073e3728e705 100644 --- a/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-2.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-2.rs:20:11 - | -LL | box B(&*v) as Box //~ ERROR cannot infer - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-close-object-into-object-2.rs:20:5 | diff --git a/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr index 3dc8df3608f06..4b47b951d7717 100644 --- a/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-4.nll.stderr @@ -1,33 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-4.rs:20:5 - | -LL | box B(&*v) as Box //~ ERROR cannot infer - | ^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-4.rs:20:11 - | -LL | box B(&*v) as Box //~ ERROR cannot infer - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-4.rs:20:9 - | -LL | box B(&*v) as Box //~ ERROR cannot infer - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-4.rs:20:9 - | -LL | box B(&*v) as Box //~ ERROR cannot infer - | ^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-4.rs:20:5 - | -LL | box B(&*v) as Box //~ ERROR cannot infer - | ^^^^^^^^^^ - error[E0310]: the parameter type `U` may not live long enough --> $DIR/regions-close-object-into-object-4.rs:20:5 | diff --git a/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr index d7f9253d0b4d2..8ef80fd775bfa 100644 --- a/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-5.nll.stderr @@ -1,33 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-5.rs:27:5 - | -LL | box B(&*v) as Box - | ^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-5.rs:27:11 - | -LL | box B(&*v) as Box - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-5.rs:27:9 - | -LL | box B(&*v) as Box - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-5.rs:27:9 - | -LL | box B(&*v) as Box - | ^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-object-into-object-5.rs:27:5 - | -LL | box B(&*v) as Box - | ^^^^^^^^^^ - error[E0310]: the parameter type `T` may not live long enough --> $DIR/regions-close-object-into-object-5.rs:27:5 | diff --git a/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr b/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr index ff74d46b011ff..6b8406cdb6e5e 100644 --- a/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr +++ b/src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-over-type-parameter-1.rs:20:5 - | -LL | box v as Box - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-over-type-parameter-1.rs:20:5 - | -LL | box v as Box - | ^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-over-type-parameter-1.rs:30:5 - | -LL | box v as Box - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-over-type-parameter-1.rs:30:5 - | -LL | box v as Box - | ^^^^^ - error[E0310]: the parameter type `A` may not live long enough --> $DIR/regions-close-over-type-parameter-1.rs:20:5 | diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr index 9e0dd9da0e4bf..017e912688849 100644 --- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr +++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-over-type-parameter-multiple.rs:30:5 - | -LL | box v as Box //~ ERROR cannot infer an appropriate lifetime - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - error[E0309]: the parameter type `A` may not live long enough --> $DIR/regions-close-over-type-parameter-multiple.rs:30:5 | diff --git a/src/test/ui/regions/regions-close-param-into-object.nll.stderr b/src/test/ui/regions/regions-close-param-into-object.nll.stderr index 260a4067e100d..c1c7e1b71c986 100644 --- a/src/test/ui/regions/regions-close-param-into-object.nll.stderr +++ b/src/test/ui/regions/regions-close-param-into-object.nll.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-close-param-into-object.rs:16:5 - | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough - | ^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-param-into-object.rs:22:5 - | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough - | ^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-param-into-object.rs:28:5 - | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough - | ^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-close-param-into-object.rs:34:5 - | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough - | ^^^^^^^^^^^ - error[E0310]: the parameter type `T` may not live long enough --> $DIR/regions-close-param-into-object.rs:16:5 | diff --git a/src/test/ui/regions/regions-creating-enums3.nll.stderr b/src/test/ui/regions/regions-creating-enums3.nll.stderr index 462e4152ce3ba..aeb4fc67f55ed 100644 --- a/src/test/ui/regions/regions-creating-enums3.nll.stderr +++ b/src/test/ui/regions/regions-creating-enums3.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-creating-enums3.rs:17:5 - | -LL | ast::add(x, y) //~ ERROR 17:5: 17:19: lifetime mismatch [E0623] - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-creating-enums3.rs:17:5 | diff --git a/src/test/ui/regions/regions-creating-enums4.nll.stderr b/src/test/ui/regions/regions-creating-enums4.nll.stderr index b82fdfd5c65c4..9c68c9bca49f2 100644 --- a/src/test/ui/regions/regions-creating-enums4.nll.stderr +++ b/src/test/ui/regions/regions-creating-enums4.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-creating-enums4.rs:17:5 - | -LL | ast::add(x, y) //~ ERROR cannot infer - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-creating-enums4.rs:17:5 | diff --git a/src/test/ui/regions/regions-early-bound-error-method.nll.stderr b/src/test/ui/regions/regions-early-bound-error-method.nll.stderr index cd2da8f3c6e72..e6c60b301a041 100644 --- a/src/test/ui/regions/regions-early-bound-error-method.nll.stderr +++ b/src/test/ui/regions/regions-early-bound-error-method.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-early-bound-error-method.rs:30:9 - | -LL | g2.get() - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-early-bound-error-method.rs:30:9 | diff --git a/src/test/ui/regions/regions-early-bound-error.nll.stderr b/src/test/ui/regions/regions-early-bound-error.nll.stderr index 7ba6151173530..3c95e977fb366 100644 --- a/src/test/ui/regions/regions-early-bound-error.nll.stderr +++ b/src/test/ui/regions/regions-early-bound-error.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-early-bound-error.rs:29:5 - | -LL | g1.get() - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-early-bound-error.rs:29:5 | diff --git a/src/test/ui/regions/regions-escape-method.nll.stderr b/src/test/ui/regions/regions-escape-method.nll.stderr index 4603d1516e0f7..ffcd1b6bd7b33 100644 --- a/src/test/ui/regions/regions-escape-method.nll.stderr +++ b/src/test/ui/regions/regions-escape-method.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-escape-method.rs:25:13 - | -LL | s.f(|p| p) //~ ERROR cannot infer - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-escape-method.rs:25:13 | diff --git a/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr b/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr index 381f462864780..36a79d52fd002 100644 --- a/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr +++ b/src/test/ui/regions/regions-escape-via-trait-or-not.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-escape-via-trait-or-not.rs:28:14 - | -LL | with(|o| o) //~ ERROR cannot infer - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-escape-via-trait-or-not.rs:28:14 | diff --git a/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr b/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr index 3ef1be10f0fdc..98a4dc29ae7e7 100644 --- a/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-callee.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-free-region-ordering-callee.rs:23:5 - | -LL | &*y //~ ERROR 23:5: 23:8: lifetime mismatch [E0623] - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-free-region-ordering-callee.rs:28:24 - | -LL | let z: &'b usize = &*x; - | ^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-free-region-ordering-callee.rs:23:5 | diff --git a/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr b/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr index 0bc4bf4a951e8..10259ccf270e8 100644 --- a/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-incorrect.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-free-region-ordering-incorrect.rs:27:15 - | -LL | None => &self.val //~ ERROR cannot infer - | ^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-free-region-ordering-incorrect.rs:25:5 | diff --git a/src/test/ui/regions/regions-glb-free-free.nll.stderr b/src/test/ui/regions/regions-glb-free-free.nll.stderr deleted file mode 100644 index a82ce96bfbfbf..0000000000000 --- a/src/test/ui/regions/regions-glb-free-free.nll.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/regions-glb-free-free.rs:25:13 - | -LL | Flag { //~ ERROR 25:13: 30:14: explicit lifetime required in the type of `s` [E0621] - | ^^^^ - -error[E0621]: explicit lifetime required in the type of `s` - --> $DIR/regions-glb-free-free.rs:25:13 - | -LL | pub fn set_desc(self, s: &str) -> Flag<'a> { - | ---- help: add explicit lifetime `'a` to the type of `s`: `&'a str` -LL | / Flag { //~ ERROR 25:13: 30:14: explicit lifetime required in the type of `s` [E0621] -LL | | name: self.name, -LL | | desc: s, -LL | | max_count: self.max_count, -LL | | value: self.value -LL | | } - | |_____________^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-infer-at-fn-not-param.nll.stderr b/src/test/ui/regions/regions-infer-at-fn-not-param.nll.stderr deleted file mode 100644 index 6bc3dafea51f4..0000000000000 --- a/src/test/ui/regions/regions-infer-at-fn-not-param.nll.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-at-fn-not-param.rs:23:57 - | -LL | fn take1<'a>(p: parameterized1) -> parameterized1<'a> { p } - | ^ - -error[E0621]: explicit lifetime required in the type of `p` - --> $DIR/regions-infer-at-fn-not-param.rs:23:57 - | -LL | fn take1<'a>(p: parameterized1) -> parameterized1<'a> { p } - | -------------- ^ lifetime `'a` required - | | - | help: add explicit lifetime `'a` to the type of `p`: `parameterized1<'a>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr b/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr index c71bd17ac7839..9fc58273c941e 100644 --- a/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr +++ b/src/test/ui/regions/regions-infer-bound-from-trait-self.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-bound-from-trait-self.rs:56:9 - | -LL | check_bound(x, self) - | ^^^^^^^^^^^ - error[E0309]: the parameter type `Self` may not live long enough --> $DIR/regions-infer-bound-from-trait-self.rs:56:9 | diff --git a/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr b/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr index 25f69031507ec..ace8f14c734a0 100644 --- a/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr +++ b/src/test/ui/regions/regions-infer-bound-from-trait.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-bound-from-trait.rs:43:5 - | -LL | check_bound(x, a) //~ ERROR parameter type `A` may not live long enough - | ^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-infer-bound-from-trait.rs:47:5 - | -LL | check_bound(x, a) //~ ERROR parameter type `A` may not live long enough - | ^^^^^^^^^^^ - error[E0309]: the parameter type `A` may not live long enough --> $DIR/regions-infer-bound-from-trait.rs:43:5 | diff --git a/src/test/ui/regions/regions-infer-call-3.nll.stderr b/src/test/ui/regions/regions-infer-call-3.nll.stderr index 6069aca62ec5e..30b892d3710f2 100644 --- a/src/test/ui/regions/regions-infer-call-3.nll.stderr +++ b/src/test/ui/regions/regions-infer-call-3.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-call-3.rs:18:24 - | -LL | let z = with(|y| { select(x, y) }); - | ^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-infer-call-3.rs:18:24 | diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr index cf754167b53ec..23a719e5503a1 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-decl.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-invariance-due-to-decl.rs:22:5 - | -LL | b_isize //~ ERROR mismatched types - | ^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-infer-invariance-due-to-decl.rs:22:5 | diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr index 6cd76f26ebec7..ff0a6adec049d 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-invariance-due-to-mutability-3.rs:21:5 - | -LL | b_isize //~ ERROR mismatched types - | ^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-infer-invariance-due-to-mutability-3.rs:21:5 | diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr index 1e1daa59019bd..c296397954a76 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-invariance-due-to-mutability-4.rs:21:5 - | -LL | b_isize //~ ERROR mismatched types - | ^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-infer-invariance-due-to-mutability-4.rs:21:5 | diff --git a/src/test/ui/regions/regions-infer-not-param.nll.stderr b/src/test/ui/regions/regions-infer-not-param.nll.stderr index 072be9b5a994e..faeaa5eda02c6 100644 --- a/src/test/ui/regions/regions-infer-not-param.nll.stderr +++ b/src/test/ui/regions/regions-infer-not-param.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-not-param.rs:25:54 - | -LL | fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-infer-not-param.rs:29:63 - | -LL | fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-infer-not-param.rs:25:54 | diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr index 01ae2910bd591..8e29e77713ba5 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr +++ b/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-infer-paramd-indirect.rs:33:18 - | -LL | self.f = b; - | ^ - error: borrowed data escapes outside of function --> $DIR/regions-infer-paramd-indirect.rs:33:9 | diff --git a/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr index 01f0cfa4a7186..d1d98a26a41fa 100644 --- a/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr +++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-lifetime-bounds-on-fns.rs:18:10 - | -LL | *x = *y; //~ ERROR E0623 - | ^^ - -warning: not reporting region error due to nll - --> $DIR/regions-lifetime-bounds-on-fns.rs:24:5 - | -LL | a(x, y); //~ ERROR 24:7: 24:8: lifetime mismatch [E0623] - | ^ - error[E0308]: mismatched types --> $DIR/regions-lifetime-bounds-on-fns.rs:30:43 | diff --git a/src/test/ui/regions/regions-nested-fns.nll.stderr b/src/test/ui/regions/regions-nested-fns.nll.stderr index d90015b1b2157..9e6c57f67332a 100644 --- a/src/test/ui/regions/regions-nested-fns.nll.stderr +++ b/src/test/ui/regions/regions-nested-fns.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-nested-fns.rs:24:27 - | -LL | if false { return x; } //~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-nested-fns.rs:15:18 - | -LL | let mut ay = &y; //~ ERROR E0495 - | ^^ - error: unsatisfied lifetime constraints --> $DIR/regions-nested-fns.rs:20:9 | diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr b/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr index db1508a8c8b14..6db1f6f4e78a4 100644 --- a/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr +++ b/src/test/ui/regions/regions-outlives-projection-container-hrtb.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-outlives-projection-container-hrtb.rs:42:12 - | -LL | let _: &'a WithHrAssoc> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-outlives-projection-container-hrtb.rs:63:12 - | -LL | let _: &'a WithHrAssocSub> = loop { }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - error: compilation successful --> $DIR/regions-outlives-projection-container-hrtb.rs:68:1 | diff --git a/src/test/ui/regions/regions-proc-bound-capture.nll.stderr b/src/test/ui/regions/regions-proc-bound-capture.nll.stderr deleted file mode 100644 index f19feed175272..0000000000000 --- a/src/test/ui/regions/regions-proc-bound-capture.nll.stderr +++ /dev/null @@ -1,18 +0,0 @@ -warning: not reporting region error due to nll - --> $DIR/regions-proc-bound-capture.rs:19:14 - | -LL | Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621] - | ^^^^^^^^^^^^^ - -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/regions-proc-bound-capture.rs:19:5 - | -LL | fn static_proc(x: &isize) -> Box(isize) + 'static> { - | ------ help: add explicit lifetime `'static` to the type of `x`: `&'static isize` -LL | // This is illegal, because the region bound on `proc` is 'static. -LL | Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621] - | ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr index 89575ca9bc809..48cd2d5a60bc1 100644 --- a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-reborrow-from-shorter-mut-ref-mut-ref.rs:14:5 - | -LL | &mut ***p //~ ERROR 14:5: 14:14: lifetime mismatch [E0623] - | ^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-reborrow-from-shorter-mut-ref-mut-ref.rs:14:5 | diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr index 9c57813f26be6..02c7ce33aabac 100644 --- a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-reborrow-from-shorter-mut-ref.rs:16:5 - | -LL | &mut **p //~ ERROR 16:5: 16:13: lifetime mismatch [E0623] - | ^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-reborrow-from-shorter-mut-ref.rs:16:5 | diff --git a/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr b/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr index 29810f5128c9f..5df6bca72fa0a 100644 --- a/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr +++ b/src/test/ui/regions/regions-ret-borrowed-1.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-ret-borrowed-1.rs:20:14 - | -LL | with(|o| o) - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-ret-borrowed-1.rs:20:14 | diff --git a/src/test/ui/regions/regions-ret-borrowed.nll.stderr b/src/test/ui/regions/regions-ret-borrowed.nll.stderr index ab70e6a663039..b36191ada61c7 100644 --- a/src/test/ui/regions/regions-ret-borrowed.nll.stderr +++ b/src/test/ui/regions/regions-ret-borrowed.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-ret-borrowed.rs:23:14 - | -LL | with(|o| o) - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-ret-borrowed.rs:23:14 | diff --git a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr index 850226f60cf70..35c1da61ae28f 100644 --- a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr +++ b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:17:24 - | -LL | let mut f = || &mut x; //~ ERROR cannot infer - | ^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:17:24 | diff --git a/src/test/ui/regions/regions-static-bound.ll.nll.stderr b/src/test/ui/regions/regions-static-bound.ll.nll.stderr index 326111aab7ef0..462fbe8ee19bd 100644 --- a/src/test/ui/regions/regions-static-bound.ll.nll.stderr +++ b/src/test/ui/regions/regions-static-bound.ll.nll.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-static-bound.rs:19:5 - | -LL | t //[ll]~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-static-bound.rs:25:5 - | -LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621] - | ^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-static-bound.rs:28:5 - | -LL | static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621] - | ^^^^^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-static-bound.rs:19:5 | @@ -25,7 +7,7 @@ LL | t //[ll]~ ERROR E0312 | ^ returning this value requires that `'a` must outlive `'static` error[E0621]: explicit lifetime required in the type of `u` - --> $DIR/regions-static-bound.rs:25:5 + --> $DIR/regions-static-bound.rs:24:5 | LL | fn error(u: &(), v: &()) { | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()` @@ -33,7 +15,7 @@ LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of | ^^^^^^^^^^^^^ lifetime `'static` required error[E0621]: explicit lifetime required in the type of `v` - --> $DIR/regions-static-bound.rs:28:5 + --> $DIR/regions-static-bound.rs:26:5 | LL | fn error(u: &(), v: &()) { | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()` diff --git a/src/test/ui/regions/regions-static-bound.ll.stderr b/src/test/ui/regions/regions-static-bound.ll.stderr index 4a11677765d14..cf291279210c9 100644 --- a/src/test/ui/regions/regions-static-bound.ll.stderr +++ b/src/test/ui/regions/regions-static-bound.ll.stderr @@ -12,7 +12,7 @@ LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a { | ^^ error[E0621]: explicit lifetime required in the type of `u` - --> $DIR/regions-static-bound.rs:25:5 + --> $DIR/regions-static-bound.rs:24:5 | LL | fn error(u: &(), v: &()) { | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()` @@ -20,7 +20,7 @@ LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of | ^^^^^^^^^ lifetime `'static` required error[E0621]: explicit lifetime required in the type of `v` - --> $DIR/regions-static-bound.rs:28:5 + --> $DIR/regions-static-bound.rs:26:5 | LL | fn error(u: &(), v: &()) { | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()` diff --git a/src/test/ui/regions/regions-static-bound.nll.stderr b/src/test/ui/regions/regions-static-bound.nll.stderr index 326111aab7ef0..462fbe8ee19bd 100644 --- a/src/test/ui/regions/regions-static-bound.nll.stderr +++ b/src/test/ui/regions/regions-static-bound.nll.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-static-bound.rs:19:5 - | -LL | t //[ll]~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-static-bound.rs:25:5 - | -LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621] - | ^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/regions-static-bound.rs:28:5 - | -LL | static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621] - | ^^^^^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/regions-static-bound.rs:19:5 | @@ -25,7 +7,7 @@ LL | t //[ll]~ ERROR E0312 | ^ returning this value requires that `'a` must outlive `'static` error[E0621]: explicit lifetime required in the type of `u` - --> $DIR/regions-static-bound.rs:25:5 + --> $DIR/regions-static-bound.rs:24:5 | LL | fn error(u: &(), v: &()) { | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()` @@ -33,7 +15,7 @@ LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of | ^^^^^^^^^^^^^ lifetime `'static` required error[E0621]: explicit lifetime required in the type of `v` - --> $DIR/regions-static-bound.rs:28:5 + --> $DIR/regions-static-bound.rs:26:5 | LL | fn error(u: &(), v: &()) { | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()` diff --git a/src/test/ui/regions/regions-static-bound.rs b/src/test/ui/regions/regions-static-bound.rs index 0a37df4f0c788..c5dc6000e839c 100644 --- a/src/test/ui/regions/regions-static-bound.rs +++ b/src/test/ui/regions/regions-static-bound.rs @@ -17,17 +17,14 @@ fn static_id_indirect<'a,'b>(t: &'a ()) -> &'static () where 'a: 'b, 'b: 'static { t } fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a { t //[ll]~ ERROR E0312 - //[nll]~^ WARNING not reporting region error due to nll - //[nll]~| ERROR unsatisfied lifetime constraints + //[nll]~^ ERROR unsatisfied lifetime constraints } fn error(u: &(), v: &()) { static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621] - //[nll]~^ WARNING not reporting region error due to nll - //[nll]~| ERROR explicit lifetime required in the type of `u` [E0621] + //[nll]~^ ERROR explicit lifetime required in the type of `u` [E0621] static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621] - //[nll]~^ WARNING not reporting region error due to nll - //[nll]~| ERROR explicit lifetime required in the type of `v` [E0621] + //[nll]~^ ERROR explicit lifetime required in the type of `v` [E0621] } fn main() {} diff --git a/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr b/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr index 01db25a07f76e..d4140242c01de 100644 --- a/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr +++ b/src/test/ui/regions/regions-trait-object-subtyping.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/regions-trait-object-subtyping.rs:25:5 - | -LL | x //~ ERROR lifetime bound not satisfied - | ^ - -warning: not reporting region error due to nll - --> $DIR/regions-trait-object-subtyping.rs:32:5 - | -LL | x //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/regions-trait-object-subtyping.rs:25:5 | diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr index a113c1ae27fb4..a3501290cd607 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/unboxed-closures-infer-argument-types-two-region-pointers.rs:27:15 - | -LL | x.set(y); //~ ERROR E0312 - | ^ - error: unsatisfied lifetime constraints --> $DIR/unboxed-closures-infer-argument-types-two-region-pointers.rs:27:9 | diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr index 58939b0f64f5a..7adb195b7d022 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr @@ -1,27 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:18:14 - | -LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime - | ^^^^^ - -warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:18:20 - | -LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime - | ^^^^ - -warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:18:5 - | -LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime - | ^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:18:5 - | -LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime - | ^^^^^^^^^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/dyn-trait-underscore.rs:18:5 | diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr index eef04cbf35177..eedbfbf5f61a7 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/underscore-lifetime-elison-mismatch.rs:11:49 - | -LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } //~ ERROR lifetime mismatch - | ^ - error: unsatisfied lifetime constraints --> $DIR/underscore-lifetime-elison-mismatch.rs:11:42 | diff --git a/src/test/ui/variance/variance-btree-invariant-types.nll.stderr b/src/test/ui/variance/variance-btree-invariant-types.nll.stderr index 877036530ed19..f09dcdf25dac9 100644 --- a/src/test/ui/variance/variance-btree-invariant-types.nll.stderr +++ b/src/test/ui/variance/variance-btree-invariant-types.nll.stderr @@ -1,75 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:16:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:19:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:22:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:25:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:30:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:34:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:38:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:42:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:47:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:51:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:55:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-btree-invariant-types.rs:59:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-btree-invariant-types.rs:16:5 | diff --git a/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr b/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr index 67d43dd507005..4ef45edc24246 100644 --- a/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr +++ b/src/test/ui/variance/variance-contravariant-arg-object.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-contravariant-arg-object.rs:24:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-contravariant-arg-object.rs:32:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-contravariant-arg-object.rs:24:5 | diff --git a/src/test/ui/variance/variance-covariant-arg-object.nll.stderr b/src/test/ui/variance/variance-covariant-arg-object.nll.stderr index 55413e57a9493..3105ebaf03117 100644 --- a/src/test/ui/variance/variance-covariant-arg-object.nll.stderr +++ b/src/test/ui/variance/variance-covariant-arg-object.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-covariant-arg-object.rs:25:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-covariant-arg-object.rs:32:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-covariant-arg-object.rs:25:5 | diff --git a/src/test/ui/variance/variance-invariant-arg-object.nll.stderr b/src/test/ui/variance/variance-invariant-arg-object.nll.stderr index f90975192460b..54ad4f4c5fbe6 100644 --- a/src/test/ui/variance/variance-invariant-arg-object.nll.stderr +++ b/src/test/ui/variance/variance-invariant-arg-object.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-invariant-arg-object.rs:21:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-invariant-arg-object.rs:28:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-invariant-arg-object.rs:21:5 | diff --git a/src/test/ui/variance/variance-trait-matching.nll.stderr b/src/test/ui/variance/variance-trait-matching.nll.stderr index baf75b73463a5..14b42585d6e2a 100644 --- a/src/test/ui/variance/variance-trait-matching.nll.stderr +++ b/src/test/ui/variance/variance-trait-matching.nll.stderr @@ -1,21 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-trait-matching.rs:34:10 - | -LL | pick(get, &22) //~ ERROR 34:5: 34:9: explicit lifetime required in the type of `get` [E0621] - | ^^^ - -warning: not reporting region error due to nll - --> $DIR/variance-trait-matching.rs:34:5 - | -LL | pick(get, &22) //~ ERROR 34:5: 34:9: explicit lifetime required in the type of `get` [E0621] - | ^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/variance-trait-matching.rs:34:5 - | -LL | pick(get, &22) //~ ERROR 34:5: 34:9: explicit lifetime required in the type of `get` [E0621] - | ^^^^ - error[E0621]: explicit lifetime required in the type of `get` --> $DIR/variance-trait-matching.rs:34:5 | diff --git a/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr b/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr index 643b8587bea94..37604af506322 100644 --- a/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr +++ b/src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-use-contravariant-struct-1.rs:22:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-use-contravariant-struct-1.rs:22:5 | diff --git a/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr b/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr index f0c9c44794df2..c7fd60301c834 100644 --- a/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr +++ b/src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr @@ -1,9 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-use-covariant-struct-1.rs:20:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-use-covariant-struct-1.rs:20:5 | diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr b/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr index 8b6d6100af48e..1638d5ec4fb7a 100644 --- a/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr +++ b/src/test/ui/variance/variance-use-invariant-struct-1.nll.stderr @@ -1,15 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/variance-use-invariant-struct-1.rs:22:5 - | -LL | v //~ ERROR mismatched types - | ^ - -warning: not reporting region error due to nll - --> $DIR/variance-use-invariant-struct-1.rs:29:5 - | -LL | v //~ ERROR mismatched types - | ^ - error: unsatisfied lifetime constraints --> $DIR/variance-use-invariant-struct-1.rs:22:5 | diff --git a/src/test/ui/wf/wf-static-method.nll.stderr b/src/test/ui/wf/wf-static-method.nll.stderr index e563a4ffc5689..51aec2a949f99 100644 --- a/src/test/ui/wf/wf-static-method.nll.stderr +++ b/src/test/ui/wf/wf-static-method.nll.stderr @@ -1,33 +1,3 @@ -warning: not reporting region error due to nll - --> $DIR/wf-static-method.rs:27:9 - | -LL | u //~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/wf-static-method.rs:36:18 - | -LL | let me = Self::make_me(); //~ ERROR lifetime bound not satisfied - | ^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/wf-static-method.rs:43:9 - | -LL | u //~ ERROR E0312 - | ^ - -warning: not reporting region error due to nll - --> $DIR/wf-static-method.rs:51:5 - | -LL | <()>::static_evil(b) //~ ERROR cannot infer an appropriate lifetime - | ^^^^^^^^^^^^^^^^^ - -warning: not reporting region error due to nll - --> $DIR/wf-static-method.rs:55:5 - | -LL | ::static_evil(b) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - error: unsatisfied lifetime constraints --> $DIR/wf-static-method.rs:27:9 |