]> git.lizzy.rs Git - rust.git/commitdiff
Remove feature(nll) when compare mode is sufficient
authorMatthew Jasper <mjjasper1@gmail.com>
Sun, 7 Apr 2019 15:07:36 +0000 (16:07 +0100)
committerMatthew Jasper <mjjasper1@gmail.com>
Sun, 12 May 2019 17:46:43 +0000 (18:46 +0100)
303 files changed:
src/test/codegen/enum-debug-niche-2.rs
src/test/mir-opt/remove_fake_borrows.rs
src/test/run-fail/issue-51345.rs
src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs
src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs
src/test/run-pass/borrowck/two-phase-bin-ops.rs
src/test/run-pass/issues/issue-24535-allow-mutable-borrow-in-match-guard.rs
src/test/run-pass/issues/issue-48962.rs
src/test/run-pass/issues/issue-51345.rs
src/test/run-pass/nll/issue-47153-generic-const.rs
src/test/run-pass/nll/issue-47589.rs
src/test/run-pass/nll/issue-48623-closure.rs
src/test/run-pass/nll/issue-48623-generator.rs
src/test/run-pass/nll/issue-50343.rs
src/test/run-pass/nll/issue-50461-used-mut-from-moves.rs
src/test/run-pass/nll/issue-53123-raw-pointer-cast.rs
src/test/run-pass/nll/mutating_references.rs
src/test/run-pass/nll/process_or_insert_default.rs
src/test/run-pass/nll/rc-loop.rs
src/test/ui/borrowck/borrowck-issue-48962.rs
src/test/ui/borrowck/borrowck-issue-48962.stderr
src/test/ui/borrowck/issue-10876.rs
src/test/ui/borrowck/issue-51348-multi-ref-mut-in-guard.rs
src/test/ui/borrowck/issue-52713-bug.rs
src/test/ui/borrowck/issue-52713-bug.stderr
src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs
src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr
src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr [deleted file]
src/test/ui/borrowck/issue-58776-borrowck-scans-children.rs
src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr [new file with mode: 0644]
src/test/ui/borrowck/two-phase-across-loop.rs
src/test/ui/borrowck/two-phase-across-loop.stderr
src/test/ui/borrowck/two-phase-multi-mut.rs
src/test/ui/borrowck/two-phase-multi-mut.stderr
src/test/ui/c-variadic/variadic-ffi-5.rs [deleted file]
src/test/ui/c-variadic/variadic-ffi-5.stderr [deleted file]
src/test/ui/consts/const-eval/promote_mutable_zst_mir_borrowck.rs
src/test/ui/consts/issue-54224.rs
src/test/ui/consts/issue-54224.stderr
src/test/ui/consts/promote_evaluation_unused_result.rs
src/test/ui/consts/promote_fn_calls.rs
src/test/ui/consts/promote_fn_calls_std.rs
src/test/ui/generator/generator-region-requirements.nll.stderr [deleted file]
src/test/ui/generator/generator-region-requirements.rs
src/test/ui/generator/generator-region-requirements.stderr [new file with mode: 0644]
src/test/ui/generator/generator-with-nll.rs
src/test/ui/generator/generator-with-nll.stderr
src/test/ui/impl-trait/closure-calling-parent-fn.rs
src/test/ui/impl-trait/region-escape-via-bound-contravariant-closure.rs
src/test/ui/impl-trait/region-escape-via-bound-contravariant.rs
src/test/ui/impl-trait/region-escape-via-bound.rs
src/test/ui/impl-trait/region-escape-via-bound.stderr
src/test/ui/issues/issue-34721.rs
src/test/ui/issues/issue-34721.stderr
src/test/ui/issues/issue-45696-no-variant-box-recur.rs
src/test/ui/issues/issue-46036.rs
src/test/ui/issues/issue-46036.stderr
src/test/ui/issues/issue-46983.rs
src/test/ui/issues/issue-46983.stderr
src/test/ui/issues/issue-47184.rs
src/test/ui/issues/issue-47184.stderr
src/test/ui/issues/issue-47646.rs
src/test/ui/issues/issue-47646.stderr
src/test/ui/issues/issue-47703-1.rs
src/test/ui/issues/issue-47703-tuple.rs
src/test/ui/issues/issue-47703.rs
src/test/ui/issues/issue-47722.rs
src/test/ui/issues/issue-47789.rs
src/test/ui/issues/issue-48132.rs
src/test/ui/issues/issue-48179.rs
src/test/ui/issues/issue-48803.rs
src/test/ui/issues/issue-48803.stderr
src/test/ui/issues/issue-49579.rs
src/test/ui/issues/issue-51515.rs
src/test/ui/issues/issue-51515.stderr
src/test/ui/issues/issue-52057.rs
src/test/ui/issues/issue-52992.rs
src/test/ui/issues/issue-53568.rs
src/test/ui/issues/issue-54943-1.rs
src/test/ui/issues/issue-54943-2.rs
src/test/ui/issues/issue-54943.nll.stderr [new file with mode: 0644]
src/test/ui/issues/issue-54943.rs
src/test/ui/issues/issue-54943.stderr
src/test/ui/mir-dataflow/def-inits-1.rs
src/test/ui/mir-dataflow/def-inits-1.stderr
src/test/ui/mir-dataflow/inits-1.rs
src/test/ui/mir-dataflow/inits-1.stderr
src/test/ui/mir-dataflow/uninits-1.rs
src/test/ui/mir-dataflow/uninits-1.stderr
src/test/ui/mir-dataflow/uninits-2.rs
src/test/ui/mir-dataflow/uninits-2.stderr
src/test/ui/nll/borrow-use-issue-46875.rs
src/test/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.rs
src/test/ui/nll/borrowed-local-error.rs
src/test/ui/nll/borrowed-local-error.stderr
src/test/ui/nll/borrowed-referent-issue-38899.rs
src/test/ui/nll/borrowed-referent-issue-38899.stderr
src/test/ui/nll/borrowed-temporary-error.rs
src/test/ui/nll/borrowed-temporary-error.stderr
src/test/ui/nll/borrowed-universal-error-2.rs
src/test/ui/nll/borrowed-universal-error-2.stderr
src/test/ui/nll/borrowed-universal-error.rs
src/test/ui/nll/borrowed-universal-error.stderr
src/test/ui/nll/capture-mut-ref.rs
src/test/ui/nll/capture-mut-ref.stderr
src/test/ui/nll/capture-ref-in-struct.rs
src/test/ui/nll/capture-ref-in-struct.stderr
src/test/ui/nll/closure-access-spans.rs
src/test/ui/nll/closure-access-spans.stderr
src/test/ui/nll/closure-borrow-spans.rs
src/test/ui/nll/closure-borrow-spans.stderr
src/test/ui/nll/closure-captures.rs
src/test/ui/nll/closure-captures.stderr
src/test/ui/nll/closure-move-spans.rs
src/test/ui/nll/closure-move-spans.stderr
src/test/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs
src/test/ui/nll/closure-requirements/propagate-multiple-requirements.rs
src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr
src/test/ui/nll/closure-use-spans.rs
src/test/ui/nll/closure-use-spans.stderr
src/test/ui/nll/closures-in-loops.rs
src/test/ui/nll/closures-in-loops.stderr
src/test/ui/nll/constant-thread-locals-issue-47053.rs
src/test/ui/nll/constant-thread-locals-issue-47053.stderr
src/test/ui/nll/decl-macro-illegal-copy.rs
src/test/ui/nll/decl-macro-illegal-copy.stderr
src/test/ui/nll/issue-16223.rs
src/test/ui/nll/issue-21114-ebfull.rs
src/test/ui/nll/issue-21114-kixunil.rs
src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs
src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.stderr
src/test/ui/nll/issue-22323-temp-destruction.rs
src/test/ui/nll/issue-30104.rs
src/test/ui/nll/issue-32382-index-assoc-type-with-lifetime.rs
src/test/ui/nll/issue-43058.rs
src/test/ui/nll/issue-46589.rs
src/test/ui/nll/issue-46589.stderr
src/test/ui/nll/issue-47022.rs
src/test/ui/nll/issue-47388.rs
src/test/ui/nll/issue-47388.stderr
src/test/ui/nll/issue-47470.rs
src/test/ui/nll/issue-47470.stderr
src/test/ui/nll/issue-48070.rs
src/test/ui/nll/issue-48697.rs
src/test/ui/nll/issue-48697.stderr
src/test/ui/nll/issue-50716-1.rs
src/test/ui/nll/issue-50716.nll.stderr [new file with mode: 0644]
src/test/ui/nll/issue-50716.rs
src/test/ui/nll/issue-50716.stderr
src/test/ui/nll/issue-51191.rs
src/test/ui/nll/issue-51191.stderr
src/test/ui/nll/issue-51244.rs
src/test/ui/nll/issue-51244.stderr
src/test/ui/nll/issue-51268.rs
src/test/ui/nll/issue-51268.stderr
src/test/ui/nll/issue-51351.rs
src/test/ui/nll/issue-51512.rs
src/test/ui/nll/issue-51512.stderr
src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr
src/test/ui/nll/issue-52078.rs
src/test/ui/nll/issue-52086.rs
src/test/ui/nll/issue-52086.stderr
src/test/ui/nll/issue-52113.rs
src/test/ui/nll/issue-52113.stderr
src/test/ui/nll/issue-52534-1.rs
src/test/ui/nll/issue-52534-1.stderr
src/test/ui/nll/issue-52534-2.rs
src/test/ui/nll/issue-52534-2.stderr
src/test/ui/nll/issue-52534.rs
src/test/ui/nll/issue-52534.stderr
src/test/ui/nll/issue-52663-span-decl-captured-variable.rs
src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr
src/test/ui/nll/issue-52663-trait-object.rs
src/test/ui/nll/issue-52663-trait-object.stderr
src/test/ui/nll/issue-52669.rs
src/test/ui/nll/issue-52669.stderr
src/test/ui/nll/issue-52742.nll.stderr [new file with mode: 0644]
src/test/ui/nll/issue-52742.rs
src/test/ui/nll/issue-52742.stderr
src/test/ui/nll/issue-53119.rs
src/test/ui/nll/issue-53570.rs
src/test/ui/nll/issue-55288.rs
src/test/ui/nll/issue-55344.rs
src/test/ui/nll/issue-55394.nll.stderr [new file with mode: 0644]
src/test/ui/nll/issue-55394.rs
src/test/ui/nll/issue-55394.stderr
src/test/ui/nll/issue-55401.nll.stderr [new file with mode: 0644]
src/test/ui/nll/issue-55401.rs
src/test/ui/nll/issue-55401.stderr
src/test/ui/nll/issue-57265-return-type-wf-check.rs
src/test/ui/nll/issue-57265-return-type-wf-check.stderr
src/test/ui/nll/issue-57280-1.rs
src/test/ui/nll/issue-57280.rs
src/test/ui/nll/issue-57989.rs
src/test/ui/nll/issue-57989.stderr
src/test/ui/nll/issue-58053.rs
src/test/ui/nll/issue-58053.stderr
src/test/ui/nll/issue-58299.rs
src/test/ui/nll/issue-58299.stderr
src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.rs
src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr
src/test/ui/nll/move-errors.rs
src/test/ui/nll/move-errors.stderr
src/test/ui/nll/move-subpaths-moves-root.rs
src/test/ui/nll/move-subpaths-moves-root.stderr
src/test/ui/nll/normalization-bounds-error.rs
src/test/ui/nll/normalization-bounds-error.stderr
src/test/ui/nll/normalization-bounds.rs
src/test/ui/nll/promotable-mutable-zst-doesnt-conflict.rs
src/test/ui/nll/promoted-bounds.rs
src/test/ui/nll/promoted-bounds.stderr
src/test/ui/nll/promoted-closure-pair.rs
src/test/ui/nll/promoted-closure-pair.stderr
src/test/ui/nll/relate_tys/issue-48071.rs
src/test/ui/nll/relate_tys/var-appears-twice.rs
src/test/ui/nll/relate_tys/var-appears-twice.stderr
src/test/ui/nll/return-ref-mut-issue-46557.rs
src/test/ui/nll/return-ref-mut-issue-46557.stderr
src/test/ui/nll/ty-outlives/issue-53789-1.rs
src/test/ui/nll/ty-outlives/issue-53789-2.rs
src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr [new file with mode: 0644]
src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.rs
src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr
src/test/ui/nll/ty-outlives/projection-where-clause-env.rs
src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs [deleted file]
src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr [deleted file]
src/test/ui/nll/type-alias-free-regions.nll.stderr [new file with mode: 0644]
src/test/ui/nll/type-alias-free-regions.rs
src/test/ui/nll/type-alias-free-regions.stderr
src/test/ui/nll/unused-mut-issue-50343.rs
src/test/ui/nll/unused-mut-issue-50343.stderr
src/test/ui/nll/user-annotations/adt-brace-enums.rs
src/test/ui/nll/user-annotations/adt-brace-enums.stderr
src/test/ui/nll/user-annotations/adt-brace-structs.rs
src/test/ui/nll/user-annotations/adt-brace-structs.stderr
src/test/ui/nll/user-annotations/adt-nullary-enums.rs
src/test/ui/nll/user-annotations/adt-nullary-enums.stderr
src/test/ui/nll/user-annotations/adt-tuple-enums.rs
src/test/ui/nll/user-annotations/adt-tuple-enums.stderr
src/test/ui/nll/user-annotations/adt-tuple-struct.rs
src/test/ui/nll/user-annotations/adt-tuple-struct.stderr
src/test/ui/nll/user-annotations/cast_static_lifetime.rs
src/test/ui/nll/user-annotations/cast_static_lifetime.stderr
src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr [new file with mode: 0644]
src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs
src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.rs
src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr
src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr [new file with mode: 0644]
src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs
src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr [new file with mode: 0644]
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr [new file with mode: 0644]
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr [new file with mode: 0644]
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs
src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr
src/test/ui/nll/user-annotations/fns.rs
src/test/ui/nll/user-annotations/fns.stderr
src/test/ui/nll/user-annotations/issue-54570-bootstrapping.rs
src/test/ui/nll/user-annotations/issue-55219.rs
src/test/ui/nll/user-annotations/issue-55241.rs
src/test/ui/nll/user-annotations/method-call.rs
src/test/ui/nll/user-annotations/method-call.stderr
src/test/ui/nll/user-annotations/method-ufcs-1.rs
src/test/ui/nll/user-annotations/method-ufcs-1.stderr
src/test/ui/nll/user-annotations/method-ufcs-2.rs
src/test/ui/nll/user-annotations/method-ufcs-2.stderr
src/test/ui/nll/user-annotations/method-ufcs-3.rs
src/test/ui/nll/user-annotations/method-ufcs-3.stderr
src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs
src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr
src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs
src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr
src/test/ui/nll/user-annotations/normalization.rs
src/test/ui/nll/user-annotations/normalization.stderr
src/test/ui/nll/user-annotations/normalize-self-ty.rs
src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.rs
src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr
src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.rs
src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr
src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.rs
src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr
src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.rs
src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr
src/test/ui/nll/user-annotations/promoted-annotation.rs
src/test/ui/nll/user-annotations/promoted-annotation.stderr
src/test/ui/nll/user-annotations/type_ascription_static_lifetime.rs
src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr
src/test/ui/rfc-0107-bind-by-move-pattern-guards/bind-by-move-no-guards.rs
src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-basic-examples.rs
src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.rs
src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr
src/test/ui/suggestions/dont-suggest-ref/move-into-closure.rs
src/test/ui/suggestions/dont-suggest-ref/move-into-closure.stderr
src/test/ui/suggestions/dont-suggest-ref/simple.rs
src/test/ui/suggestions/dont-suggest-ref/simple.stderr
src/test/ui/suggestions/suggest-ref-mut.rs
src/test/ui/suggestions/suggest-ref-mut.stderr

index aa6cbf66b4aa3bc24ad4334acecce3e4a64760e5..0f17976ef49653f872c87009ca6518c3d41dccf9 100644 (file)
@@ -13,7 +13,6 @@
 // CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Error",{{.*}}extraData: i64 0{{[,)].*}}
 
 #![feature(never_type)]
-#![feature(nll)]
 
 #[derive(Copy, Clone)]
 pub struct Entity {
index 144348450a91b5aa34edce9ca7980e2d5afee8b7..8348f9a77467888fe5b7273d7e76790a33f5fad9 100644 (file)
@@ -2,8 +2,6 @@
 
 // ignore-wasm32-bare
 
-#![feature(nll)]
-
 fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
     match x {
         Some(0) if c => 0,
index 3c7f6a68db545ee6ff42e09a097fd2fbe8e3e8ff..c62f98ea78d1ec1d460401bbfe9f0a3c5993073b 100644 (file)
@@ -1,7 +1,5 @@
 // error-pattern: thread 'main' panicked at 'explicit panic'
 
-#![feature(nll)]
-
 fn main() {
     let mut vec = vec![];
     vec.push((vec.len(), panic!()));
index c953bed26f491058dd5079488165845aae0ed875..96d2663500ef0e9ab8e72d1537098f09f850727a 100644 (file)
@@ -3,8 +3,6 @@
 #![allow(unused_variables)]
 // Test case from #39963.
 
-#![feature(nll)]
-
 #[derive(Clone)]
 struct Foo(Option<Box<Foo>>, Option<Box<Foo>>);
 
index 8f0434c0e2b5800a66db75db7dd6e05a353ba0fd..fd0e346e2b42dee204376dcdd467c13bd0c46037 100644 (file)
@@ -1,5 +1,4 @@
 // run-pass
-#![feature(nll)]
 #![deny(unused_mut)]
 
 #[derive(Debug)]
index 5e1d436e31bf22888514d90a9c62843f8893dd8c..1242ae307d39c764fab8af0a1456eb3e4da0f732 100644 (file)
@@ -1,8 +1,4 @@
 // run-pass
-// revisions: lxl nll
-
-#![cfg_attr(nll, feature(nll))]
-
 use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
 use std::ops::{BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign};
 
index 68f7dfd38f4f4059617e5dc996587249b0660197..48362d0bb62822273b7d63db9867635399d59921 100644 (file)
@@ -5,7 +5,6 @@
 // See further discussion on rust-lang/rust#24535,
 // rust-lang/rfcs#1006, and rust-lang/rfcs#107
 
-#![feature(nll)]
 #![feature(bind_by_move_pattern_guards)]
 
 fn main() {
index 7c644789834d46d9e170059ca84060fa6649cb04..80d815379bec2fa7b272fbc17bcda278ddf2e601 100644 (file)
@@ -1,7 +1,6 @@
 // run-pass
 #![allow(unused_must_use)]
 // Test that we are able to reinitialize box with moved referent
-#![feature(nll)]
 static mut ORDER: [usize; 3] = [0, 0, 0];
 static mut INDEX: usize = 0;
 
index 29a0a328503e1d98e9cad0cba0edae35acb87376..15571e8bf5b286441a26e1bb2e9abab697fb3f2e 100644 (file)
@@ -1,6 +1,5 @@
 // run-pass
 #![allow(unreachable_code)]
-#![feature(nll)]
 
 fn main() {
     let mut v = Vec::new();
index 4f021fda4e344bf1390a17fe070056c29f3b6b57..9f4d57111bbe982dc4bf816230583c0089a3d1d6 100644 (file)
@@ -3,7 +3,6 @@
 // Regression test for #47153: constants in a generic context (such as
 // a trait) used to ICE.
 
-#![feature(nll)]
 #![allow(warnings)]
 
 trait Foo {
index 5bbed3a85904c385920d4b58d0a1fcf39329f903..280bf081138cc96eacc943060a7a20fc19e21bce 100644 (file)
@@ -1,7 +1,5 @@
 // run-pass
 
-#![feature(nll)]
-
 pub struct DescriptorSet<'a> {
     pub slots: Vec<AttachInfo<'a, Resources>>
 }
index 5a41fff11a1f0c2dba7cd70898aee21cdad30d21..3f8587eed41b99aaaccd78a36353f45c2946c914 100644 (file)
@@ -2,8 +2,6 @@
 #![allow(path_statements)]
 #![allow(dead_code)]
 
-#![feature(nll)]
-
 struct WithDrop;
 
 impl Drop for WithDrop {
index b404daca725680a5565394a57ffb26c6d333cf14..ba3eccff495e5c1ba6b5c68578ea929c4ba6c8a1 100644 (file)
@@ -2,7 +2,6 @@
 #![allow(path_statements)]
 #![allow(dead_code)]
 
-#![feature(nll)]
 #![feature(generators, generator_trait)]
 
 struct WithDrop;
index 8d2992b3b4f88432bea417cb2d6d131850371713..55a2d231e19ff48922b5df0da4f85c04b735795c 100644 (file)
@@ -1,6 +1,5 @@
 // run-pass
 
-#![feature(nll)]
 #![deny(unused_mut)]
 
 fn main() {
index dc5257cfb92251caa4b91f21e6e533dbaf2e2a80..69d7cdd83a6a1023964889e9c20077daa2ac9e87 100644 (file)
@@ -1,6 +1,5 @@
 // run-pass
 
-#![feature(nll)]
 #![deny(unused_mut)]
 
 struct Foo {
index c3f818812aa5f8ef8ba1d5b37aa85bddd2b0d10d..941c9eeb411d9ca5866da76c08bb523a1dca401d 100644 (file)
@@ -1,6 +1,5 @@
 // run-pass
 
-#![feature(nll)]
 #![allow(unused_variables)]
 
 pub trait TryTransform {
index 0af8751494e0d376144eba3d48e89fdb1729eefd..eb46b30b6b94a16e8d148af8a8d68a8dbb4dda35 100644 (file)
@@ -1,7 +1,5 @@
 // run-pass
 
-#![feature(nll)]
-
 struct List<T> {
     value: T,
     next: Option<Box<List<T>>>,
index e9cd4014bc351ddacede2603d46ca6fd3740b460..84ac9bbd0ddc4246c9ef4025f289540093997f95 100644 (file)
@@ -1,7 +1,5 @@
 // run-pass
 
-#![feature(nll)]
-
 use std::collections::HashMap;
 
 fn process_or_insert_default(map: &mut HashMap<usize, String>, key: usize) {
index a4ef546c25f4afb7da7f593530e80408230ae35d..e59303d1f788f86dc10ff3095d2f2d4199676b9f 100644 (file)
@@ -6,8 +6,6 @@
 // `x`.  The lexical checker makes this very painful. The NLL checker
 // does not.
 
-#![feature(nll)]
-
 use std::rc::Rc;
 
 #[derive(Debug, PartialEq, Eq)]
index e7df319a0bb706cc770e6d5b5011eeca018f51cd..86061c8cd6e87de991958b3f6c5b9da565a03aca 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Node {
     elem: i32,
     next: Option<Box<Node>>,
index a5462b41396854caa3062c1082c2c7d246ee198f..ee174f6736e1e72ebd85c94c4d432a0fdeecec0c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `src`
-  --> $DIR/borrowck-issue-48962.rs:16:5
+  --> $DIR/borrowck-issue-48962.rs:14:5
    |
 LL |     let mut src = &mut node;
    |         ------- move occurs because `src` has type `&mut Node`, which does not implement the `Copy` trait
@@ -9,7 +9,7 @@ LL |     src.next = None;
    |     ^^^^^^^^ value used here after move
 
 error[E0382]: use of moved value: `src`
-  --> $DIR/borrowck-issue-48962.rs:22:5
+  --> $DIR/borrowck-issue-48962.rs:20:5
    |
 LL |     let mut src = &mut (22, 44);
    |         ------- move occurs because `src` has type `&mut (i32, i32)`, which does not implement the `Copy` trait
index d8fff5f17760aab6783539732193647db8b1c08f..20ab905fec46e591df83e2f5021d6e67c75fcd35 100644 (file)
@@ -1,7 +1,5 @@
 // run-pass
 
-#![feature(nll)]
-
 enum Nat {
     S(Box<Nat>),
     Z
index a8bfdbad38ba423062edd89eae58d7c0ba878621..7d5acb95751ed99d467cfbb43e7cdb1838944316 100644 (file)
@@ -8,8 +8,6 @@
 
 // run-pass
 
-#![feature(nll)]
-
 fn foo(x: &mut Result<(u32, u32), (u32, u32)>) -> u32 {
     match *x {
         Ok((ref mut v, _)) | Err((_, ref mut v)) if *v > 0 => { *v }
index 460e6b4bbae4d9b2d8b7b52f4a5d74675ab13274..671e83dfadc8b326709adc993e0a298ca7f125f4 100644 (file)
@@ -2,8 +2,6 @@
 // computing liveness that wound up accidentally causing the program
 // below to be accepted.
 
-#![feature(nll)]
-
 fn foo<'a>(x: &'a mut u32) -> u32 {
     let mut x = 22;
     let y = &x;
index e3216f5d33f986d7f7c268cacef4306beecce7fc..4abb6fb2c71868674dbf2266cd1c3afae61c9c71 100644 (file)
@@ -1,5 +1,5 @@
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/issue-52713-bug.rs:14:5
+  --> $DIR/issue-52713-bug.rs:12:5
    |
 LL |     let y = &x;
    |             -- borrow of `x` occurs here
index ad4accbbeeef93ccc5454be23d5a0eee165fc5f8..51df40016d8a78032e9d21ea4da358ec1a502d0f 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 #![allow(dead_code)]
 
 #[derive(Debug)]
index 6a12016b2a5e3b62ea17f37ee673f340e1ae5468..519f1d6fb2791b3107f8530d56ea0b4456750dd9 100644 (file)
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13
+  --> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:14:13
    |
 LL |             *array
    |             ^^^^^^
diff --git a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.nll.stderr
deleted file mode 100644 (file)
index efd4e1a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-error[E0506]: cannot assign to `greeting` because it is borrowed
-  --> $DIR/issue-58776-borrowck-scans-children.rs:11:5
-   |
-LL |     let res = (|| (|| &greeting)())();
-   |                --      -------- borrow occurs due to use in closure
-   |                |
-   |                borrow of `greeting` occurs here
-LL | 
-LL |     greeting = "DEALLOCATED".to_string();
-   |     ^^^^^^^^ assignment to borrowed `greeting` occurs here
-...
-LL |     println!("thread result: {:?}", res);
-   |                                     --- borrow later used here
-
-error[E0505]: cannot move out of `greeting` because it is borrowed
-  --> $DIR/issue-58776-borrowck-scans-children.rs:14:10
-   |
-LL |     let res = (|| (|| &greeting)())();
-   |                --      -------- borrow occurs due to use in closure
-   |                |
-   |                borrow of `greeting` occurs here
-...
-LL |     drop(greeting);
-   |          ^^^^^^^^ move out of `greeting` occurs here
-...
-LL |     println!("thread result: {:?}", res);
-   |                                     --- borrow later used here
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0505, E0506.
-For more information about an error, try `rustc --explain E0505`.
index 0f3f1a639f7e049af6713e8fb6cb70002ab9fe2a..efa313a9d23f4c2ec6ae533dc923e881d6f79944 100644 (file)
@@ -1,19 +1,11 @@
-// ignore-compare-mode-nll
-
-// revisions: migrate nll
-
-#![cfg_attr(nll, feature(nll))]
-
 fn main() {
     let mut greeting = "Hello world!".to_string();
     let res = (|| (|| &greeting)())();
 
     greeting = "DEALLOCATED".to_string();
-    //[migrate]~^ ERROR cannot assign
-    //[nll]~^^ ERROR cannot assign
+    //~^ ERROR cannot assign
     drop(greeting);
-    //[migrate]~^ ERROR cannot move
-    //[nll]~^^ ERROR cannot move
+    //~^ ERROR cannot move
 
     println!("thread result: {:?}", res);
 }
diff --git a/src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr b/src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr
new file mode 100644 (file)
index 0000000..9b1d6fa
--- /dev/null
@@ -0,0 +1,32 @@
+error[E0506]: cannot assign to `greeting` because it is borrowed
+  --> $DIR/issue-58776-borrowck-scans-children.rs:5:5
+   |
+LL |     let res = (|| (|| &greeting)())();
+   |                --      -------- borrow occurs due to use in closure
+   |                |
+   |                borrow of `greeting` occurs here
+LL | 
+LL |     greeting = "DEALLOCATED".to_string();
+   |     ^^^^^^^^ assignment to borrowed `greeting` occurs here
+...
+LL |     println!("thread result: {:?}", res);
+   |                                     --- borrow later used here
+
+error[E0505]: cannot move out of `greeting` because it is borrowed
+  --> $DIR/issue-58776-borrowck-scans-children.rs:7:10
+   |
+LL |     let res = (|| (|| &greeting)())();
+   |                --      -------- borrow occurs due to use in closure
+   |                |
+   |                borrow of `greeting` occurs here
+...
+LL |     drop(greeting);
+   |          ^^^^^^^^ move out of `greeting` occurs here
+...
+LL |     println!("thread result: {:?}", res);
+   |                                     --- borrow later used here
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0505, E0506.
+For more information about an error, try `rustc --explain E0505`.
index b1a4c54f49b1538486509d85ead2c0895ba04ea7..12222342c95a1d7fbca0ed24924ba2ed7fc09be8 100644 (file)
@@ -1,8 +1,6 @@
 // Test that a borrow which starts as a 2-phase borrow and gets
 // carried around a loop winds up conflicting with itself.
 
-#![feature(nll)]
-
 struct Foo { x: String }
 
 impl Foo {
index 933d3eb71117c647b8a7b127f5b0e206e1367ab4..38993a50bf6b20e84b192b15731e221c56a79c4c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0499]: cannot borrow `foo` as mutable more than once at a time
-  --> $DIR/two-phase-across-loop.rs:19:22
+  --> $DIR/two-phase-across-loop.rs:17:22
    |
 LL |         strings.push(foo.get_string());
    |                      ^^^ mutable borrow starts here in previous iteration of loop
index ed3d257da9f0f4f469bcfe77786775490f8da40f..bb646d7caf1e2ea917270a3ec137d3fb6e5e9b38 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Foo {
 }
 
index c4168503e4cca50fe049aba6e1201b48cd8f27a5..33fa4a3a15075ab5fc066359c21e5fe975634991 100644 (file)
@@ -1,5 +1,5 @@
 error[E0499]: cannot borrow `foo` as mutable more than once at a time
-  --> $DIR/two-phase-multi-mut.rs:13:5
+  --> $DIR/two-phase-multi-mut.rs:11:5
    |
 LL |     foo.method(&mut foo);
    |     ^^^^------^--------^
@@ -9,7 +9,7 @@ LL |     foo.method(&mut foo);
    |     second mutable borrow occurs here
 
 error[E0499]: cannot borrow `foo` as mutable more than once at a time
-  --> $DIR/two-phase-multi-mut.rs:13:16
+  --> $DIR/two-phase-multi-mut.rs:11:16
    |
 LL |     foo.method(&mut foo);
    |     --- ------ ^^^^^^^^ second mutable borrow occurs here
diff --git a/src/test/ui/c-variadic/variadic-ffi-5.rs b/src/test/ui/c-variadic/variadic-ffi-5.rs
deleted file mode 100644 (file)
index fcc80d9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#![crate_type="lib"]
-#![no_std]
-#![feature(c_variadic)]
-// The tests in this file are similar to that of variadic-ffi-4, but this
-// one enables nll.
-#![feature(nll)]
-
-use core::ffi::VaList;
-
-pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> {
-    ap //~ ERROR: explicit lifetime required
-}
-
-pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> {
-    ap //~ ERROR: explicit lifetime required
-}
-
-pub unsafe extern "C" fn no_escape2(_: usize, ap: ...) {
-    let _ = ap.with_copy(|ap| { ap }); //~ ERROR: lifetime may not live long enough
-}
-
-pub unsafe extern "C" fn no_escape3(_: usize, ap0: &mut VaList, mut ap1: ...) {
-    *ap0 = ap1; //~ ERROR: lifetime may not live long enough
-}
-
-pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) {
-    ap0 = &mut ap1;
-    //~^ ERROR: lifetime may not live long enough
-    //~^^ ERROR: lifetime may not live long enough
-    //~^^^ ERROR: `ap1` does not live long enough
-}
diff --git a/src/test/ui/c-variadic/variadic-ffi-5.stderr b/src/test/ui/c-variadic/variadic-ffi-5.stderr
deleted file mode 100644 (file)
index 2742101..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-error[E0621]: explicit lifetime required in the type of `ap`
-  --> $DIR/variadic-ffi-5.rs:11:5
-   |
-LL | pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> {
-   |                                                       --- help: add explicit lifetime `'a` to the type of `ap`: `core::ffi::VaList<'a>`
-LL |     ap
-   |     ^^ lifetime `'a` required
-
-error[E0621]: explicit lifetime required in the type of `ap`
-  --> $DIR/variadic-ffi-5.rs:15:5
-   |
-LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> {
-   |                                                   --- help: add explicit lifetime `'static` to the type of `ap`: `core::ffi::VaList<'static>`
-LL |     ap
-   |     ^^ lifetime `'static` required
-
-error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-5.rs:19:33
-   |
-LL |     let _ = ap.with_copy(|ap| { ap });
-   |                           ---   ^^ returning this value requires that `'1` must outlive `'2`
-   |                           | |
-   |                           | return type of closure is core::ffi::VaList<'2>
-   |                           has type `core::ffi::VaList<'1>`
-
-error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-5.rs:23:5
-   |
-LL | pub unsafe extern "C" fn no_escape3(_: usize, ap0: &mut VaList, mut ap1: ...) {
-   |                                               ---               ------- has type `core::ffi::VaList<'1>`
-   |                                               |
-   |                                               has type `&mut core::ffi::VaList<'2>`
-LL |     *ap0 = ap1;
-   |     ^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
-
-error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-5.rs:27:5
-   |
-LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) {
-   |                                               -------               ------- has type `core::ffi::VaList<'2>`
-   |                                               |
-   |                                               has type `&mut core::ffi::VaList<'1>`
-LL |     ap0 = &mut ap1;
-   |     ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
-
-error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-5.rs:27:5
-   |
-LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) {
-   |                                               -------               ------- has type `core::ffi::VaList<'1>`
-   |                                               |
-   |                                               has type `&mut core::ffi::VaList<'2>`
-LL |     ap0 = &mut ap1;
-   |     ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
-
-error[E0597]: `ap1` does not live long enough
-  --> $DIR/variadic-ffi-5.rs:27:11
-   |
-LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) {
-   |                                                        - let's call the lifetime of this reference `'1`
-LL |     ap0 = &mut ap1;
-   |     ------^^^^^^^^
-   |     |     |
-   |     |     borrowed value does not live long enough
-   |     assignment requires that `ap1` is borrowed for `'1`
-...
-LL | }
-   |  - `ap1` dropped here while still borrowed
-
-error: aborting due to 7 previous errors
-
-Some errors have detailed explanations: E0597, E0621.
-For more information about an error, try `rustc --explain E0597`.
index 06b1727258dc249791cd8094aeb4e4bd63320041..34f61ed5a347410315fd1b79154f36966b181ea7 100644 (file)
@@ -1,7 +1,5 @@
 // compile-pass
 
-#![feature(nll)]
-
 pub fn main() {
     let y: &'static mut [u8; 0] = &mut [];
 }
index b5a8fe8819cdd6091b2be1b41244549cd6aad7e2..f1947933d67074725646aec5cbfc339f5d461d4d 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]); //~ ERROR temporary value dropped while borrowed
 
 use std::borrow::Cow;
index 9b6638b228e755706c6ef03c6f02a970dad6f9ef..8dcb4daca3b707a564a8fc7f50bb13e6a2996299 100644 (file)
@@ -1,5 +1,5 @@
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-54224.rs:3:39
+  --> $DIR/issue-54224.rs:1:39
    |
 LL | const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]);
    |                                 ------^^^^^^^^^-
@@ -9,7 +9,7 @@ LL | const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]);
    |                                 using this value as a constant requires that borrow lasts for `'static`
 
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-54224.rs:11:57
+  --> $DIR/issue-54224.rs:9:57
    |
 LL | pub const Z: Cow<'static, [ [u8; 3] ]> = Cow::Borrowed(&[*b"ABC"]);
    |                                          ---------------^^^^^^^^^-
index d199e34775e4be1d9a871e831297f5408b6d491a..dc21b9fe8cd1b655d380ba2fd0a00a4dbf5c175a 100644 (file)
@@ -1,7 +1,5 @@
 //compile-pass
 
-#![feature(nll)]
-
 fn main() {
 
     let _: &'static usize = &(loop {}, 1).1;
index 045322de3470820ed61789bd5ddcf5d038d93b4d..6b6eea36361bf3fef2087c8123a5c34324c1fbad 100644 (file)
@@ -1,8 +1,6 @@
 // compile-pass
 // aux-build:promotable_const_fn_lib.rs
 
-#![feature(nll)]
-
 extern crate promotable_const_fn_lib;
 
 use promotable_const_fn_lib::{foo, Foo};
index 0350708d673d7d52a9558f76aaf806f6d6ea6a72..d982f350208e22ac7f1a87e587e3fab30c61c07e 100644 (file)
@@ -1,7 +1,5 @@
 // compile-pass
 
-#![feature(nll)]
-
 fn main() {
     let x: &'static u8 = &u8::max_value();
     let x: &'static u16 = &u16::max_value();
diff --git a/src/test/ui/generator/generator-region-requirements.nll.stderr b/src/test/ui/generator/generator-region-requirements.nll.stderr
deleted file mode 100644 (file)
index 8a96d18..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0621]: explicit lifetime required in the type of `x`
-  --> $DIR/generator-region-requirements.rs:16:51
-   |
-LL | fn dangle(x: &mut i32) -> &'static mut i32 {
-   |              -------- help: add explicit lifetime `'static` to the type of `x`: `&'static mut i32`
-...
-LL |             GeneratorState::Complete(c) => return c,
-   |                                                   ^ lifetime `'static` required
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0621`.
index cd9abaae056c1f879e43c084ac4123279e66df28..41cb339f459113313440b56421fb18a76dd1ad88 100644 (file)
@@ -1,8 +1,4 @@
-// revisions: migrate nll
-// ignore-compare-mode-nll
-
 #![feature(generators, generator_trait)]
-#![cfg_attr(nll, feature(nll))]
 use std::ops::{Generator, GeneratorState};
 use std::pin::Pin;
 
@@ -14,8 +10,7 @@ fn dangle(x: &mut i32) -> &'static mut i32 {
     loop {
         match Pin::new(&mut g).resume() {
             GeneratorState::Complete(c) => return c,
-//[nll]~^ ERROR explicit lifetime required
-//[migrate]~^^ ERROR explicit lifetime required
+            //~^ ERROR explicit lifetime required
             GeneratorState::Yielded(_) => (),
         }
     }
diff --git a/src/test/ui/generator/generator-region-requirements.stderr b/src/test/ui/generator/generator-region-requirements.stderr
new file mode 100644 (file)
index 0000000..53d48bc
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0621]: explicit lifetime required in the type of `x`
+  --> $DIR/generator-region-requirements.rs:12:51
+   |
+LL | fn dangle(x: &mut i32) -> &'static mut i32 {
+   |              -------- help: add explicit lifetime `'static` to the type of `x`: `&'static mut i32`
+...
+LL |             GeneratorState::Complete(c) => return c,
+   |                                                   ^ lifetime `'static` required
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0621`.
index 87afa57ab51989fd369a101bc1d15d940e3a00f7..cee3e6d226c12dc47eaa8e3261b94c9624d491e9 100644 (file)
@@ -1,5 +1,4 @@
 #![feature(generators)]
-#![feature(nll)]
 
 fn main() {
     || {
index bd5abb202068c59a0c119ebbb5a395f8f712e76e..14199aeb93056cb3671f7ad93fdb8b3ceb019c22 100644 (file)
@@ -1,5 +1,5 @@
 error[E0626]: borrow may still be in use when generator yields
-  --> $DIR/generator-with-nll.rs:8:17
+  --> $DIR/generator-with-nll.rs:7:17
    |
 LL |         let b = &mut true;
    |                 ^^^^^^^^^
index cb5f78bd6fc0f3c620795d8f6bbfdc4ec22671ef..58d7875ccd03422453d43b4125a183ab7e7e6ae0 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // Regression test for #54593: the MIR type checker was going wrong
 // when a closure returns the `impl Copy` from its parent fn. It was
 // (incorrectly) replacing the `impl Copy` in its return type with the
index cb40d90ae551a565e1888f2935bd31971c555c6b..adaa474474f674ec66ee2eb4ac7e961a0612021d 100644 (file)
@@ -9,7 +9,6 @@
 
 #![allow(dead_code)]
 #![feature(in_band_lifetimes)]
-#![feature(nll)]
 
 fn foo(x: &'x u32) -> impl Fn() -> &'y u32
 where 'x: 'y
index e2310a3907f7e69dccf05a3adf0a2ee06e336275..204c2ff304114de5beefd933118bcf39b26a5a70 100644 (file)
@@ -9,7 +9,6 @@
 
 #![allow(dead_code)]
 #![feature(in_band_lifetimes)]
-#![feature(nll)]
 
 trait Trait<'a> { }
 
index d62aec800e8ce7bcae2ef0ef38b70148d3f8ea08..29243699e44fd11a00e210259009f3654856f41b 100644 (file)
@@ -5,7 +5,6 @@
 
 #![allow(dead_code)]
 #![feature(in_band_lifetimes)]
-#![feature(nll)]
 
 use std::cell::Cell;
 
index 81b44b7eba7fdd43de6657d6015da8ba46c8f182..5c8e322f712d167f370846766c2b63649cfa8908 100644 (file)
@@ -1,11 +1,11 @@
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
-  --> $DIR/region-escape-via-bound.rs:16:29
+  --> $DIR/region-escape-via-bound.rs:15:29
    |
 LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
    |                             ^^^^^^^^^^^^^^
    |
-note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 18:7
-  --> $DIR/region-escape-via-bound.rs:18:7
+note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 17:7
+  --> $DIR/region-escape-via-bound.rs:17:7
    |
 LL | where 'x: 'y
    |       ^^
index 226c21446b1ed5022795e7c8445e6cf09a4d2d75..bdc9fe43a8bd961fc33dfbda3e8fe56574dfe353 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 pub trait Foo {
     fn zero(self) -> Self;
 }
index 2ed7b543e713c8b691e0e098b639793a995d9929..d5cede990a335116a3d8f631ae19745d6da8c0b7 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/issue-34721.rs:27:9
+  --> $DIR/issue-34721.rs:25:9
    |
 LL |     pub fn baz<T: Foo>(x: T) -> T {
    |                -       - move occurs because `x` has type `T`, which does not implement the `Copy` trait
index b5d9036aba67cf3912f54a2dd65780b1d7c2a84d..c688261fa1cb1c3670eaf75011d99f03613d73ba 100644 (file)
@@ -6,11 +6,6 @@
 // We will explicitly test NLL, and migration modes; thus we will also skip the
 // automated compare-mode=nll.
 
-// revisions: nll migrate
-// ignore-compare-mode-nll
-
-#![cfg_attr(nll, feature(nll))]
-
 // run-pass
 
 // This test has structs and functions that are by definition unusable
index c517bbe57e82be38f563cc716cf9c8e23db6ba8e..18af33c1821c0d6c7dfa4ba27422643a8eb4b3ff 100644 (file)
@@ -1,6 +1,5 @@
 // Issue 46036: [NLL] false edges on infinite loops
 // Infinite loops should create false edges to the cleanup block.
-#![feature(nll)]
 
 struct Foo { x: &'static u32 }
 
index 9c1746e0fa1eeae6d896b3981c4a7d9d73c0d98e..49dd0e267b8ea8f187ad806f0cf1a23f4c34bf59 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `a` does not live long enough
-  --> $DIR/issue-46036.rs:9:24
+  --> $DIR/issue-46036.rs:8:24
    |
 LL |     let foo = Foo { x: &a };
    |                        ^^
index a5c1e17a58c3bebcc314d5d6c4053f1f692da627..c1fd7729bdefb6f3b36f739129321c7d4306b884 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn foo(x: &u32) -> &'static u32 {
     &*x
     //~^ ERROR explicit lifetime required in the type of `x` [E0621]
index 43d351ec905e3277174cf7592fd128c173b848a5..8a4a6bdb39fa4202a72193a357f84533dd88ac04 100644 (file)
@@ -1,5 +1,5 @@
 error[E0621]: explicit lifetime required in the type of `x`
-  --> $DIR/issue-46983.rs:4:5
+  --> $DIR/issue-46983.rs:2:5
    |
 LL | fn foo(x: &u32) -> &'static u32 {
    |           ---- help: add explicit lifetime `'static` to the type of `x`: `&'static u32`
index 04f1146a8f8ff45f5a2cb72b8964e24fd340bbd3..2f78ce0002ba3308bc713841993b9eccf873c3bd 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn main() {
     let _vec: Vec<&'static String> = vec![&String::new()];
     //~^ ERROR temporary value dropped while borrowed [E0716]
index 2b4d576e726f8aef4ee45a036027821524d89765..f97713b4ac438f4ca46858f42a63ffd3079ae69f 100644 (file)
@@ -1,5 +1,5 @@
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-47184.rs:4:44
+  --> $DIR/issue-47184.rs:2:44
    |
 LL |     let _vec: Vec<&'static String> = vec![&String::new()];
    |               --------------------         ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
index c3c07bf641161d56667d2efebb3f384ac7bb3e5d..ace6cdce841a7db557b136fc4f59421da42981b8 100644 (file)
@@ -1,6 +1,3 @@
-#![allow(warnings)]
-#![feature(nll)]
-
 use std::collections::BinaryHeap;
 
 fn main() {
index db9f227d6b7762d79732e02246a3ad13a320428a..c0b876368480653e7468728e05694ed309945bc1 100644 (file)
@@ -1,5 +1,5 @@
 error[E0502]: cannot borrow `heap` as immutable because it is also borrowed as mutable
-  --> $DIR/issue-47646.rs:12:30
+  --> $DIR/issue-47646.rs:9:30
    |
 LL |     let borrow = heap.peek_mut();
    |                  ---- mutable borrow occurs here
index 9add314fdaf0906f18d35bf1d90d886db214d83c..74323317f195643a2ca754fab96e935d8ea35de1 100644 (file)
@@ -1,6 +1,4 @@
 // compile-pass
-#![allow(dead_code)]
-#![feature(nll)]
 
 struct AtomicRefMut<'a> {
     value: &'a mut i32,
index 850771cffd0cfb1f627e7924aa51b646f1000424..377eeb67ae1b95d0f691faf7fde636a8a988ed6d 100644 (file)
@@ -1,6 +1,4 @@
 // compile-pass
-#![allow(dead_code)]
-#![feature(nll)]
 
 struct WithDrop;
 
index 06b17e931a9743d3db6481306e59109c59ddf9fe..22f2a1f364d1d21fb4777e0605422fb4f04e3ba5 100644 (file)
@@ -1,6 +1,4 @@
 // compile-pass
-#![allow(dead_code)]
-#![feature(nll)]
 
 struct MyStruct<'a> {
     field: &'a mut (),
index c9bc6147aa9ca421e39a46e4d41e0897059a5659..cefc872668cebd9c773753d08cf20fd9bd726522 100644 (file)
@@ -1,10 +1,8 @@
 // compile-pass
-#![allow(dead_code)]
 
 // Tests that automatic coercions from &mut T to *mut T
 // allow borrows of T to expire immediately - essentially, that
 // they work identically to 'foo as *mut T'
-#![feature(nll)]
 
 struct SelfReference {
     self_reference: *mut SelfReference,
index d15a27a2a2e65510f52bd47223f79fd738595f6a..334bd608add15afc59366363de6b1b4d33c608fe 100644 (file)
@@ -1,9 +1,6 @@
 // compile-pass
-#![allow(dead_code)]
 #![allow(non_upper_case_globals)]
 
-#![feature(nll)]
-
 static mut x: &'static u32 = &0;
 
 fn foo() {
index b3cef78f3e6b4b62b501c02f81b3308db613c0aa..ea325ea695f66a04c94b4eb8e00c7f783b228492 100644 (file)
@@ -3,9 +3,6 @@
 
 // run-pass
 
-#![feature(nll)]
-#![allow(warnings)]
-
 struct Inner<I, V> {
     iterator: I,
     item: V,
index 245f13b2b609d8e79f83f0fb79c35275c5c8f56e..90e9858d741972a353d48ee62989b2de60c60de5 100644 (file)
@@ -3,9 +3,6 @@
 
 // run-pass
 
-#![feature(nll)]
-#![allow(warnings)]
-
 pub struct Container<T: Iterator> {
     value: Option<T::Item>,
 }
index bc1bc29c98f2e967e123055b625b87550da5a498..f7fd04179f26e35e70216fb2fb87b3770c1d87d5 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn flatten<'a, 'b, T>(x: &'a &'b T) -> &'a T {
     x
 }
index 9a6da9e625da4bd0bec0118ebbe2ae7961f76a53..2f94039c0c3a934af7970fa24cc473ce8f4e8c8f 100644 (file)
@@ -1,5 +1,5 @@
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/issue-48803.rs:12:5
+  --> $DIR/issue-48803.rs:10:5
    |
 LL |     let y = &x;
    |             -- borrow of `x` occurs here
index 34f277af01e97b1e5e51774d1e2e0ff84b4105a2..dd7b9eeb8d54e65bb20898718f52199ffed886c7 100644 (file)
@@ -1,8 +1,6 @@
 // compile-pass
 // ignore-emscripten no i128 support
 
-#![feature(nll)]
-
 fn fibs(n: u32) -> impl Iterator<Item=u128> {
     (0 .. n)
     .scan((0, 1), |st, _| {
index 64d9822bab4daadbdff8a2f5f6ea96acea1b2dfe..8eab7b2fa3ae9b215555e4633a4203d6619bee1b 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn main() {
     let foo = &16;
     //~^ HELP consider changing this to be a mutable reference
index 0e6c8fd48f19f73bf6459cd809e309ce1cef9f1d..827bb8fe2b8920e5d651faec472e06985ccd585e 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `*foo` which is behind a `&` reference
-  --> $DIR/issue-51515.rs:7:5
+  --> $DIR/issue-51515.rs:5:5
    |
 LL |     let foo = &16;
    |               --- help: consider changing this to be a mutable reference: `&mut 16`
@@ -8,7 +8,7 @@ LL |     *foo = 32;
    |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
 
 error[E0594]: cannot assign to `*bar` which is behind a `&` reference
-  --> $DIR/issue-51515.rs:12:5
+  --> $DIR/issue-51515.rs:10:5
    |
 LL |     let bar = foo;
    |         --- help: consider changing this to be a mutable reference: `&mut i32`
index 356efd5dfedbaec1c0365da391c801cbc6907e80..911983445e6d6f434b63c779c942a6fff7ddde0b 100644 (file)
@@ -4,8 +4,6 @@
 //
 // run-pass
 
-#![feature(nll)]
-
 pub trait Parser {
     type Input;
 
index 0fdf077d2fc157953fd8bd2117c4e7ad84094455..c58656330e12b38981e72d260f2aadc5667efa7f 100644 (file)
@@ -4,8 +4,6 @@
 //
 // compile-pass
 
-#![feature(nll)]
-
 fn main() {}
 
 fn fail<'a>() -> Struct<'a, Generic<()>> {
index f04d861250b4044cdeee54c9e309a3b533544ee5..4d3b3f80a97e53f804ef0d18618d7ea26d50c161 100644 (file)
@@ -3,9 +3,6 @@
 //
 // compile-pass
 
-#![feature(nll)]
-#![allow(dead_code)]
-
 trait Future {
     type Item;
 }
index 7750e3403619288b0f44a332799ebc97c7e25c80..8d3a4e72de411b88185c21909c5f404aa1030e43 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // This test is a minimal version of an ICE in the dropck-eyepatch tests
 // found in the fix for #54943.
 
index f829c38c35d23638963114e4bc92fbe043512d9f..41ca7c1498265b30c2be23281d86d1ea6dd900d9 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // This test is a minimal version of an ICE in the dropck-eyepatch tests
 // found in the fix for #54943. In particular, this test is in unreachable
 // code as the initial fix for this ICE only worked if the code was reachable.
diff --git a/src/test/ui/issues/issue-54943.nll.stderr b/src/test/ui/issues/issue-54943.nll.stderr
new file mode 100644 (file)
index 0000000..59be0f9
--- /dev/null
@@ -0,0 +1,11 @@
+error: lifetime may not live long enough
+  --> $DIR/issue-54943.rs:6:13
+   |
+LL | fn boo<'a>() {
+   |        -- lifetime `'a` defined here
+...
+LL |     let x = foo::<&'a u32>();
+   |             ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index ce4e010674359670526297c83d84bef3cf11d4d9..85722300bf0064160093dcb2d0676d551eedaf23 100644 (file)
@@ -1,13 +1,10 @@
-#![feature(nll)]
-#![allow(warnings)]
-
 fn foo<T: 'static>() { }
 
 fn boo<'a>() {
     return;
 
     let x = foo::<&'a u32>();
-    //~^ ERROR lifetime may not live long enough
+    //~^ ERROR
 }
 
 fn main() {}
index aa68177bcdb58dd5a268d92d21192e24f5620181..d0f03f90c833013c3513bbd440e15cd5fab07a60 100644 (file)
@@ -1,11 +1,10 @@
-error: lifetime may not live long enough
-  --> $DIR/issue-54943.rs:9:13
+error[E0477]: the type `&'a u32` does not fulfill the required lifetime
+  --> $DIR/issue-54943.rs:6:13
    |
-LL | fn boo<'a>() {
-   |        -- lifetime `'a` defined here
-...
 LL |     let x = foo::<&'a u32>();
-   |             ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+   |             ^^^^^^^^^^^^^^
+   |
+   = note: type must satisfy the static lifetime
 
 error: aborting due to previous error
 
index 07ac1900bc71c66e1192caad287bc66a21257236..91d41e9b5794e844451ae977e34acdd295b82d50 100644 (file)
@@ -1,6 +1,5 @@
 // General test of maybe_uninits state computed by MIR dataflow.
 
-#![feature(nll)]
 #![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
index 6bc5f7dcb99fcad4f91ea6176678b7b8b7782ae7..48d8450489488823a0b51ac5a30cac8b3edd5591 100644 (file)
@@ -1,23 +1,23 @@
 error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:15:14
+  --> $DIR/def-inits-1.rs:14:14
    |
 LL |     unsafe { rustc_peek(&ret); }
    |              ^^^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:31:14
+  --> $DIR/def-inits-1.rs:30:14
    |
 LL |     unsafe { rustc_peek(&z); }
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:34:14
+  --> $DIR/def-inits-1.rs:33:14
    |
 LL |     unsafe { rustc_peek(&y); }
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/def-inits-1.rs:42:14
+  --> $DIR/def-inits-1.rs:41:14
    |
 LL |     unsafe { rustc_peek(&x); }
    |              ^^^^^^^^^^^^^^
index 13f900e4a75eeb7a8b0dd94373c92e89605102a4..4a4786a2a73783fd223564f9e418492f2def71a6 100644 (file)
@@ -1,6 +1,5 @@
 // General test of maybe_inits state computed by MIR dataflow.
 
-#![feature(nll)]
 #![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
index 38a9c60b168d1886b249de94fa86d7527ece1bba..23d0679cb1ac180c30f583b78710fa609df69da2 100644 (file)
@@ -1,17 +1,17 @@
 error: rustc_peek: bit not set
-  --> $DIR/inits-1.rs:15:14
+  --> $DIR/inits-1.rs:14:14
    |
 LL |     unsafe { rustc_peek(&ret); }
    |              ^^^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/inits-1.rs:35:14
+  --> $DIR/inits-1.rs:34:14
    |
 LL |     unsafe { rustc_peek(&y); }
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/inits-1.rs:43:14
+  --> $DIR/inits-1.rs:42:14
    |
 LL |     unsafe { rustc_peek(&x); }
    |              ^^^^^^^^^^^^^^
index 4c64359693296f810d3374a0daf7f28fe2868be1..66b3f458a5159f932f0e033fc358ee86d8b71995 100644 (file)
@@ -1,6 +1,5 @@
 // General test of maybe_uninits state computed by MIR dataflow.
 
-#![feature(nll)]
 #![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
index c60987050e6385361a46aa4bbd354c430e8e48e4..5f6dbde212d0ae922896e41bfa70d97a94416cf2 100644 (file)
@@ -1,29 +1,29 @@
 error: rustc_peek: bit not set
-  --> $DIR/uninits-1.rs:19:14
+  --> $DIR/uninits-1.rs:18:14
    |
 LL |     unsafe { rustc_peek(&x) };
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/uninits-1.rs:20:14
+  --> $DIR/uninits-1.rs:19:14
    |
 LL |     unsafe { rustc_peek(&y) };
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/uninits-1.rs:21:14
+  --> $DIR/uninits-1.rs:20:14
    |
 LL |     unsafe { rustc_peek(&z) };
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/uninits-1.rs:37:14
+  --> $DIR/uninits-1.rs:36:14
    |
 LL |     unsafe { rustc_peek(&x); }
    |              ^^^^^^^^^^^^^^
 
 error: rustc_peek: bit not set
-  --> $DIR/uninits-1.rs:45:14
+  --> $DIR/uninits-1.rs:44:14
    |
 LL |     unsafe { rustc_peek(&ret); }
    |              ^^^^^^^^^^^^^^^^
index 2247e68d097fc6d4dc769324abb656d99b509406..2ccf1c7f9d6c67e5fd7a365c2e80e8ebab90a7a9 100644 (file)
@@ -1,6 +1,5 @@
 // General test of maybe_uninits state computed by MIR dataflow.
 
-#![feature(nll)]
 #![feature(core_intrinsics, rustc_attrs)]
 
 use std::intrinsics::rustc_peek;
index de3e58e52de41512b6c3d46e03050bd52be008ee..dcb61371994db2ee303da2e9d217064577652f1d 100644 (file)
@@ -1,5 +1,5 @@
 error: rustc_peek: bit not set
-  --> $DIR/uninits-2.rs:15:14
+  --> $DIR/uninits-2.rs:14:14
    |
 LL |     unsafe { rustc_peek(&x) };
    |              ^^^^^^^^^^^^^^
index 03db28fc508b144717872bc953a7598a6835069d..42e28b9674b3097bc7cb340e2821ea3693d72b65 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // run-pass
 
 fn vec() {
index 59936a80925342717e6b2f388d0a71ee607c213e..7d3b00dfc716331612da2f98015de6795cf39957 100644 (file)
@@ -3,7 +3,6 @@
 //
 // FIXME(#54366) - We probably shouldn't allow #[thread_local] static mut to get a 'static lifetime.
 
-#![feature(nll)]
 #![feature(thread_local)]
 
 #[thread_local]
index d37e61b63a814d283b5a17dd8c6e59c9735e7523..d333356d964ce79e11411c81590c63410376f2ff 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn gimme(x: &(u32,)) -> &u32 {
     &x.0
 }
index 799eec9d3422c022a46570a876adfacd25be6a0f..d629caa435319c355347a94dabec6360edff860e 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `v` does not live long enough
-  --> $DIR/borrowed-local-error.rs:10:9
+  --> $DIR/borrowed-local-error.rs:8:9
    |
 LL |     let x = gimme({
    |             ----- borrow later used by call
index 7bad6dc2cd335d11dab582b0e2132394a7ab5f5b..d4b05fb79316084ab9477e25da42e79c42e3fb6b 100644 (file)
@@ -1,7 +1,6 @@
 // Regression test for issue #38899
 
 #![feature(nll)]
-#![allow(dead_code)]
 
 pub struct Block<'a> {
     current: &'a u8,
index 5c9c48f5b1d8379233b75c37f146bcf710ba18c4..38a6e27a0e5600ff199bfc8ea1bd9b199085ac85 100644 (file)
@@ -1,5 +1,5 @@
 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
-  --> $DIR/borrowed-referent-issue-38899.rs:14:21
+  --> $DIR/borrowed-referent-issue-38899.rs:13:21
    |
 LL |     let x = &mut block;
    |             ---------- mutable borrow occurs here
index 5ad987c721470bbab08f411ca8da30687658adb7..37d0e670d350d1d7f9b47a5588307de541e32ce6 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn gimme(x: &(u32,)) -> &u32 {
     &x.0
 }
index c0d42312eb1adf90005df986c54d0203d8a2d90d..2c6bd92641f608c7e7947ef2d410de46deb4f6ce 100644 (file)
@@ -1,5 +1,5 @@
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/borrowed-temporary-error.rs:10:10
+  --> $DIR/borrowed-temporary-error.rs:8:10
    |
 LL |         &(v,)
    |          ^^^^ creates a temporary which is freed while still in use
index a10a62b470d76b1a2e02e41251034477f1f1456f..3f9b2f2924c2cf3d4c8a9c1bef71f0ccee5609f6 100644 (file)
@@ -1,6 +1,3 @@
-#![feature(nll)]
-#![allow(warnings)]
-
 fn foo<'a>(x: &'a (u32,)) -> &'a u32 {
     let v = 22;
     &v
index e89a77a2d360fe909b8c7c5607a5528318f6022f..7213ed3bafb376062f20ade07dae380fefbcd88e 100644 (file)
@@ -1,5 +1,5 @@
 error[E0515]: cannot return reference to local variable `v`
-  --> $DIR/borrowed-universal-error-2.rs:6:5
+  --> $DIR/borrowed-universal-error-2.rs:3:5
    |
 LL |     &v
    |     ^^ returns a reference to data owned by the current function
index 18a0a72c4bb83592fffcd0117edea1c7ffacac0a..fc9ffd47061b4556ecd418eec42dd103c64f5764 100644 (file)
@@ -1,6 +1,3 @@
-#![feature(nll)]
-#![allow(warnings)]
-
 fn gimme(x: &(u32,)) -> &u32 {
     &x.0
 }
index 4b76795943e6466fe0a027db2cd9eb6304b11c92..88a2d8fcf8cc0eafe6c9393de9c303bbf653e973 100644 (file)
@@ -1,5 +1,5 @@
 error[E0515]: cannot return value referencing temporary value
-  --> $DIR/borrowed-universal-error.rs:10:5
+  --> $DIR/borrowed-universal-error.rs:7:5
    |
 LL |     gimme(&(v,))
    |     ^^^^^^^----^
index 222f4e71c52fee6b40065b3eca56d5aaa1699860..9d2624a9d6fa628b2710da6ec316f9a31385e578 100644 (file)
@@ -1,7 +1,6 @@
 // Check that capturing a mutable reference by move and assigning to its
 // referent doesn't make the unused mut lint think that it is mutable.
 
-#![feature(nll)]
 #![deny(unused_mut)]
 
 fn mutable_upvar() {
index 327ce0c6e81f00ce08b95a1897b5f194c3da7617..883b2d05a7f51b75f48fd8f3c122a072a611a046 100644 (file)
@@ -1,5 +1,5 @@
 error: variable does not need to be mutable
-  --> $DIR/capture-mut-ref.rs:8:9
+  --> $DIR/capture-mut-ref.rs:7:9
    |
 LL |     let mut x = &mut 0;
    |         ----^
@@ -7,7 +7,7 @@ LL |     let mut x = &mut 0;
    |         help: remove this `mut`
    |
 note: lint level defined here
-  --> $DIR/capture-mut-ref.rs:5:9
+  --> $DIR/capture-mut-ref.rs:4:9
    |
 LL | #![deny(unused_mut)]
    |         ^^^^^^^^^^
index bf2db32901e681687c80fe432f0f52732f720979..db6ac7d66ccc48363c8077f8802c4879a93bb6f6 100644 (file)
@@ -1,9 +1,6 @@
 // Test that a structure which tries to store a pointer to `y` into
 // `p` (indirectly) fails to compile.
 
-#![feature(rustc_attrs)]
-#![feature(nll)]
-
 struct SomeStruct<'a, 'b: 'a> {
     p: &'a mut &'b i32,
     y: &'b i32,
index 7fafb4474fdb3798ecdc138f4bee34d29946cd3a..521e543bd269310b22917e285efd0096b00d9a85 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `y` does not live long enough
-  --> $DIR/capture-ref-in-struct.rs:21:16
+  --> $DIR/capture-ref-in-struct.rs:18:16
    |
 LL |             y: &y,
    |                ^^ borrowed value does not live long enough
index 1e11b4818183b907c5a830e16d9f40caed1d78fc..2a59e80b25cd94903dd21fb3e1ce26f7c80a71a8 100644 (file)
@@ -1,7 +1,5 @@
 // check that accesses due to a closure capture give a special note
 
-#![feature(nll)]
-
 fn closure_imm_capture_conflict(mut x: i32) {
     let r = &mut x;
     || x; //~ ERROR
index 32958e28a3d08975c412c6123aea530c93095290..4a8086905b7df297696c96cf66c8b7dc04117952 100644 (file)
@@ -1,5 +1,5 @@
 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
-  --> $DIR/closure-access-spans.rs:7:5
+  --> $DIR/closure-access-spans.rs:5:5
    |
 LL |     let r = &mut x;
    |             ------ mutable borrow occurs here
@@ -11,7 +11,7 @@ LL |     r.use_mut();
    |     - mutable borrow later used here
 
 error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/closure-access-spans.rs:13:5
+  --> $DIR/closure-access-spans.rs:11:5
    |
 LL |     let r = &mut x;
    |             ------ first mutable borrow occurs here
@@ -23,7 +23,7 @@ LL |     r.use_mut();
    |     - first borrow later used here
 
 error[E0500]: closure requires unique access to `x` but it is already borrowed
-  --> $DIR/closure-access-spans.rs:19:5
+  --> $DIR/closure-access-spans.rs:17:5
    |
 LL |     let r = &mut x;
    |             ------ borrow occurs here
@@ -35,7 +35,7 @@ LL |     r.use_mut();
    |     - first borrow later used here
 
 error[E0503]: cannot use `x` because it was mutably borrowed
-  --> $DIR/closure-access-spans.rs:25:13
+  --> $DIR/closure-access-spans.rs:23:13
    |
 LL |     let r = &mut x;
    |             ------ borrow of `x` occurs here
@@ -45,7 +45,7 @@ LL |     r.use_ref();
    |     - borrow later used here
 
 error[E0505]: cannot move out of `x` because it is borrowed
-  --> $DIR/closure-access-spans.rs:31:5
+  --> $DIR/closure-access-spans.rs:29:5
    |
 LL |     let r = &x;
    |             -- borrow of `x` occurs here
@@ -57,7 +57,7 @@ LL |     r.use_ref();
    |     - borrow later used here
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/closure-access-spans.rs:37:5
+  --> $DIR/closure-access-spans.rs:35:5
    |
 LL | fn closure_imm_capture_moved(mut x: String) {
    |                              ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
@@ -69,7 +69,7 @@ LL |     || x.len();
    |     value borrowed here after move
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/closure-access-spans.rs:42:5
+  --> $DIR/closure-access-spans.rs:40:5
    |
 LL | fn closure_mut_capture_moved(mut x: String) {
    |                              ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
@@ -81,7 +81,7 @@ LL |     || x = String::new();
    |     value borrowed here after move
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/closure-access-spans.rs:47:5
+  --> $DIR/closure-access-spans.rs:45:5
    |
 LL | fn closure_unique_capture_moved(x: &mut String) {
    |                                 - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait
@@ -93,7 +93,7 @@ LL |     || *x = String::new();
    |     value borrowed here after move
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/closure-access-spans.rs:52:5
+  --> $DIR/closure-access-spans.rs:50:5
    |
 LL | fn closure_move_capture_moved(x: &mut String) {
    |                               - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait
index 7fc301b70380b1da75c0d5ae5495aa3cb3c787db..b38f7900e8e5e89c7959ea6f85caedf40c77b9de 100644 (file)
@@ -1,7 +1,5 @@
 // check that existing borrows due to a closure capture give a special note
 
-#![feature(nll)]
-
 fn move_while_borrowed(x: String) {
     let f = || x.len();
     let y = x; //~ ERROR
index 30d99d56678ce0492245a1cfdfc31311528961c8..a3bcbbab3ec691214aaf7f9e946362a9b6683d8a 100644 (file)
@@ -1,5 +1,5 @@
 error[E0505]: cannot move out of `x` because it is borrowed
-  --> $DIR/closure-borrow-spans.rs:7:13
+  --> $DIR/closure-borrow-spans.rs:5:13
    |
 LL |     let f = || x.len();
    |             -- - borrow occurs due to use in closure
@@ -11,7 +11,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
-  --> $DIR/closure-borrow-spans.rs:13:13
+  --> $DIR/closure-borrow-spans.rs:11:13
    |
 LL |     let f = || x;
    |             -- - first borrow occurs due to use of `x` in closure
@@ -23,7 +23,7 @@ LL |     f.use_ref();
    |     - immutable borrow later used here
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/closure-borrow-spans.rs:21:16
+  --> $DIR/closure-borrow-spans.rs:19:16
    |
 LL |         f = || x;
    |             -- ^ borrowed value does not live long enough
@@ -35,7 +35,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/closure-borrow-spans.rs:28:5
+  --> $DIR/closure-borrow-spans.rs:26:5
    |
 LL |     let f = || x;
    |             -- - borrow occurs due to use in closure
@@ -47,7 +47,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0503]: cannot use `x` because it was mutably borrowed
-  --> $DIR/closure-borrow-spans.rs:34:13
+  --> $DIR/closure-borrow-spans.rs:32:13
    |
 LL |     let f = || x = 0;
    |             -- - borrow occurs due to use of `x` in closure
@@ -59,7 +59,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
-  --> $DIR/closure-borrow-spans.rs:40:13
+  --> $DIR/closure-borrow-spans.rs:38:13
    |
 LL |     let f = || x = 0;
    |             -- - first borrow occurs due to use of `x` in closure
@@ -71,7 +71,7 @@ LL |     f.use_ref();
    |     - mutable borrow later used here
 
 error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/closure-borrow-spans.rs:46:13
+  --> $DIR/closure-borrow-spans.rs:44:13
    |
 LL |     let f = || x = 0;
    |             -- - first borrow occurs due to use of `x` in closure
@@ -83,7 +83,7 @@ LL |     f.use_ref();
    |     - first borrow later used here
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/closure-borrow-spans.rs:54:16
+  --> $DIR/closure-borrow-spans.rs:52:16
    |
 LL |         f = || x = 0;
    |             -- ^ borrowed value does not live long enough
@@ -95,7 +95,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/closure-borrow-spans.rs:61:5
+  --> $DIR/closure-borrow-spans.rs:59:5
    |
 LL |     let f = || x = 0;
    |             -- - borrow occurs due to use in closure
@@ -107,7 +107,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0505]: cannot move out of `x` because it is borrowed
-  --> $DIR/closure-borrow-spans.rs:67:13
+  --> $DIR/closure-borrow-spans.rs:65:13
    |
 LL |     let f = || *x = 0;
    |             --  - borrow occurs due to use in closure
@@ -119,7 +119,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access
-  --> $DIR/closure-borrow-spans.rs:73:13
+  --> $DIR/closure-borrow-spans.rs:71:13
    |
 LL |     let f = || *x = 0;
    |             --  - first borrow occurs due to use of `x` in closure
@@ -131,7 +131,7 @@ LL |     f.use_ref();
    |     - first borrow later used here
 
 error[E0501]: cannot borrow `x` as mutable because previous closure requires unique access
-  --> $DIR/closure-borrow-spans.rs:79:13
+  --> $DIR/closure-borrow-spans.rs:77:13
    |
 LL |     let f = || *x = 0;
    |             --  - first borrow occurs due to use of `x` in closure
@@ -143,7 +143,7 @@ LL |     f.use_ref();
    |     - first borrow later used here
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/closure-borrow-spans.rs:88:17
+  --> $DIR/closure-borrow-spans.rs:86:17
    |
 LL |         f = || *x = 0;
    |             --  ^ borrowed value does not live long enough
@@ -155,7 +155,7 @@ LL |     f.use_ref();
    |     - borrow later used here
 
 error[E0506]: cannot assign to `*x` because it is borrowed
-  --> $DIR/closure-borrow-spans.rs:95:5
+  --> $DIR/closure-borrow-spans.rs:93:5
    |
 LL |     let f = || *x = 0;
    |             --  - borrow occurs due to use in closure
index 3a01f86cad890692069d2c8da1cf20f82a282878..16d90b971745a70b86044dcdb7e4a6b0b6d84b65 100644 (file)
@@ -1,8 +1,5 @@
 // Some cases with closures that might be problems
 
-#![allow(unused)]
-#![feature(nll)]
-
 // Should have one error per assignment
 
 fn one_closure(x: i32) {
index fbd02bc8095a74dd5433dfa9894d99c5de73dc32..77f7d815eeb4c180122ccb2168ca6d81df092ce6 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/closure-captures.rs:10:5
+  --> $DIR/closure-captures.rs:7:5
    |
 LL | fn one_closure(x: i32) {
    |                - help: consider changing this to be mutable: `mut x`
@@ -8,7 +8,7 @@ LL |     x = 1;
    |     ^^^^^ cannot assign
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/closure-captures.rs:12:5
+  --> $DIR/closure-captures.rs:9:5
    |
 LL | fn one_closure(x: i32) {
    |                - help: consider changing this to be mutable: `mut x`
@@ -17,7 +17,7 @@ LL |     x = 1;
    |     ^^^^^ cannot assign
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/closure-captures.rs:18:9
+  --> $DIR/closure-captures.rs:15:9
    |
 LL | fn two_closures(x: i32) {
    |                 - help: consider changing this to be mutable: `mut x`
@@ -26,7 +26,7 @@ LL |         x = 1;
    |         ^^^^^ cannot assign
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/closure-captures.rs:22:9
+  --> $DIR/closure-captures.rs:19:9
    |
 LL | fn two_closures(x: i32) {
    |                 - help: consider changing this to be mutable: `mut x`
@@ -35,7 +35,7 @@ LL |         x = 1;
    |         ^^^^^ cannot assign
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/closure-captures.rs:30:9
+  --> $DIR/closure-captures.rs:27:9
    |
 LL |         ||
    |         ^^ cannot borrow as mutable
@@ -43,7 +43,7 @@ LL |          x = 1;}
    |          - mutable borrow occurs due to use of `x` in closure
    |
 help: consider changing this to accept closures that implement `FnMut`
-  --> $DIR/closure-captures.rs:29:12
+  --> $DIR/closure-captures.rs:26:12
    |
 LL |       fn_ref(|| {
    |  ____________^
@@ -52,7 +52,7 @@ LL | |          x = 1;}
    | |________________^
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/closure-captures.rs:34:9
+  --> $DIR/closure-captures.rs:31:9
    |
 LL |         ||
    |         ^^ cannot borrow as mutable
@@ -60,7 +60,7 @@ LL |     x = 1;});
    |     - mutable borrow occurs due to use of `x` in closure
    |
 help: consider changing this to accept closures that implement `FnMut`
-  --> $DIR/closure-captures.rs:33:12
+  --> $DIR/closure-captures.rs:30:12
    |
 LL |       fn_ref(move || {
    |  ____________^
@@ -69,7 +69,7 @@ LL | |     x = 1;});
    | |___________^
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/closure-captures.rs:42:10
+  --> $DIR/closure-captures.rs:39:10
    |
 LL | fn two_closures_ref(x: i32) {
    |                     - help: consider changing this to be mutable: `mut x`
@@ -78,7 +78,7 @@ LL |          x = 1;}
    |          ^^^^^ cannot assign
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/closure-captures.rs:41:9
+  --> $DIR/closure-captures.rs:38:9
    |
 LL |         ||
    |         ^^ cannot borrow as mutable
@@ -86,7 +86,7 @@ LL |          x = 1;}
    |          - mutable borrow occurs due to use of `x` in closure
    |
 help: consider changing this to accept closures that implement `FnMut`
-  --> $DIR/closure-captures.rs:40:12
+  --> $DIR/closure-captures.rs:37:12
    |
 LL |       fn_ref(|| {
    |  ____________^
@@ -95,7 +95,7 @@ LL | |          x = 1;}
    | |________________^
 
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/closure-captures.rs:46:5
+  --> $DIR/closure-captures.rs:43:5
    |
 LL | fn two_closures_ref(x: i32) {
    |                     - help: consider changing this to be mutable: `mut x`
@@ -104,7 +104,7 @@ LL |     x = 1;});
    |     ^^^^^ cannot assign
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/closure-captures.rs:45:9
+  --> $DIR/closure-captures.rs:42:9
    |
 LL |         ||
    |         ^^ cannot borrow as mutable
@@ -112,7 +112,7 @@ LL |     x = 1;});
    |     - mutable borrow occurs due to use of `x` in closure
    |
 help: consider changing this to accept closures that implement `FnMut`
-  --> $DIR/closure-captures.rs:44:12
+  --> $DIR/closure-captures.rs:41:12
    |
 LL |       fn_ref(move || {
    |  ____________^
@@ -121,7 +121,7 @@ LL | |     x = 1;});
    | |___________^
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/closure-captures.rs:51:9
+  --> $DIR/closure-captures.rs:48:9
    |
 LL |         ||
    |         ^^ cannot borrow as mutable
@@ -129,7 +129,7 @@ LL |         *x = 1;});
    |          - mutable borrow occurs due to use of `x` in closure
    |
 help: consider changing this to accept closures that implement `FnMut`
-  --> $DIR/closure-captures.rs:50:12
+  --> $DIR/closure-captures.rs:47:12
    |
 LL |       fn_ref(|| {
    |  ____________^
@@ -138,7 +138,7 @@ LL | |         *x = 1;});
    | |________________^
 
 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
-  --> $DIR/closure-captures.rs:54:9
+  --> $DIR/closure-captures.rs:51:9
    |
 LL |         ||
    |         ^^ cannot borrow as mutable
@@ -146,7 +146,7 @@ LL |         *x = 1;});
    |          - mutable borrow occurs due to use of `x` in closure
    |
 help: consider changing this to accept closures that implement `FnMut`
-  --> $DIR/closure-captures.rs:53:12
+  --> $DIR/closure-captures.rs:50:12
    |
 LL |       fn_ref(move || {
    |  ____________^
index ffbfa9f8ae4835cf328c5aacd7a4dc022678dfbb..bf2431870a942cd27f31421fa0ef5616ea783dac 100644 (file)
@@ -1,7 +1,5 @@
 // check that moves due to a closure capture give a special note
 
-#![feature(nll)]
-
 fn move_after_move(x: String) {
     || x;
     let y = x; //~ ERROR
index 1cc4ca85b9ff340dc60beb50138f556e0293a5e2..972dbc6a61d089d518bfc97791efd2ce2044a953 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/closure-move-spans.rs:7:13
+  --> $DIR/closure-move-spans.rs:5:13
    |
 LL | fn move_after_move(x: String) {
    |                    - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
@@ -11,7 +11,7 @@ LL |     let y = x;
    |             ^ value used here after move
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/closure-move-spans.rs:12:13
+  --> $DIR/closure-move-spans.rs:10:13
    |
 LL | fn borrow_after_move(x: String) {
    |                      - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
@@ -23,7 +23,7 @@ LL |     let y = &x;
    |             ^^ value borrowed here after move
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/closure-move-spans.rs:17:13
+  --> $DIR/closure-move-spans.rs:15:13
    |
 LL | fn borrow_mut_after_move(mut x: String) {
    |                          ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
index 71d5d4053ee252cbb89de224860fef2a146cdfc6..8ed6554877eaea039a9c22c7e334a1b519ce032d 100644 (file)
@@ -1,7 +1,3 @@
-// revisions: migrate nll
-//[migrate]compile-flags: -Z borrowck=migrate
-#![cfg_attr(nll, feature(nll))]
-
 // compile-pass
 
 // Test that we propagate region relations from closures precisely when there is
index dbc659b4aeef94c145180dcea3ff23a7148d7349..a9d2a07715d49532a5ad4da67f3d673169555992 100644 (file)
@@ -1,8 +1,6 @@
 // Test that we propagate *all* requirements to the caller, not just the first
 // one.
 
-#![feature(nll)]
-
 fn once<S, T, U, F: FnOnce(S, T) -> U>(f: F, s: S, t: T) -> U {
     f(s, t)
 }
index 332724daaa8bd4cc3c3e4fc1bd8d9c6ec31178db..2fec9bc62d1c7ecc9ba8374943141d0c4cd65c2f 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `local_arr` does not live long enough
-  --> $DIR/propagate-multiple-requirements.rs:17:14
+  --> $DIR/propagate-multiple-requirements.rs:15:14
    |
 LL |     let mut out: &mut &'static [i32] = &mut (&[1] as _);
    |                  ------------------- type annotation requires that `local_arr` is borrowed for `'static`
index c7cd519cffbceada5cb1d1022c065ea2c9c2178e..6768250dcbc0aa447a9aaa7b686b42c343e80c79 100644 (file)
@@ -1,7 +1,5 @@
 // check that liveness due to a closure capture gives a special note
 
-#![feature(nll)]
-
 fn use_as_borrow_capture(mut x: i32) {
     let y = &x;
     x = 0; //~ ERROR
index 20696da3b8e821c1b21140dc99fe690319f8374a..ec7e0f308557db1530cce191ae9a46bd8fe1af0e 100644 (file)
@@ -1,5 +1,5 @@
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/closure-use-spans.rs:7:5
+  --> $DIR/closure-use-spans.rs:5:5
    |
 LL |     let y = &x;
    |             -- borrow of `x` occurs here
@@ -9,7 +9,7 @@ LL |     || *y;
    |         - borrow later captured here by closure
 
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/closure-use-spans.rs:13:5
+  --> $DIR/closure-use-spans.rs:11:5
    |
 LL |     let y = &mut x;
    |             ------ borrow of `x` occurs here
@@ -19,7 +19,7 @@ LL |     || *y = 1;
    |         - borrow later captured here by closure
 
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/closure-use-spans.rs:19:5
+  --> $DIR/closure-use-spans.rs:17:5
    |
 LL |     let y = &x;
    |             -- borrow of `x` occurs here
index d2afa564734c8b6bdf5c847311c6de366b8abd8d..491c186ecb5a018b54fffd2704f93ead8c5109b9 100644 (file)
@@ -1,8 +1,6 @@
 // Test messages where a closure capture conflicts with itself because it's in
 // a loop.
 
-#![feature(nll)]
-
 fn repreated_move(x: String) {
     for i in 0..10 {
         || x; //~ ERROR
index 692eaea92b83bc6c641e07eedf8c98ce11bc52ef..7603f9650b54a3ab80a1996a46d5f803331c6bab 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/closures-in-loops.rs:8:9
+  --> $DIR/closures-in-loops.rs:6:9
    |
 LL | fn repreated_move(x: String) {
    |                   - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
@@ -10,7 +10,7 @@ LL |         || x;
    |         value moved into closure here, in previous iteration of loop
 
 error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/closures-in-loops.rs:15:16
+  --> $DIR/closures-in-loops.rs:13:16
    |
 LL |         v.push(|| x = String::new());
    |                ^^ - borrows occur due to use of `x` in closure
@@ -18,7 +18,7 @@ LL |         v.push(|| x = String::new());
    |                mutable borrow starts here in previous iteration of loop
 
 error[E0524]: two closures require unique access to `x` at the same time
-  --> $DIR/closures-in-loops.rs:22:16
+  --> $DIR/closures-in-loops.rs:20:16
    |
 LL |         v.push(|| *x = String::new());
    |                ^^  - borrows occur due to use of `x` in closure
index 4dd01410c5e4db2fd39af58faa29d22ededcaf04..dde0ef7a5bb832fa55c00d8880e155ae0870bb6c 100644 (file)
@@ -1,6 +1,5 @@
 // Regression test for issue #47053
 
-#![feature(nll)]
 #![feature(thread_local)]
 
 #[thread_local]
index 16a6e59e4da3a38a3196f1e24fe7d8f8f14e49cb..8afb42d66a61a511e511b1a7ba5cff29e87b3e10 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to immutable static item `FOO`
-  --> $DIR/constant-thread-locals-issue-47053.rs:10:5
+  --> $DIR/constant-thread-locals-issue-47053.rs:9:5
    |
 LL |     FOO = 6;
    |     ^^^^^^^ cannot assign
index 38bdb7dd270f8a3baa9de2ee6ef0072f9f7d178b..f7243294669a62134f356638e1165a45a9978885 100644 (file)
@@ -1,6 +1,5 @@
 // Regression test for #46314
 
-#![feature(nll)]
 #![feature(decl_macro)]
 
 struct NonCopy(String);
index 9232ff52393e134b1ec512e80a11d62b91f5bf99..7948485bd6866d6c5db220769a0b2ea14530addc 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `wrapper.inner`
-  --> $DIR/decl-macro-illegal-copy.rs:22:9
+  --> $DIR/decl-macro-illegal-copy.rs:21:9
    |
 LL |     $wrapper.inner
    |     -------------- value moved here
index 881e202acf8d3e72e1d20f5c2b5c37741a06ca38..e75362750645ceb1a3e2899ea6203a86dc4c216e 100644 (file)
@@ -15,7 +15,6 @@
 
 // compile-pass
 
-#![feature(nll)]
 #![feature(box_patterns)]
 
 struct Root {
index f5738968746ee66a5687df782cf751fda6fd3ea7..1fe4fffa324a63617a82590c90e642187ba58606 100644 (file)
@@ -1,6 +1,4 @@
-// (this works, but only in NLL)
 // compile-pass
-#![feature(nll)]
 
 use std::collections::HashMap;
 use std::sync::Mutex;
index 2add951b70bc0a6f867a6d13272dbd50e5aa157c..80a85293e5a5cc165a303ec438bf4f9808d8cf0b 100644 (file)
@@ -1,6 +1,4 @@
-// (this works, but only in NLL)
 // compile-pass
-#![feature(nll)]
 
 fn from_stdin(min: u64) -> Vec<u64> {
     use std::io::BufRead;
index abafd330573ee8b8dba3e5f551e35d0691271b0e..906ea32b9c42d62fe8191c9fd0da05df89faaf59 100644 (file)
@@ -8,8 +8,6 @@
 // meant to compile and run successfully once rust-lang/rust#54987 is
 // implemented.
 
-#![feature(nll)]
-
 struct D {
     x: u32,
     s: S,
index 862432a5bc6af671152e812bc502c7d4087b2161..153d9bdf3215d01b70aa6901dea5aedadcfc19bf 100644 (file)
@@ -1,17 +1,17 @@
 error[E0381]: assign of possibly uninitialized variable: `d`
-  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:30:5
+  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:28:5
    |
 LL |     d.x = 10;
    |     ^^^^^^^^ use of possibly uninitialized `d`
 
 error[E0381]: assign of possibly uninitialized variable: `d`
-  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:36:5
+  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:34:5
    |
 LL |     d.x = 10;
    |     ^^^^^^^^ use of possibly uninitialized `d`
 
 error[E0382]: assign of moved value: `d`
-  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:43:5
+  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:41:5
    |
 LL |     let mut d = D { x: 0, s: S{ y: 0, z: 0 } };
    |         ----- move occurs because `d` has type `D`, which does not implement the `Copy` trait
@@ -21,19 +21,19 @@ LL |     d.x = 10;
    |     ^^^^^^^^ value assigned here after move
 
 error[E0381]: assign to part of possibly uninitialized variable: `d`
-  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:49:5
+  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:47:5
    |
 LL |     d.s.y = 20;
    |     ^^^^^^^^^^ use of possibly uninitialized `d.s`
 
 error[E0381]: assign to part of possibly uninitialized variable: `d`
-  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:55:5
+  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:53:5
    |
 LL |     d.s.y = 20;
    |     ^^^^^^^^^^ use of possibly uninitialized `d.s`
 
 error[E0382]: assign to part of moved value: `d`
-  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:62:5
+  --> $DIR/issue-21232-partial-init-and-erroneous-use.rs:60:5
    |
 LL |     let mut d = D { x: 0, s: S{ y: 0, z: 0} };
    |         ----- move occurs because `d` has type `D`, which does not implement the `Copy` trait
index 2c547fb7c7da73786fba5938dc9449ba1c6b7a0e..6357c3ccef1f8d515b45d30a2ed42217e31c2da3 100644 (file)
@@ -3,8 +3,6 @@
 
 // compile-pass
 
-#![feature(nll)]
-
 fn main() {
     let _s = construct().borrow().consume_borrowed();
 }
index 88e49bf8df70d857be1dd993b0d29f469c6be246..27e519005f62b473c49081e7fd9bcd8886f6c036 100644 (file)
@@ -2,8 +2,6 @@
 
 // compile-pass
 
-#![feature(nll)]
-
 use std::ops::{Deref, DerefMut};
 
 fn box_two_field(v: &mut Box<(i32, i32)>) {
index a114d7092ecf97a39010fea0427eb2e7e998e3d3..7e0ffd6cf36449353da44eda8d716969035062dc 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(nll)]
 // compile-pass
 
 // rust-lang/rust#32382: Borrow checker used to complain about
index c5bae7a12d7e7b25597eeaa9f9800185ddc23975..c50473511f1168799d583879347b0c57c62411a1 100644 (file)
@@ -1,7 +1,5 @@
 // compile-pass
 
-#![feature(nll)]
-
 use std::borrow::Cow;
 
 #[derive(Clone, Debug)]
index 690f6f269ebcdb41e143fc321e41970d72d6fb96..8c0c356e967219ac62ab7c41f096d7845ecc1662 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Foo;
 
 impl Foo {
index 7b02b905303f1c46d3772d6d0310f301f1c6a3a9..397909a4366100bb26c0243782091f04cb44522b 100644 (file)
@@ -1,5 +1,5 @@
 error[E0499]: cannot borrow `**other` as mutable more than once at a time
-  --> $DIR/issue-46589.rs:19:21
+  --> $DIR/issue-46589.rs:17:21
    |
 LL |         *other = match (*other).get_self() {
    |                        -------- first mutable borrow occurs here
index 1add2c334dae0786538d5380693c418e9a816fbb..3f8e0f5ad3d7a8859b3030e2bf27689efe481da1 100644 (file)
@@ -1,8 +1,5 @@
 // compile-pass
 
-#![allow(warnings)]
-#![feature(nll)]
-
 struct LoadedObject {
     bodies: Vec<Body>,
     color: Color,
index df47baa3c17f0ad767b9a844772dc7be2bac7823..207af380e62ddd58406a2b6391ada8725c30a968 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(nll)]
 struct FancyNum {
     num: u8,
 }
index a5f5bf6ee2fdd0ab988dd7eb2768902648a272b6..d4064b3f50a341a9056c7509b6f1cb7190c38b4c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `fancy_ref.num` which is behind a `&` reference
-  --> $DIR/issue-47388.rs:9:5
+  --> $DIR/issue-47388.rs:8:5
    |
 LL |     let fancy_ref = &(&mut fancy);
    |                     ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)`
index 67150b46c359964951268cc928d5f42bf67cf427..72ee7f88650e1b757c48594df8428f9ff28ac1ac 100644 (file)
@@ -2,8 +2,6 @@
 // causing region relations not to be enforced at all the places where
 // they have to be enforced.
 
-#![feature(nll)]
-
 struct Foo<'a>(&'a ());
 trait Bar {
     type Assoc;
index d23cee3fc7c4b69378321a2386125f8c712a5616..0b1247d60ec67ce9658c064e077482e667cf4b84 100644 (file)
@@ -1,5 +1,5 @@
 error[E0515]: cannot return reference to local variable `local`
-  --> $DIR/issue-47470.rs:17:9
+  --> $DIR/issue-47470.rs:15:9
    |
 LL |         &local
    |         ^^^^^^ returns a reference to data owned by the current function
index c69bd3dbe90a5ae6e2d5d6a6fc0df6a1fa8f5afe..47426cdfa57ef7a2745d815b42a5c748084d9c4e 100644 (file)
@@ -1,8 +1,6 @@
 // run-pass
 // revisions: lxl nll
 
-#![cfg_attr(nll, feature(nll))]
-
 struct Foo {
     x: u32
 }
index ececd6fccd84bc75dedc371a24f1e7ca864eff3a..16e29ab2a8ad2f6823d3c8b9ad3a65702b8abdbe 100644 (file)
@@ -1,7 +1,5 @@
 // Regression test for #48697
 
-#![feature(nll)]
-
 fn foo(x: &i32) -> &i32 {
     let z = 4;
     let f = &|y| y;
index 73832fd57879c47073cd6a77743fdb0f36fbc524..f0c29b72b4298c23b5a14726e0bdeaba17d36983 100644 (file)
@@ -1,5 +1,5 @@
 error[E0515]: cannot return value referencing local variable `z`
-  --> $DIR/issue-48697.rs:9:5
+  --> $DIR/issue-48697.rs:7:5
    |
 LL |     let k = f(&z);
    |               -- `z` is borrowed here
index d963a620c9ac76aed0ae71626667dc3eb1210f6a..ec992959a66ca7bb3975426e47bd30fdbd96631c 100644 (file)
@@ -3,12 +3,8 @@
 // bounds derived from `Sized` requirements” that checks that the fixed compiler
 // accepts this code fragment with both AST and MIR borrow checkers.
 //
-// revisions: migrate nll
-//
 // compile-pass
 
-#![cfg_attr(nll, feature(nll))]
-
 struct Qey<Q: ?Sized>(Q);
 
 fn main() {}
diff --git a/src/test/ui/nll/issue-50716.nll.stderr b/src/test/ui/nll/issue-50716.nll.stderr
new file mode 100644 (file)
index 0000000..38dd1b5
--- /dev/null
@@ -0,0 +1,11 @@
+error: lifetime may not live long enough
+  --> $DIR/issue-50716.rs:14:14
+   |
+LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
+   |        -- lifetime `'a` defined here
+...
+LL |     let _x = *s;
+   |              ^^ proving this value is `Sized` requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index ce4bee366567c50c07560ba8944358895b83ee08..c2fc345fa2ba2e6e13ff41d509055b15fcc4613f 100644 (file)
@@ -2,8 +2,6 @@
 // Regression test for the issue #50716: NLL ignores lifetimes bounds
 // derived from `Sized` requirements
 
-#![feature(nll)]
-
 trait A {
     type X: ?Sized;
 }
index 7e5ffb515011bc6fae78e685230201d84afde469..b19e3a9dfb345604f9a107b444d2d4b10c3432d0 100644 (file)
@@ -1,11 +1,18 @@
-error: lifetime may not live long enough
-  --> $DIR/issue-50716.rs:16:14
+error[E0308]: mismatched types
+  --> $DIR/issue-50716.rs:14:9
    |
-LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
-   |        -- lifetime `'a` defined here
-...
 LL |     let _x = *s;
-   |              ^^ proving this value is `Sized` requires that `'a` must outlive `'static`
+   |         ^^ lifetime mismatch
+   |
+   = note: expected type `std::marker::Sized`
+              found type `std::marker::Sized`
+note: the lifetime 'a as defined on the function body at 9:8...
+  --> $DIR/issue-50716.rs:9:8
+   |
+LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
+   |        ^^
+   = note: ...does not necessarily outlive the static lifetime
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0308`.
index 6704b64869914afd369d7d25b00b11328c80b53f..747bfe3a8a575ae6bcabde2f48e1703afc357d8f 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Struct;
 
 impl Struct {
index e80cd873d5acaf821b0e8bf7961aff150e730c8a..e226de15dc2f0b156013a0be8c77c41e77187015 100644 (file)
@@ -1,5 +1,5 @@
 warning: function cannot return without recursing
-  --> $DIR/issue-51191.rs:6:5
+  --> $DIR/issue-51191.rs:4:5
    |
 LL |     fn bar(self: &mut Self) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
@@ -11,7 +11,7 @@ LL |         (&mut self).bar();
    = help: a `loop` may express intention better if this is on purpose
 
 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
-  --> $DIR/issue-51191.rs:8:9
+  --> $DIR/issue-51191.rs:6:9
    |
 LL |         (&mut self).bar();
    |         ^^^^^^^^^^^
@@ -20,7 +20,7 @@ LL |         (&mut self).bar();
    |         try removing `&mut` here
 
 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
-  --> $DIR/issue-51191.rs:13:9
+  --> $DIR/issue-51191.rs:11:9
    |
 LL |     fn imm(self) {
    |            ---- help: consider changing this to be mutable: `mut self`
@@ -28,19 +28,19 @@ LL |         (&mut self).bar();
    |         ^^^^^^^^^^^ cannot borrow as mutable
 
 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
-  --> $DIR/issue-51191.rs:22:9
+  --> $DIR/issue-51191.rs:20:9
    |
 LL |         (&mut self).bar();
    |         ^^^^^^^^^^^ cannot borrow as mutable
 
 error[E0596]: cannot borrow data in a `&` reference as mutable
-  --> $DIR/issue-51191.rs:22:9
+  --> $DIR/issue-51191.rs:20:9
    |
 LL |         (&mut self).bar();
    |         ^^^^^^^^^^^ cannot borrow as mutable
 
 error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
-  --> $DIR/issue-51191.rs:28:9
+  --> $DIR/issue-51191.rs:26:9
    |
 LL |         (&mut self).bar();
    |         ^^^^^^^^^^^
index aaf98ddfa27775be1a176ea73970118a2a5e3d9c..743415d58afadb3b01e53473bdf25210cf1742c7 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn main() {
     let ref my_ref @ _ = 0;
     *my_ref = 0;
index 6b543389af508bb4f68428fcea6455bb5984fa9b..8a7e71e0326a09540044b5757c38e898eae1cb3a 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference
-  --> $DIR/issue-51244.rs:5:5
+  --> $DIR/issue-51244.rs:3:5
    |
 LL |     let ref my_ref @ _ = 0;
    |         -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _`
index c14146a3de2a1d0b5864de21aa463d0add02e228..12d0449abb19be4c1bc7755ab3f20b859f481215 100644 (file)
@@ -1,7 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(nll)]
-
 struct Bar;
 
 impl Bar {
index 0be181745fde208c4ade7de5bbf3f9ce78d66a1d..420c94f8e1bd292b1f6806719aa475c5825eabe4 100644 (file)
@@ -1,5 +1,5 @@
 error[E0502]: cannot borrow `self.thing` as mutable because it is also borrowed as immutable
-  --> $DIR/issue-51268.rs:18:9
+  --> $DIR/issue-51268.rs:16:9
    |
 LL |           self.thing.bar(|| {
    |           ^          --- -- immutable borrow occurs here
index 939993f154f8f8be0453ccbb7bca942947724236..b45477c7fb10deb96bda96da36d6a3c41c7082bd 100644 (file)
@@ -8,8 +8,6 @@
 //
 // compile-pass
 
-#![feature(nll)]
-
 fn creash<'a>() {
     let x: &'a () = &();
 }
index 7e2e6e0a16cc0c836a52d4412d014d88f0751adf..691760eb91e52fb12816cf537af927283752867e 100644 (file)
@@ -1,6 +1,3 @@
-#![allow(warnings)]
-#![feature(nll)]
-
 fn main() {
     let range = 0..1;
     let r = range;
index a84a236ca77722995b7c5760985dc6f51d0d1236..e591ca08290ebf74a7c8e2689009e463b2306bcf 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `range`
-  --> $DIR/issue-51512.rs:7:13
+  --> $DIR/issue-51512.rs:4:13
    |
 LL |     let range = 0..1;
    |         ----- move occurs because `range` has type `std::ops::Range<i32>`, which does not implement the `Copy` trait
index eaa809d2b37069da325023851cbc788138b237aa..58416c31edde75d92e67597dead873540270d83c 100644 (file)
@@ -4,7 +4,6 @@
 // of the fact that the type implements Drop.
 
 #![feature(nll)]
-#![allow(dead_code)]
 
 pub struct S<'a> { url: &'a mut String }
 
index e8741036e1d938dd51468c0c46916dad33c1c898..34259d06d38363e43ff342595f8956e65d5974b4 100644 (file)
@@ -1,5 +1,5 @@
 error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:14:5
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:13:5
    |
 LL | fn finish_1(s: S) -> &mut String {
    |             - has type `S<'1>`
@@ -9,7 +9,7 @@ LL | }
    | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
 
 error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:19:13
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:18:13
    |
 LL | fn finish_2(s: S) -> &mut String {
    |             - has type `S<'1>`
@@ -19,7 +19,7 @@ LL | }
    | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
 
 error[E0713]: borrow may still be in use when destructor runs
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:24:21
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:23:21
    |
 LL | fn finish_3(s: S) -> &mut String {
    |             - has type `S<'1>`
@@ -29,7 +29,7 @@ LL | }
    | - here, drop of `s` needs exclusive access to `*s.url`, because the type `S<'_>` implements the `Drop` trait
 
 error[E0509]: cannot move out of type `S<'_>`, which implements the `Drop` trait
-  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:29:13
+  --> $DIR/issue-52059-report-when-borrow-and-drop-conflict.rs:28:13
    |
 LL |     let p = s.url; p
    |             ^^^^^
index ebe442adbd945f1a88968849467553ac8ddfd67c..4b8e6c680753083bbed11e36234a7fe983e101fe 100644 (file)
@@ -1,6 +1,3 @@
-#![feature(nll)]
-#![allow(unused_variables)]
-
 // Regression test for #52078: we were failing to infer a relationship
 // between `'a` and `'b` below due to inference variables introduced
 // during the normalization process.
index 78765283ec29e786c9f3d962248ca3e2729847fe..0414428e48150ca498a9baca8a23e96823ecebb0 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 use std::rc::Rc;
 use std::sync::Arc;
 
index ed4171ff14261e4356de2ff27a5a91bc73f2c205..da453fb1f921fb69bd70a036ae0d934148b3b4ee 100644 (file)
@@ -1,11 +1,11 @@
 error[E0507]: cannot move out of an `Rc`
-  --> $DIR/issue-52086.rs:10:10
+  --> $DIR/issue-52086.rs:8:10
    |
 LL |     drop(x.field);
    |          ^^^^^^^ cannot move out of an `Rc`
 
 error[E0507]: cannot move out of an `Arc`
-  --> $DIR/issue-52086.rs:14:10
+  --> $DIR/issue-52086.rs:12:10
    |
 LL |     drop(y.field);
    |          ^^^^^^^ cannot move out of an `Arc`
index 795f4f426ffffedc82c3fac7b762471f32a710fc..0d7ee0376924dc618028d5db3d1b02375ce180cd 100644 (file)
@@ -1,6 +1,3 @@
-//
-
-#![allow(warnings)]
 #![feature(nll)]
 
 trait Bazinga {}
index 8638fe2576980f34d9329a341faffff043b9aa3b..590963ded78bcfeb5eaca7206a0153c7c4314844 100644 (file)
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/issue-52113.rs:37:5
+  --> $DIR/issue-52113.rs:34:5
    |
 LL | fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> impl Bazinga + 'b {
    |                --  -- lifetime `'b` defined here
index 7ab3593c89f7efd7d1d8a808b4802b7f6b644368..d9ea3ae42c49e8004ef780bbc9bbc26af80d36d9 100644 (file)
@@ -1,6 +1,3 @@
-#![feature(nll)]
-#![allow(warnings)]
-
 struct Test;
 
 impl Test {
index 7d82f5e710fb17e41644c43f52bbb34eea3ef8b4..743179f05c1afb7c0c4f9cb1ec4d66309620c143 100644 (file)
@@ -1,17 +1,17 @@
 error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-52534-1.rs:9:9
+  --> $DIR/issue-52534-1.rs:6:9
    |
 LL |         &x
    |         ^^ returns a reference to data owned by the current function
 
 error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-52534-1.rs:16:5
+  --> $DIR/issue-52534-1.rs:13:5
    |
 LL |     &x
    |     ^^ returns a reference to data owned by the current function
 
 error[E0515]: cannot return value referencing local variable `x`
-  --> $DIR/issue-52534-1.rs:22:5
+  --> $DIR/issue-52534-1.rs:19:5
    |
 LL |     &&x
    |     ^--
@@ -20,7 +20,7 @@ LL |     &&x
    |     returns a value referencing data owned by the current function
 
 error[E0515]: cannot return reference to temporary value
-  --> $DIR/issue-52534-1.rs:22:5
+  --> $DIR/issue-52534-1.rs:19:5
    |
 LL |     &&x
    |     ^--
@@ -29,25 +29,25 @@ LL |     &&x
    |     returns a reference to data owned by the current function
 
 error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-52534-1.rs:29:5
+  --> $DIR/issue-52534-1.rs:26:5
    |
 LL |     &x
    |     ^^ returns a reference to data owned by the current function
 
 error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-52534-1.rs:35:5
+  --> $DIR/issue-52534-1.rs:32:5
    |
 LL |     &x
    |     ^^ returns a reference to data owned by the current function
 
 error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-52534-1.rs:41:5
+  --> $DIR/issue-52534-1.rs:38:5
    |
 LL |     &x
    |     ^^ returns a reference to data owned by the current function
 
 error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-52534-1.rs:47:5
+  --> $DIR/issue-52534-1.rs:44:5
    |
 LL |     &x
    |     ^^ returns a reference to data owned by the current function
index 6e84869dd6d3b00a9d2cb6678aed0222116fdd62..e416264ed09fd889f2a937d4353fc97c5c0fa094 100644 (file)
@@ -1,6 +1,3 @@
-#![feature(nll)]
-#![allow(warnings)]
-
 fn foo(x: &u32) -> &u32 {
     let y;
 
index f98deaea7183e8e95db10881a5c5ab88899bec94..dd8a87f7e29aa8e152d72efbacc4d327c4553eae 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/issue-52534-2.rs:9:9
+  --> $DIR/issue-52534-2.rs:6:9
    |
 LL |         y = &x
    |         ^^^^^^ borrowed value does not live long enough
index 1394560df19ba295fbdfb6f15fb1c9cd6d5ad579..559d4c8591b34ece8a48031f9e98db5a202939de 100644 (file)
@@ -1,6 +1,3 @@
-#![feature(nll)]
-#![allow(warnings)]
-
 fn foo(_: impl FnOnce(&u32) -> &u32) {
 }
 
index 9ac79eda1614ccedff73396e849ad5f2aa05fea7..b2b727fd438935f0c80be656aa1d9149b54b23ae 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/issue-52534.rs:12:14
+  --> $DIR/issue-52534.rs:9:14
    |
 LL |     foo(|a| &x)
    |          -   ^ `x` would have to be valid for `'0`...
@@ -13,7 +13,7 @@ LL | }
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#dangling-references>
 
 error[E0597]: `y` does not live long enough
-  --> $DIR/issue-52534.rs:18:26
+  --> $DIR/issue-52534.rs:15:26
    |
 LL |     baz(|first, second| &y)
    |          -----           ^ `y` would have to be valid for `'0`...
index 3e57d26745a95550b73d87b74dfb8f67cd51db00..24a4267f653f47b86ea4b69777251bb6f4f15353 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn expect_fn<F>(f: F) where F : Fn() {
     f();
 }
index 0162c6bcbd1ecc9b17158d6f39c0826fb44a0d56..8958bdf4c2a8d7779e3a819c6678e8348a98e948 100644 (file)
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/issue-52663-span-decl-captured-variable.rs:10:26
+  --> $DIR/issue-52663-span-decl-captured-variable.rs:8:26
    |
 LL |        let x = (vec![22], vec![44]);
    |            - captured outer variable
index 121c3ef4e610981e2d9a9ac8653419b4d0e7a9b0..e8e571aadc3680de679abe85fe1dc0319fd81427 100644 (file)
@@ -1,5 +1,4 @@
 #![feature(box_syntax)]
-#![feature(nll)]
 
 trait Foo { fn get(&self); }
 
index b9437d88ff6742bcda7475662e1b575a35a02939..9262117f397553efdae9e8d3539dcc52fd5fecff 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `tmp0` does not live long enough
-  --> $DIR/issue-52663-trait-object.rs:13:20
+  --> $DIR/issue-52663-trait-object.rs:12:20
    |
 LL |         let tmp1 = &tmp0;
    |                    ^^^^^ borrowed value does not live long enough
index 6027e988141280c46c64692ceabf713e82926c1c..e33528ac59e68293b8110f65dd93795be2357eee 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct A {
     b: B,
 }
index f51768c3859e4f3244ed795bdb74e56f9153d309..db53e444b9e4a60dca5232390e5fad4fc2c9f309 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: borrow of moved value: `a.b`
-  --> $DIR/issue-52669.rs:15:5
+  --> $DIR/issue-52669.rs:13:5
    |
 LL | fn bar(mut a: A) -> B {
    |        ----- move occurs because `a` has type `A`, which does not implement the `Copy` trait
diff --git a/src/test/ui/nll/issue-52742.nll.stderr b/src/test/ui/nll/issue-52742.nll.stderr
new file mode 100644 (file)
index 0000000..e8b7b33
--- /dev/null
@@ -0,0 +1,12 @@
+error: lifetime may not live long enough
+  --> $DIR/issue-52742.rs:14:9
+   |
+LL |     fn take_bar(&mut self, b: Bar<'_>) {
+   |                 ---------         -- let's call this `'1`
+   |                 |
+   |                 has type `&mut Foo<'_, '2>`
+LL |         self.y = b.z
+   |         ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
+
+error: aborting due to previous error
+
index 150e67fe094818eecfe00c02a1115de7aeafe340..db9ddfff285b3c23776dcceba9fb5a5652ee4b45 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(nll)]
 #![feature(in_band_lifetimes)]
 
 struct Foo<'a, 'b> {
@@ -13,7 +12,7 @@ struct Bar<'b> {
 impl Foo<'_, '_> {
     fn take_bar(&mut self, b: Bar<'_>) {
         self.y = b.z
-        //~^ ERROR lifetime may not live long enough
+        //~^ ERROR
     }
 }
 
index 6b25296c4bda1588d0e30793ad9d672a903629d8..b982915800294ab0ddf41009cbce354d0aac4ad8 100644 (file)
@@ -1,12 +1,22 @@
-error: lifetime may not live long enough
-  --> $DIR/issue-52742.rs:15:9
+error[E0312]: lifetime of reference outlives lifetime of borrowed content...
+  --> $DIR/issue-52742.rs:14:18
    |
-LL |     fn take_bar(&mut self, b: Bar<'_>) {
-   |                 ---------         -- let's call this `'1`
-   |                 |
-   |                 has type `&mut Foo<'_, '2>`
 LL |         self.y = b.z
-   |         ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
+   |                  ^^^
+   |
+note: ...the reference is valid for the lifetime '_ as defined on the impl at 12:10...
+  --> $DIR/issue-52742.rs:12:10
+   |
+LL | impl Foo<'_, '_> {
+   |          ^^
+note: ...but the borrowed content is only valid for the anonymous lifetime #2 defined on the method body at 13:5
+  --> $DIR/issue-52742.rs:13:5
+   |
+LL | /     fn take_bar(&mut self, b: Bar<'_>) {
+LL | |         self.y = b.z
+LL | |
+LL | |     }
+   | |_____^
 
 error: aborting due to previous error
 
index 97e05c8810d09bee86902c71c73c7d134bedc9d7..7a47a77f6bb4ccb24dce60261dd8aa0674d01038 100644 (file)
@@ -1,7 +1,5 @@
 // compile-pass
 
-#![feature(nll)]
-
 use std::ops::Deref;
 
 pub struct TypeFieldIterator<'a, T: 'a> {
index d0baffa2702c3ccd71dddb1f33036e4c5429a431..cea458dcb65b92460b2ece1f38f46d9728a87600 100644 (file)
@@ -8,10 +8,6 @@
 //
 // compile-pass
 
-#![feature(nll)]
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-
 use std::cell::{RefCell, Ref};
 
 trait AnyVec<'a> {
index 9b3eb7f05ded4467965b36602cc0df1d71a4efd9..c7b6ac592483799312a704220611925a55414554 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // run-pass
 
 struct Slice(&'static [&'static [u8]]);
index b900acfa1599ef7d078ef8ef8f91724c92ec7790..521d4d33d8633f8a5a68ebbb9cc7e2578ab17d72 100644 (file)
@@ -1,7 +1,5 @@
 // compile-pass
 
-#![feature(nll)]
-#![allow(unreachable_code)]
 #![deny(unused_mut)]
 
 pub fn foo() {
diff --git a/src/test/ui/nll/issue-55394.nll.stderr b/src/test/ui/nll/issue-55394.nll.stderr
new file mode 100644 (file)
index 0000000..d072304
--- /dev/null
@@ -0,0 +1,12 @@
+error: lifetime may not live long enough
+  --> $DIR/issue-55394.rs:9:9
+   |
+LL |     fn new(bar: &mut Bar) -> Self {
+   |                 -            ---- return type is Foo<'2>
+   |                 |
+   |                 let's call the lifetime of this reference `'1`
+LL |         Foo { bar }
+   |         ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
+
+error: aborting due to previous error
+
index deb1034525edb6622bb754018c849764ef4db19d..f813d1c915cf62fe97d6dbb68175844f4cbf1117 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Bar;
 
 struct Foo<'s> {
@@ -8,7 +6,7 @@ struct Foo<'s> {
 
 impl Foo<'_> {
     fn new(bar: &mut Bar) -> Self {
-        Foo { bar } //~ERROR lifetime may not live long enough
+        Foo { bar } //~ERROR
     }
 }
 
index e9a70fd6b161741f99365171ad913388c307c4d9..ffb94ed7dd7c0eab3ee8a3bbe82708c546aacdaa 100644 (file)
@@ -1,12 +1,29 @@
-error: lifetime may not live long enough
-  --> $DIR/issue-55394.rs:11:9
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements
+  --> $DIR/issue-55394.rs:9:9
    |
-LL |     fn new(bar: &mut Bar) -> Self {
-   |                 -            ---- return type is Foo<'2>
-   |                 |
-   |                 let's call the lifetime of this reference `'1`
 LL |         Foo { bar }
-   |         ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
+   |         ^^^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5...
+  --> $DIR/issue-55394.rs:8:5
+   |
+LL | /     fn new(bar: &mut Bar) -> Self {
+LL | |         Foo { bar }
+LL | |     }
+   | |_____^
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/issue-55394.rs:9:15
+   |
+LL |         Foo { bar }
+   |               ^^^
+note: but, the lifetime must be valid for the lifetime '_ as defined on the impl at 7:10...
+  --> $DIR/issue-55394.rs:7:10
+   |
+LL | impl Foo<'_> {
+   |          ^^
+   = note: ...so that the expression is assignable:
+           expected Foo<'_>
+              found Foo<'_>
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/nll/issue-55401.nll.stderr b/src/test/ui/nll/issue-55401.nll.stderr
new file mode 100644 (file)
index 0000000..4f797f2
--- /dev/null
@@ -0,0 +1,11 @@
+error: lifetime may not live long enough
+  --> $DIR/issue-55401.rs:3:5
+   |
+LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 {
+   |                                               -- lifetime `'a` defined here
+LL |     let (ref y, _z): (&'a u32, u32) = (&22, 44);
+LL |     *y
+   |     ^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index 2fa234491087d679d10cfe68653575753d3ea00d..fc45824e903c8134a237003e02596c1c77777fb4 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 {
     let (ref y, _z): (&'a u32, u32) = (&22, 44);
     *y //~ ERROR
index 622bc5a3f34113dad5bcdab15e39633fa61e1fb7..50debc6386f6add1b7b497d9e2a8ce931e112e42 100644 (file)
@@ -1,11 +1,15 @@
-error: lifetime may not live long enough
-  --> $DIR/issue-55401.rs:5:5
+error[E0312]: lifetime of reference outlives lifetime of borrowed content...
+  --> $DIR/issue-55401.rs:3:5
    |
-LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 {
-   |                                               -- lifetime `'a` defined here
-LL |     let (ref y, _z): (&'a u32, u32) = (&22, 44);
 LL |     *y
-   |     ^^ returning this value requires that `'a` must outlive `'static`
+   |     ^^
+   |
+   = note: ...the reference is valid for the static lifetime...
+note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 1:47
+  --> $DIR/issue-55401.rs:1:47
+   |
+LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 {
+   |                                               ^^
 
 error: aborting due to previous error
 
index 24c61a4926f0c13fc6b53f727953542e3aeed959..8fb8351cee26032d532ed773f18db9caaa616f2b 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 use std::any::Any;
 
 #[derive(Debug, Clone)]
index db01212597f5bfe0b7e4849c2110c8f0b8dbdd00..20add62b91ddf19268958d33985f06cb506673c1 100644 (file)
@@ -1,5 +1,5 @@
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/issue-57265-return-type-wf-check.rs:22:23
+  --> $DIR/issue-57265-return-type-wf-check.rs:20:23
    |
 LL |     let (_, z) = foo(&"hello".to_string());
    |                  -----^^^^^^^^^^^^^^^^^^^-- temporary value is freed at the end of this statement
index 356c477f1ba36f0ef97994fddc91203b83762447..e02d6a0cb5a3957bed3a62507555cc11f08c8588 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // compile-pass
 
 trait Foo<'a> {
index 4fe6a96f5dcc811e70bbffc94fccee51c75ab385..776a0d359cda6f163a6b308eef7ccc63d3894800 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // compile-pass
 
 trait Foo {
index 4f21cca97cc093160a60f8fe5fd5a6e8c3aaec57..c410f0b0bfb4da6fd4d8b73d1ec5298cf5666c8a 100644 (file)
@@ -1,7 +1,5 @@
 // Test for ICE from issue 57989
 
-#![feature(nll)]
-
 fn f(x: &i32) {
     let g = &x;
     *x = 0;     //~ ERROR cannot assign to `*x` which is behind a `&` reference
index 7367dc095a31abcde8727f4eae1d671f8d3b6dc0..00a9bab486855a62c61372d58ed2d1b6fa69bbd7 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `*x` which is behind a `&` reference
-  --> $DIR/issue-57989.rs:7:5
+  --> $DIR/issue-57989.rs:5:5
    |
 LL | fn f(x: &i32) {
    |         ---- help: consider changing this to be a mutable reference: `&mut i32`
@@ -8,7 +8,7 @@ LL |     *x = 0;
    |     ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
 
 error[E0506]: cannot assign to `*x` because it is borrowed
-  --> $DIR/issue-57989.rs:7:5
+  --> $DIR/issue-57989.rs:5:5
    |
 LL |     let g = &x;
    |             -- borrow of `*x` occurs here
index d4338905ed2df6ee2fdc6c07d858a06d96bebecf..0992e3a85ae94964023d9e2db4037b77640ee64b 100644 (file)
@@ -1,4 +1,3 @@
-#![allow(warnings)]
 #![feature(nll)]
 
 fn main() {
index 9048983318b361a97f5c76f5b1587b388828a419..297681ff4038af97a0a1c2c92f6358ca84f2b5ea 100644 (file)
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/issue-58053.rs:7:33
+  --> $DIR/issue-58053.rs:6:33
    |
 LL |     let f = |x: &i32| -> &i32 { x };
    |                 -        ----   ^ returning this value requires that `'1` must outlive `'2`
@@ -8,7 +8,7 @@ LL |     let f = |x: &i32| -> &i32 { x };
    |                 let's call the lifetime of this reference `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/issue-58053.rs:11:25
+  --> $DIR/issue-58053.rs:10:25
    |
 LL |     let g = |x: &i32| { x };
    |                 -   -   ^ returning this value requires that `'1` must outlive `'2`
index 9267cac5dd3d75c559ee6d3c8beb45ce15259452..3277a9db8ec466c2a0b84f81faf5ea11a51d3c10 100644 (file)
@@ -1,4 +1,3 @@
-#![allow(dead_code)]
 #![feature(nll)]
 
 struct A<'a>(&'a ());
index 0c69b70a97c77565692331939d0a14a64cb5d796..aba07542d026e826b2d8589e14cc306cad81b1a8 100644 (file)
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/issue-58299.rs:17:9
+  --> $DIR/issue-58299.rs:16:9
    |
 LL | fn foo<'a>(x: i32) {
    |        -- lifetime `'a` defined here
@@ -8,7 +8,7 @@ LL |         A::<'a>::X..=A::<'static>::X => (),
    |         ^^^^^^^^^^ requires that `'a` must outlive `'static`
 
 error: lifetime may not live long enough
-  --> $DIR/issue-58299.rs:25:27
+  --> $DIR/issue-58299.rs:24:27
    |
 LL | fn bar<'a>(x: i32) {
    |        -- lifetime `'a` defined here
index 5b609820a237feb320ed498639cb7d100afa777f..1de32ddf531c82ecb1198738b526655fb972b564 100644 (file)
@@ -1,6 +1,3 @@
-#![allow(warnings)]
-#![feature(nll)]
-
 struct Wrap<'p> { p: &'p mut i32 }
 
 impl<'p> Drop for Wrap<'p> {
index e7755bdb89ccf869d986e5bf994d91049670cece..80e297807465d6bcde327a5c75f777a1fb56166c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:20:5
+  --> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:17:5
    |
 LL |     let wrap = Wrap { p: &mut x };
    |                          ------ borrow of `x` occurs here
index a34163737096c292d937d67a32eba496aade1f17..e0fcd6250322dc4b63011c2e7ff85dd1ff62c53a 100644 (file)
@@ -1,6 +1,3 @@
-#![allow(unused)]
-#![feature(nll)]
-
 struct A(String);
 struct C(D);
 
index bb30da034af56c8a677543a75f32952462af132b..a4af11e3d40f7368aa4c01135833fd9a73bd7ef5 100644 (file)
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/move-errors.rs:9:13
+  --> $DIR/move-errors.rs:6:13
    |
 LL |     let b = *a;
    |             ^^
@@ -8,7 +8,7 @@ LL |     let b = *a;
    |             help: consider removing the `*`: `a`
 
 error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
-  --> $DIR/move-errors.rs:15:13
+  --> $DIR/move-errors.rs:12:13
    |
 LL |     let b = a[0];
    |             ^^^^
@@ -17,7 +17,7 @@ LL |     let b = a[0];
    |             help: consider borrowing here: `&a[0]`
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/move-errors.rs:22:13
+  --> $DIR/move-errors.rs:19:13
    |
 LL |     let s = **r;
    |             ^^^
@@ -26,7 +26,7 @@ LL |     let s = **r;
    |             help: consider removing the `*`: `*r`
 
 error[E0507]: cannot move out of an `Rc`
-  --> $DIR/move-errors.rs:30:13
+  --> $DIR/move-errors.rs:27:13
    |
 LL |     let s = *r;
    |             ^^
@@ -35,7 +35,7 @@ LL |     let s = *r;
    |             help: consider removing the `*`: `r`
 
 error[E0508]: cannot move out of type `[A; 1]`, a non-copy array
-  --> $DIR/move-errors.rs:35:13
+  --> $DIR/move-errors.rs:32:13
    |
 LL |     let a = [A("".to_string())][0];
    |             ^^^^^^^^^^^^^^^^^^^^^^
@@ -44,7 +44,7 @@ LL |     let a = [A("".to_string())][0];
    |             help: consider borrowing here: `&[A("".to_string())][0]`
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/move-errors.rs:41:16
+  --> $DIR/move-errors.rs:38:16
    |
 LL |     let A(s) = *a;
    |           -    ^^
@@ -54,13 +54,13 @@ LL |     let A(s) = *a;
    |           data moved here
    |
 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
-  --> $DIR/move-errors.rs:41:11
+  --> $DIR/move-errors.rs:38:11
    |
 LL |     let A(s) = *a;
    |           ^
 
 error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
-  --> $DIR/move-errors.rs:47:19
+  --> $DIR/move-errors.rs:44:19
    |
 LL |     let C(D(s)) = c;
    |             -     ^ cannot move out of here
@@ -68,19 +68,19 @@ LL |     let C(D(s)) = c;
    |             data moved here
    |
 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
-  --> $DIR/move-errors.rs:47:13
+  --> $DIR/move-errors.rs:44:13
    |
 LL |     let C(D(s)) = c;
    |             ^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/move-errors.rs:54:9
+  --> $DIR/move-errors.rs:51:9
    |
 LL |     b = *a;
    |         ^^ cannot move out of borrowed content
 
 error[E0508]: cannot move out of type `[B; 1]`, a non-copy array
-  --> $DIR/move-errors.rs:77:11
+  --> $DIR/move-errors.rs:74:11
    |
 LL |     match x[0] {
    |           ^^^^
@@ -94,7 +94,7 @@ LL |         B::V(s) => (),
    |              - ...and here
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/move-errors.rs:79:14
+  --> $DIR/move-errors.rs:76:14
    |
 LL |         B::U(d) => (),
    |              ^
@@ -102,7 +102,7 @@ LL |         B::V(s) => (),
    |              ^
 
 error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
-  --> $DIR/move-errors.rs:86:11
+  --> $DIR/move-errors.rs:83:11
    |
 LL |     match x {
    |           ^ cannot move out of here
@@ -111,13 +111,13 @@ LL |         B::U(D(s)) => (),
    |                - data moved here
    |
 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
-  --> $DIR/move-errors.rs:89:16
+  --> $DIR/move-errors.rs:86:16
    |
 LL |         B::U(D(s)) => (),
    |                ^
 
 error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
-  --> $DIR/move-errors.rs:95:11
+  --> $DIR/move-errors.rs:92:11
    |
 LL |     match x {
    |           ^ cannot move out of here
@@ -126,13 +126,13 @@ LL |         (D(s), &t) => (),
    |            - data moved here
    |
 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
-  --> $DIR/move-errors.rs:98:12
+  --> $DIR/move-errors.rs:95:12
    |
 LL |         (D(s), &t) => (),
    |            ^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/move-errors.rs:95:11
+  --> $DIR/move-errors.rs:92:11
    |
 LL |     match x {
    |           ^ cannot move out of borrowed content
@@ -141,13 +141,13 @@ LL |         (D(s), &t) => (),
    |                 - data moved here
    |
 note: move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait
-  --> $DIR/move-errors.rs:98:17
+  --> $DIR/move-errors.rs:95:17
    |
 LL |         (D(s), &t) => (),
    |                 ^
 
 error[E0509]: cannot move out of type `F`, which implements the `Drop` trait
-  --> $DIR/move-errors.rs:105:11
+  --> $DIR/move-errors.rs:102:11
    |
 LL |     match x {
    |           ^ cannot move out of here
@@ -158,13 +158,13 @@ LL |         F(s, mut t) => (),
    |           data moved here
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/move-errors.rs:107:11
+  --> $DIR/move-errors.rs:104:11
    |
 LL |         F(s, mut t) => (),
    |           ^  ^^^^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/move-errors.rs:113:11
+  --> $DIR/move-errors.rs:110:11
    |
 LL |     match *x {
    |           ^^
@@ -176,7 +176,7 @@ LL |         Ok(s) | Err(s) => (),
    |            - data moved here
    |
 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
-  --> $DIR/move-errors.rs:115:12
+  --> $DIR/move-errors.rs:112:12
    |
 LL |         Ok(s) | Err(s) => (),
    |            ^
index 72a36ef22dff749b31f344c58ae8c6fe1a20111d..e7caf89e78391d2b50eec6e068edd5afbe67764e 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn main() {
     let x = (vec![1, 2, 3], );
     drop(x.0);
index bdbc25e9ee3d4fbafaeef523dcdbb2606af85d35..7030d5b3305f1181990d13e7b20844d6deabcf1d 100644 (file)
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/move-subpaths-moves-root.rs:6:10
+  --> $DIR/move-subpaths-moves-root.rs:4:10
    |
 LL |     drop(x.0);
    |          --- value moved here
index d6610e158236c3afcfd85db176695a09573c12d3..b6cfcd98732b458d9b77c85c7ec4570b2fd93ee2 100644 (file)
@@ -1,7 +1,6 @@
 // Check that we error when a bound from the impl is not satisfied when
 // normalizing an associated type.
 
-#![feature(nll)]
 trait Visitor<'d> {
     type Value;
 }
index 8ee00168661bd76cb94ff68f891371d70214e865..951e73e7fd76555659eb5261b618e7493a626f2a 100644 (file)
@@ -1,16 +1,16 @@
 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'d` due to conflicting requirements
-  --> $DIR/normalization-bounds-error.rs:13:1
+  --> $DIR/normalization-bounds-error.rs:12:1
    |
 LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: first, the lifetime cannot outlive the lifetime 'd as defined on the function body at 13:14...
-  --> $DIR/normalization-bounds-error.rs:13:14
+note: first, the lifetime cannot outlive the lifetime 'd as defined on the function body at 12:14...
+  --> $DIR/normalization-bounds-error.rs:12:14
    |
 LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
    |              ^^
-note: ...but the lifetime must also be valid for the lifetime 'a as defined on the function body at 13:18...
-  --> $DIR/normalization-bounds-error.rs:13:18
+note: ...but the lifetime must also be valid for the lifetime 'a as defined on the function body at 12:18...
+  --> $DIR/normalization-bounds-error.rs:12:18
    |
 LL | fn visit_seq<'d, 'a: 'd>() -> <&'a () as Visitor<'d>>::Value {}
    |                  ^^
index ebc19d7cc83506a0f55c7434deba53b59c74260b..5d2825ef2d670cd65ad1a137a9d19e9996e94a65 100644 (file)
@@ -2,7 +2,6 @@
 
 //run-pass
 
-#![feature(nll)]
 trait Visitor<'d> {
     type Value;
 }
index 061d0d69d099ecb1f49ea071cf41d62096c2f538..6d5bdfa4da2f06bc1afd55e9b2f261e19bf6d9a4 100644 (file)
@@ -3,8 +3,6 @@
 
 // run-pass
 
-#![feature(nll)]
-
 pub fn main() {
     let mut x: Vec<&[i32; 0]> = Vec::new();
     for i in 0..10 {
index 59b21cf9ac2a9c9cab61ebf11351e0077e3932e8..5f95ae13c58af0f07c4465a7cb0e4f85db279bf0 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 fn shorten_lifetime<'a, 'b, 'min>(a: &'a i32, b: &'b i32) -> &'min i32
 where
     'a: 'min,
index de185cc0d294786d04346f6862c8f3aa095e3f33..df347f4e7f0fec3642272b4b763da71a8da138f2 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `l` does not live long enough
-  --> $DIR/promoted-bounds.rs:21:17
+  --> $DIR/promoted-bounds.rs:19:17
    |
 LL |     let ptr = {
    |         --- borrow later stored here
index 7b3bbad4c1e0c5e8113e72f9afdf3436228851a5..cc9f17fd4e6bc0ae60fb6eff90f6136997cc3422 100644 (file)
@@ -1,7 +1,5 @@
 // Check that we handle multiple closures in the same promoted constant.
 
-#![feature(nll)]
-
 fn foo() -> &'static i32 {
     let z = 0;
     let p = &(|y| y, |y| y);
index b04d1a9ccba7fc7889fbeb895f2de39d65904c29..000bdf85804d8eb970f0e62d67d864b46ff42fbc 100644 (file)
@@ -1,5 +1,5 @@
 error[E0515]: cannot return value referencing local variable `z`
-  --> $DIR/promoted-closure-pair.rs:9:5
+  --> $DIR/promoted-closure-pair.rs:7:5
    |
 LL |     p.1(&z)
    |     ^^^^--^
index 9b8ac167466f7eb5d360e0f5b6a381469c438c18..72987629848c88b873e004acebf6fc25e1bb8d48 100644 (file)
@@ -6,10 +6,6 @@
 //
 // compile-pass
 
-#![allow(warnings)]
-#![feature(dyn_trait)]
-#![feature(nll)]
-
 trait Foo {
     fn foo(&self) { }
 }
index 2f227c872598ffb47f261105226c9e3f09252ed4..77129f4468f047a3f89be10302a52bfa42c838e1 100644 (file)
@@ -2,9 +2,6 @@
 // function returning always its first argument can be upcast to one
 // that returns either first or second argument.
 
-#![feature(nll)]
-#![allow(warnings)]
-
 use std::cell::Cell;
 
 type DoubleCell<A> = Cell<(A, A)>;
index 7c078d226dc0cdfe1ff868cfc2609f2ba8b96873..d032ce6f2132ce21f97cbc1e8bce1a05a4a9a06e 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `b` does not live long enough
-  --> $DIR/var-appears-twice.rs:23:38
+  --> $DIR/var-appears-twice.rs:20:38
    |
 LL |     let x: DoubleCell<_> = make_cell(&b);
    |            -------------             ^^ borrowed value does not live long enough
index b535ab1f5e13952a390d1e4cc5c874be2c917cfc..dca61d39dfe813e2e22f3a9a56e50eac5aa32cc8 100644 (file)
@@ -1,8 +1,5 @@
 // Regression test for issue #46557
 
-#![feature(nll)]
-#![allow(dead_code)]
-
 fn gimme_static_mut() -> &'static mut u32 {
     let ref mut x = 1234543;
     x //~ ERROR cannot return value referencing temporary value [E0515]
index cc201136ff212d61db9969a03ba14878220c4ed1..720440a0ae5f8a27d3edd98915e57ec62b725bef 100644 (file)
@@ -1,5 +1,5 @@
 error[E0515]: cannot return value referencing temporary value
-  --> $DIR/return-ref-mut-issue-46557.rs:8:5
+  --> $DIR/return-ref-mut-issue-46557.rs:5:5
    |
 LL |     let ref mut x = 1234543;
    |                     ------- temporary value created here
index 586f076c8cabfac2e490b39adab551eac494aabd..dc67c1a68aaf639d4528b8d51fb85a60ed689b41 100644 (file)
@@ -2,9 +2,6 @@
 //
 // compile-pass
 
-#![feature(nll)]
-#![allow(unused_variables)]
-
 use std::collections::BTreeMap;
 
 trait ValueTree {
index de8b05aeed75cd172d18e6e775e18d8c52a2fe37..1b80be2eaff99169c1e96e81baa0cf38a0b036d4 100644 (file)
@@ -2,9 +2,6 @@
 //
 // compile-pass
 
-#![feature(nll)]
-#![allow(unused_variables)]
-
 use std::collections::BTreeMap;
 use std::ops::Range;
 use std::cmp::Ord;
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.nll.stderr
new file mode 100644 (file)
index 0000000..3a84cbf
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0309]: the associated type `<T as MyTrait<'_>>::Output` may not live long enough
+  --> $DIR/projection-where-clause-env-wrong-bound.rs:15:5
+   |
+LL |     bar::<T::Output>()
+   |     ^^^^^^^^^^^^^^^^
+   |
+   = help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0309`.
index 9c2cbfd4a4530ead2f45a365afa8127891e8a9d6..dce88b88c7530bbbddd498e3847d6fbdd2be0f11 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // Test that we are able to establish that `<T as
 // MyTrait<'a>>::Output` outlives `'b` here. We need to prove however
 // that `<T as MyTrait<'a>>::Output` outlives `'a`, so we also have to
index 1aed0a545b478203315ab22ead6311fa25d43bb2..1a5a3719fd86d36f0b7fd3874e9a95d4a53da1d2 100644 (file)
@@ -1,10 +1,15 @@
-error[E0309]: the associated type `<T as MyTrait<'_>>::Output` may not live long enough
-  --> $DIR/projection-where-clause-env-wrong-bound.rs:17:5
+error[E0309]: the associated type `<T as MyTrait<'a>>::Output` may not live long enough
+  --> $DIR/projection-where-clause-env-wrong-bound.rs:15:5
    |
 LL |     bar::<T::Output>()
    |     ^^^^^^^^^^^^^^^^
    |
-   = help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`...
+   = help: consider adding an explicit lifetime bound `<T as MyTrait<'a>>::Output: 'a`...
+note: ...so that the type `<T as MyTrait<'a>>::Output` will meet its required lifetime bounds
+  --> $DIR/projection-where-clause-env-wrong-bound.rs:15:5
+   |
+LL |     bar::<T::Output>()
+   |     ^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index c6935badf54b289dd8f66764568f260b9a17b505..731476661112148053971caa944d21a80e19f012 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // Test that when we have a `<T as MyTrait<'a>>::Output: 'a`
 // relationship in the environment we take advantage of it.  In this
 // case, that means we **don't** have to prove that `T: 'a`.
diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs
deleted file mode 100644 (file)
index ec55943..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Test that we assume that universal types like `T` outlive the
-// function body. Same as ty-param-fn-body, but uses `feature(nll)`,
-// which affects error reporting.
-
-#![feature(nll)]
-
-#![allow(warnings)]
-
-use std::cell::Cell;
-
-// No errors here, because `'a` is local to the body.
-fn region_within_body<T>(t: T) {
-    let some_int = 22;
-    let cell = Cell::new(&some_int);
-    outlives(cell, t)
-}
-
-// Error here, because T: 'a is not satisfied.
-fn region_static<'a, T>(cell: Cell<&'a usize>, t: T) {
-    outlives(cell, t)
-    //~^ ERROR the parameter type `T` may not live long enough
-}
-
-fn outlives<'a, T>(x: Cell<&'a usize>, y: T)
-where
-    T: 'a,
-{
-}
-
-fn main() {}
diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr
deleted file mode 100644 (file)
index b3c02f7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/ty-param-fn-body-nll-feature.rs:20:5
-   |
-LL |     outlives(cell, t)
-   |     ^^^^^^^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `T: 'a`...
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0309`.
diff --git a/src/test/ui/nll/type-alias-free-regions.nll.stderr b/src/test/ui/nll/type-alias-free-regions.nll.stderr
new file mode 100644 (file)
index 0000000..235bf41
--- /dev/null
@@ -0,0 +1,22 @@
+error: lifetime may not live long enough
+  --> $DIR/type-alias-free-regions.rs:17:9
+   |
+LL | impl<'a> FromBox<'a> for C<'a> {
+   |      -- lifetime `'a` defined here
+LL |     fn from_box(b: Box<B>) -> Self {
+   |                 - has type `std::boxed::Box<std::boxed::Box<&'1 isize>>`
+LL |         C { f: b }
+   |         ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a`
+
+error: lifetime may not live long enough
+  --> $DIR/type-alias-free-regions.rs:27:9
+   |
+LL | impl<'a> FromTuple<'a> for C<'a> {
+   |      -- lifetime `'a` defined here
+LL |     fn from_tuple(b: (B,)) -> Self {
+   |                   - has type `(std::boxed::Box<&'1 isize>,)`
+LL |         C { f: Box::new(b.0) }
+   |         ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'a`
+
+error: aborting due to 2 previous errors
+
index ebe6b9d20739aad9d751a667c6e2f0c35a25aa6d..fd5566f35d5141f5f49a39688f40bf03bc3e5ada 100644 (file)
@@ -1,8 +1,6 @@
 // Test that we don't assume that type aliases have the same type parameters
 // as the type they alias and then panic when we see this.
 
-#![feature(nll)]
-
 type A<'a> = &'a isize;
 type B<'a> = Box<A<'a>>;
 
index 4facc2d0da0e6b0e2825ceb28ccc850ee8cb8ef9..00d58d34362e644c78a445592e7a1e2f9fb8ffdc 100644 (file)
@@ -1,22 +1,52 @@
-error: lifetime may not live long enough
-  --> $DIR/type-alias-free-regions.rs:19:9
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
+  --> $DIR/type-alias-free-regions.rs:17:9
    |
-LL | impl<'a> FromBox<'a> for C<'a> {
-   |      -- lifetime `'a` defined here
-LL |     fn from_box(b: Box<B>) -> Self {
-   |                 - has type `std::boxed::Box<std::boxed::Box<&'1 isize>>`
 LL |         C { f: b }
-   |         ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a`
+   |         ^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 16:5...
+  --> $DIR/type-alias-free-regions.rs:16:5
+   |
+LL | /     fn from_box(b: Box<B>) -> Self {
+LL | |         C { f: b }
+LL | |     }
+   | |_____^
+   = note: ...so that the expression is assignable:
+           expected std::boxed::Box<std::boxed::Box<&isize>>
+              found std::boxed::Box<std::boxed::Box<&isize>>
+note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 15:6...
+  --> $DIR/type-alias-free-regions.rs:15:6
+   |
+LL | impl<'a> FromBox<'a> for C<'a> {
+   |      ^^
+   = note: ...so that the expression is assignable:
+           expected C<'a>
+              found C<'_>
 
-error: lifetime may not live long enough
-  --> $DIR/type-alias-free-regions.rs:29:9
+error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
+  --> $DIR/type-alias-free-regions.rs:27:16
    |
-LL | impl<'a> FromTuple<'a> for C<'a> {
-   |      -- lifetime `'a` defined here
-LL |     fn from_tuple(b: (B,)) -> Self {
-   |                   - has type `(std::boxed::Box<&'1 isize>,)`
 LL |         C { f: Box::new(b.0) }
-   |         ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'a`
+   |                ^^^^^^^^^^^^^
+   |
+note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 26:5...
+  --> $DIR/type-alias-free-regions.rs:26:5
+   |
+LL | /     fn from_tuple(b: (B,)) -> Self {
+LL | |         C { f: Box::new(b.0) }
+LL | |     }
+   | |_____^
+   = note: ...so that the expression is assignable:
+           expected std::boxed::Box<&isize>
+              found std::boxed::Box<&isize>
+note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 25:6...
+  --> $DIR/type-alias-free-regions.rs:25:6
+   |
+LL | impl<'a> FromTuple<'a> for C<'a> {
+   |      ^^
+   = note: ...so that the expression is assignable:
+           expected C<'a>
+              found C<'_>
 
 error: aborting due to 2 previous errors
 
index 06dbc473557398068c3e1877db7e7420ac6170e4..da0d9229c1262bb9edfda28e23ee317df70e8df6 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(nll)]
 #![deny(unused_mut)]
 
 fn main() {
index ef31dd7b29a40ed5069dd835ecea82df109bdfea..261d678db67587bc37514f856d1117a56ec067c2 100644 (file)
@@ -1,5 +1,5 @@
 error: variable does not need to be mutable
-  --> $DIR/unused-mut-issue-50343.rs:5:33
+  --> $DIR/unused-mut-issue-50343.rs:4:33
    |
 LL |     vec![(42, 22)].iter().map(|(mut x, _y)| ()).count();
    |                                 ----^
@@ -7,7 +7,7 @@ LL |     vec![(42, 22)].iter().map(|(mut x, _y)| ()).count();
    |                                 help: remove this `mut`
    |
 note: lint level defined here
-  --> $DIR/unused-mut-issue-50343.rs:2:9
+  --> $DIR/unused-mut-issue-50343.rs:1:9
    |
 LL | #![deny(unused_mut)]
    |         ^^^^^^^^^^
index 842ebae261819c3574a095b1b3ad2e35ee0c1c2d..0d9828342d8cbefc16fc42cef29e4b8570ad4b1d 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 enum SomeEnum<T> {
     SomeVariant { t: T }
 }
index 38f068746a6784370cc536316de6ea32eeab88e1..e38b77fdcea012dd5b719a33c1222c933ca402f3 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-brace-enums.rs:27:48
+  --> $DIR/adt-brace-enums.rs:25:48
    |
 LL |     SomeEnum::SomeVariant::<&'static u32> { t: &c };
    |                                                ^^
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-brace-enums.rs:32:43
+  --> $DIR/adt-brace-enums.rs:30:43
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-brace-enums.rs:42:47
+  --> $DIR/adt-brace-enums.rs:40:47
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index d7ebbe8eb5fc0b001ba350a2dbd5292e69146126..bdbfd87d584d9c15dc578b510363ec8bebde1e49 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 struct SomeStruct<T> { t: T }
 
 fn no_annot() {
index 25a9de480b2caf05fb5ecdc866a4f39a76cb59d3..3c3003477c2d6e688fb47d0a0c8e9e9eab664f0e 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-brace-structs.rs:25:37
+  --> $DIR/adt-brace-structs.rs:23:37
    |
 LL |     SomeStruct::<&'static u32> { t: &c };
    |                                     ^^
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-brace-structs.rs:30:32
+  --> $DIR/adt-brace-structs.rs:28:32
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-brace-structs.rs:40:36
+  --> $DIR/adt-brace-structs.rs:38:36
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index 7a8f55a800b9268b54ed68e4d8e9a66857e544e1..53853668d1978bd14370906400ae26d3a819cb85 100644 (file)
@@ -1,7 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
 #![allow(warnings)]
 
 use std::cell::Cell;
index 1afbac7c4b2efafcd95df4af67ee9281d4db5a9d..bb703412228800d6be0d47cf2bac4026f47728d0 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-nullary-enums.rs:34:41
+  --> $DIR/adt-nullary-enums.rs:33:41
    |
 LL |         SomeEnum::SomeVariant(Cell::new(&c)),
    |                               ----------^^-
@@ -11,7 +11,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-nullary-enums.rs:42:41
+  --> $DIR/adt-nullary-enums.rs:41:41
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -26,7 +26,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-nullary-enums.rs:55:45
+  --> $DIR/adt-nullary-enums.rs:54:45
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index 085596ecc53ee0389d2c8d92126b6533ce7d86b5..efe8dfda1910a28f6f9fbdf1567241a24e8c57be 100644 (file)
@@ -1,7 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
 #![allow(warnings)]
 
 enum SomeEnum<T> {
index cd625653ace2004fdd257859c1c31470434942a6..810912bf886187a3b9fb2b6ec7670ed9a5449fb1 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-tuple-enums.rs:29:43
+  --> $DIR/adt-tuple-enums.rs:28:43
    |
 LL |     SomeEnum::SomeVariant::<&'static u32>(&c);
    |                                           ^^
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-tuple-enums.rs:34:38
+  --> $DIR/adt-tuple-enums.rs:33:38
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-tuple-enums.rs:44:42
+  --> $DIR/adt-tuple-enums.rs:43:42
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index ebbe3cd2c8988685582726cba6fdac353103deb9..37284e1fda82b307b76700e91b02f5ccb6c5f221 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 struct SomeStruct<T>(T);
 
 fn no_annot() {
index 2bb58bb2590b3eec5e98edd15c04d48a7e8acce8..4d2140eca1b02a87c239ba64ed0d92607fb3fe91 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-tuple-struct.rs:25:32
+  --> $DIR/adt-tuple-struct.rs:23:32
    |
 LL |     SomeStruct::<&'static u32>(&c);
    |                                ^^
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-tuple-struct.rs:30:27
+  --> $DIR/adt-tuple-struct.rs:28:27
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/adt-tuple-struct.rs:40:31
+  --> $DIR/adt-tuple-struct.rs:38:31
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index 4756c771f6eaaa036b4bc418fd5af0cc32d3825e..bb6129dacda8d1e2368c426d6bf9421e09831966 100644 (file)
@@ -1,5 +1,4 @@
 #![allow(warnings)]
-#![feature(nll)]
 
 fn main() {
     let x = 22_u32;
index 0228b56d761f32518d7130585415289d675b190e..4599d04e7e2300c3eb27ab2121cbc7c17ddf32da 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/cast_static_lifetime.rs:6:19
+  --> $DIR/cast_static_lifetime.rs:5:19
    |
 LL |     let y: &u32 = (&x) as &'static u32;
    |                   ^^^^----------------
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.nll.stderr
new file mode 100644 (file)
index 0000000..c393015
--- /dev/null
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/constant-in-expr-inherent-1.rs:8:5
+   |
+LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
+   |        -- lifetime `'a` defined here
+LL |     <Foo<'a>>::C
+   |     ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index 9f0c60967efb28d090a611a95400f3508d96758c..e3a8a5f58dfda6193981ce0cc20d0b41ca1b8b9c 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Foo<'a> { x: &'a u32 }
 
 impl<'a> Foo<'a> {
index 9a28fbd11339fe3c9e8b07965a08e7c862ff89bb..77e1339dc161d7ed43667e6ff2f4e4fdc8f7728e 100644 (file)
@@ -1,10 +1,23 @@
-error: lifetime may not live long enough
-  --> $DIR/constant-in-expr-inherent-1.rs:10:5
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
+  --> $DIR/constant-in-expr-inherent-1.rs:8:5
+   |
+LL |     <Foo<'a>>::C
+   |     ^^^^^^^^^^^^
+   |
+note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 7:8...
+  --> $DIR/constant-in-expr-inherent-1.rs:7:8
    |
 LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
-   |        -- lifetime `'a` defined here
+   |        ^^
+   = note: ...so that the types are compatible:
+           expected Foo<'_>
+              found Foo<'a>
+   = note: but, the lifetime must be valid for the static lifetime...
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/constant-in-expr-inherent-1.rs:8:5
+   |
 LL |     <Foo<'a>>::C
-   |     ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+   |     ^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 123be6b3e4098dc7911844576054e45b48db3f1f..90696d4b17d8dd3f66673df4061fdd7ed84327d2 100644 (file)
@@ -1,8 +1,6 @@
 // Test that we still check constants are well-formed, even when we there's no
 // type annotation to check.
 
-#![feature(nll)]
-
 const FUN: fn(&'static ()) = |_| {};
 struct A;
 impl A {
index 07e2e1e85cb787b7b9a294c210dff7ed71206eef..12065a85aa4a0a512872fb8943ecdb3bf92ff4f8 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/constant-in-expr-inherent-2.rs:25:9
+  --> $DIR/constant-in-expr-inherent-2.rs:23:9
    |
 LL |     FUN(&x);
    |     ----^^-
@@ -11,7 +11,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/constant-in-expr-inherent-2.rs:26:23
+  --> $DIR/constant-in-expr-inherent-2.rs:24:23
    |
 LL |     A::ASSOCIATED_FUN(&x);
    |     ------------------^^-
@@ -23,7 +23,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/constant-in-expr-inherent-2.rs:27:28
+  --> $DIR/constant-in-expr-inherent-2.rs:25:28
    |
 LL |     B::ALSO_ASSOCIATED_FUN(&x);
    |     -----------------------^^-
@@ -35,7 +35,7 @@ LL | }
    | - `x` dropped here while still borrowed
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/constant-in-expr-inherent-2.rs:28:31
+  --> $DIR/constant-in-expr-inherent-2.rs:26:31
    |
 LL |     <_>::TRAIT_ASSOCIATED_FUN(&x);
    |     --------------------------^^-
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.nll.stderr
new file mode 100644 (file)
index 0000000..541a2cf
--- /dev/null
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/constant-in-expr-normalize.rs:18:5
+   |
+LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
+   |        -- lifetime `'a` defined here
+LL |     <() as Foo<'a>>::C
+   |     ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index 4292fc710e98bb58c49bd7eb2a234614c6a56dee..b7095430d8bd2849fca33b546c4839e620fc4e01 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 trait Mirror {
     type Me;
 }
index 5e66a30d7c332ec4bb72bb9483856c601a523d35..f49d68458bea5d10b522c69110b3cb5100795b90 100644 (file)
@@ -1,10 +1,15 @@
-error: lifetime may not live long enough
-  --> $DIR/constant-in-expr-normalize.rs:20:5
+error[E0312]: lifetime of reference outlives lifetime of borrowed content...
+  --> $DIR/constant-in-expr-normalize.rs:18:5
    |
-LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
-   |        -- lifetime `'a` defined here
 LL |     <() as Foo<'a>>::C
-   |     ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = note: ...the reference is valid for the static lifetime...
+note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 17:8
+  --> $DIR/constant-in-expr-normalize.rs:17:8
+   |
+LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
+   |        ^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.nll.stderr
new file mode 100644 (file)
index 0000000..ea0fcb6
--- /dev/null
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/constant-in-expr-trait-item-1.rs:10:5
+   |
+LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
+   |        -- lifetime `'a` defined here
+LL |     <() as Foo<'a>>::C
+   |     ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index daa0d7bc24140b1cbf6d5906b07e950fe8616d14..e0400b2cc0267fb1d393bce8689490d683289d16 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 trait Foo<'a> {
     const C: &'a u32;
 }
index c96838f259a818aa88a792f9f03c3a42a83a4ccc..451bcf41e42a9b2dc42daa125c8ada007b7a8254 100644 (file)
@@ -1,10 +1,15 @@
-error: lifetime may not live long enough
-  --> $DIR/constant-in-expr-trait-item-1.rs:12:5
+error[E0312]: lifetime of reference outlives lifetime of borrowed content...
+  --> $DIR/constant-in-expr-trait-item-1.rs:10:5
    |
-LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
-   |        -- lifetime `'a` defined here
 LL |     <() as Foo<'a>>::C
-   |     ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = note: ...the reference is valid for the static lifetime...
+note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 9:8
+  --> $DIR/constant-in-expr-trait-item-1.rs:9:8
+   |
+LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
+   |        ^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.nll.stderr
new file mode 100644 (file)
index 0000000..ff549f1
--- /dev/null
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/constant-in-expr-trait-item-2.rs:10:5
+   |
+LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
+   |        -- lifetime `'a` defined here
+LL |     <T as Foo<'a>>::C
+   |     ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index cd66e7a49cb83d1bc9350b593e1e4ee6047d88e6..73c4e577b05c087a16b4e7df73e3f5c6f22b185a 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 trait Foo<'a> {
     const C: &'a u32;
 }
index fcc3c40e43f74f95a71518b2d913fff98f363440..d129e55e1e6f63c8c5d49fbeb61f7c917501233a 100644 (file)
@@ -1,10 +1,15 @@
-error: lifetime may not live long enough
-  --> $DIR/constant-in-expr-trait-item-2.rs:12:5
+error[E0312]: lifetime of reference outlives lifetime of borrowed content...
+  --> $DIR/constant-in-expr-trait-item-2.rs:10:5
    |
-LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
-   |        -- lifetime `'a` defined here
 LL |     <T as Foo<'a>>::C
-   |     ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
+   |     ^^^^^^^^^^^^^^^^^
+   |
+   = note: ...the reference is valid for the static lifetime...
+note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 9:8
+  --> $DIR/constant-in-expr-trait-item-2.rs:9:8
+   |
+LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
+   |        ^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.nll.stderr
new file mode 100644 (file)
index 0000000..7f160d8
--- /dev/null
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/constant-in-expr-trait-item-3.rs:10:5
+   |
+LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
+   |        -- lifetime `'a` defined here
+LL |     T::C
+   |     ^^^^ returning this value requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
index f83ae2438e6d5dd1fffa6a9eeadd96c0afb575e9..567e31ef936321b7d7d0b10a84730e11cfedbb86 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 trait Foo<'a> {
     const C: &'a u32;
 }
index c91370c810c8e42a7452e40afc1522e13c7b34d0..77655fe091b6275fedbd0721f22cff7b94929a31 100644 (file)
@@ -1,10 +1,23 @@
-error: lifetime may not live long enough
-  --> $DIR/constant-in-expr-trait-item-3.rs:12:5
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
+  --> $DIR/constant-in-expr-trait-item-3.rs:10:5
+   |
+LL |     T::C
+   |     ^^^^
+   |
+note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:8...
+  --> $DIR/constant-in-expr-trait-item-3.rs:9:8
    |
 LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
-   |        -- lifetime `'a` defined here
+   |        ^^
+   = note: ...so that the types are compatible:
+           expected Foo<'_>
+              found Foo<'a>
+   = note: but, the lifetime must be valid for the static lifetime...
+note: ...so that reference does not outlive borrowed content
+  --> $DIR/constant-in-expr-trait-item-3.rs:10:5
+   |
 LL |     T::C
-   |     ^^^^ returning this value requires that `'a` must outlive `'static`
+   |     ^^^^
 
 error: aborting due to previous error
 
index 1e5e9340bef51bf0e555c923ab248425f49135a2..38db6d1c4c56fdf9d89b40f372499d783cc9f13c 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 fn some_fn<T>(arg: T) { }
 
 fn no_annot() {
index dadce24159e83c377c2360554aeebea712051f7c..e0640da39e2b62fb3211d3c89e7fdab35b910ab9 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/fns.rs:25:29
+  --> $DIR/fns.rs:23:29
    |
 LL |     some_fn::<&'static u32>(&c);
    |     ------------------------^^-
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/fns.rs:30:24
+  --> $DIR/fns.rs:28:24
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/fns.rs:40:28
+  --> $DIR/fns.rs:38:28
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index 0a8a6793dc782fcd119599b33edefd0f4b104e78..6b9d30f5ab4259eadc86b5327cdeef3aafd3dcf6 100644 (file)
@@ -1,5 +1,4 @@
 // compile-pass
-#![feature(nll)]
 
 // This test is reduced from a scenario pnkfelix encountered while
 // bootstrapping the compiler.
index 7daa5a59b997746e63246a42d52923c38917c828..4d18e96cc1543f8157d0dc0d570cace448f5e3e1 100644 (file)
@@ -5,8 +5,6 @@
 //
 // run-pass
 
-#![feature(nll)]
-
 pub struct Foo<T>(T);
 
 impl<T> Foo<T> {
index d7686b9dc9411479d00e658d6a7c1ddf85fb55c2..29969c7b4c6c84696aea31026be2f68a6bb6e023 100644 (file)
@@ -7,8 +7,6 @@
 //
 // run-pass
 
-#![feature(nll)]
-
 pub trait Hasher {
     type Out: Eq;
 }
index 59d1513c4c38e3caf8ca2ceeca394e4c59125a54..beafc597ac113ba4e1507f9b4eadb455078959e1 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 trait Bazoom<T> {
     fn method<U>(&self, arg: T, arg2: U) { }
 }
index 7e5314614f3465683279e679d79c05ccf3aded0f..10447e45a6d422de9a6ad372f19bf5083a0a1f77 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/method-call.rs:38:34
+  --> $DIR/method-call.rs:36:34
    |
 LL |     a.method::<&'static u32>(b,  &c);
    |     -----------------------------^^-
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/method-call.rs:45:29
+  --> $DIR/method-call.rs:43:29
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/method-call.rs:59:33
+  --> $DIR/method-call.rs:57:33
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index 7968a9f6c4fd501d2219011c92645ae81ccafd40..950771f35e49c350fe0043da8819f24490d78149 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 trait Bazoom<T>: Sized {
     fn method<U>(self, arg: T, arg2: U) { }
 }
index 12b02ba33f72550a9e42e1eb075136be4877a738..962ddfd2bd151f372c7af5b88dd2dca42808b9cc 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `a` does not live long enough
-  --> $DIR/method-ufcs-1.rs:32:7
+  --> $DIR/method-ufcs-1.rs:30:7
    |
 LL |     x(&a, b, c);
    |     --^^-------
@@ -10,7 +10,7 @@ LL | }
    | - `a` dropped here while still borrowed
 
 error[E0597]: `a` does not live long enough
-  --> $DIR/method-ufcs-1.rs:39:36
+  --> $DIR/method-ufcs-1.rs:37:36
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `a` dropped here while still borrowed
 
 error[E0597]: `a` does not live long enough
-  --> $DIR/method-ufcs-1.rs:53:41
+  --> $DIR/method-ufcs-1.rs:51:41
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index a1d0e7b4c920846c33490556a4c9743bd79ceca6..7dc0f0c12a43e93e09f87d5a7827c68252209413 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 trait Bazoom<T>: Sized {
     fn method<U>(self, arg: T, arg2: U) { }
 }
index a55ed1aa272ad26046f796bd254bdc9d428dbb61..63d59905e1c3892f90fb174794c658e6a6e0ba13 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `a` does not live long enough
-  --> $DIR/method-ufcs-2.rs:32:7
+  --> $DIR/method-ufcs-2.rs:30:7
    |
 LL |     x(&a, b, c);
    |     --^^-------
@@ -10,7 +10,7 @@ LL | }
    | - `a` dropped here while still borrowed
 
 error[E0597]: `b` does not live long enough
-  --> $DIR/method-ufcs-2.rs:39:39
+  --> $DIR/method-ufcs-2.rs:37:39
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `b` dropped here while still borrowed
 
 error[E0597]: `b` does not live long enough
-  --> $DIR/method-ufcs-2.rs:53:44
+  --> $DIR/method-ufcs-2.rs:51:44
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index ea480c03c35032dccc59b33065303ca43b3543d9..59d2009d14bdfd3e2917c933d29bfe4d9a94a27a 100644 (file)
@@ -1,8 +1,6 @@
 // Unit test for the "user substitutions" that are annotated on each
 // node.
 
-#![feature(nll)]
-
 trait Bazoom<T> {
     fn method<U>(&self, arg: T, arg2: U) { }
 }
index 140bda2df4147ebf91422462dd46f35fca9a5974..e7851833e93b23a7f77a130197e6dd19f2dfb33d 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `c` does not live long enough
-  --> $DIR/method-ufcs-3.rs:38:53
+  --> $DIR/method-ufcs-3.rs:36:53
    |
 LL |     <_ as Bazoom<_>>::method::<&'static u32>(&a, b, &c);
    |     ------------------------------------------------^^-
@@ -10,7 +10,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/method-ufcs-3.rs:45:48
+  --> $DIR/method-ufcs-3.rs:43:48
    |
 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
    |                                   -- lifetime `'a` defined here
@@ -24,7 +24,7 @@ LL | }
    | - `c` dropped here while still borrowed
 
 error[E0597]: `c` does not live long enough
-  --> $DIR/method-ufcs-3.rs:59:52
+  --> $DIR/method-ufcs-3.rs:57:52
    |
 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
    |                                              -- lifetime `'a` defined here
index a77d6af5323c2c5b6d0cdaea77e7e50a694ef9a9..cfbc0bcf6b0fc0375b29ce32adf613dad52c3832 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // Check that substitutions given on the self type (here, `A`) can be
 // used in combination with annotations given for method arguments.
 
index 4dc534b2e77acb5b5e8285d09f85ef8c499f7e0a..06f20d9b2355957ec460832005a4aad5947b9770 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `v` does not live long enough
-  --> $DIR/method-ufcs-inherent-2.rs:16:37
+  --> $DIR/method-ufcs-inherent-2.rs:14:37
    |
 LL | fn foo<'a>() {
    |        -- lifetime `'a` defined here
@@ -14,7 +14,7 @@ LL | }
    | - `v` dropped here while still borrowed
 
 error[E0597]: `v` does not live long enough
-  --> $DIR/method-ufcs-inherent-2.rs:16:41
+  --> $DIR/method-ufcs-inherent-2.rs:14:41
    |
 LL | fn foo<'a>() {
    |        -- lifetime `'a` defined here
index 3f88c3df48e006640a373f0694c44304819294a5..85e7597390d5cb8849686e148345e7fe955a897f 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 // Check that inherent methods invoked with `<T>::new` style
 // carry their annotations through to NLL in connection with
 // method type parameters.
index a41cf50465e876dbfeedb290cc69a5dd111d592b..0f83e99cdfb92f186eecdecf5c6c085531f0b1ca 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `v` does not live long enough
-  --> $DIR/method-ufcs-inherent-4.rs:17:37
+  --> $DIR/method-ufcs-inherent-4.rs:15:37
    |
 LL | fn foo<'a>() {
    |        -- lifetime `'a` defined here
@@ -14,7 +14,7 @@ LL | }
    | - `v` dropped here while still borrowed
 
 error[E0597]: `v` does not live long enough
-  --> $DIR/method-ufcs-inherent-4.rs:17:41
+  --> $DIR/method-ufcs-inherent-4.rs:15:41
    |
 LL | fn foo<'a>() {
    |        -- lifetime `'a` defined here
index e0af2e67e1836f4f9a874fa3d1aa306b1cc3bea8..870e3d8110cd5e34b487a02157a0da808d240da1 100644 (file)
@@ -1,8 +1,6 @@
 // Test that we enforce a `&'static` requirement that is only visible
 // after normalization.
 
-#![feature(nll)]
-
 trait Foo { type Out; }
 impl Foo for () { type Out = &'static u32; }
 
index fe93c3edba87a0d23af926bf2b862f38d2c97e38..4c7893789a53516cf57d10500cff3db0bd89cf7c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `a` does not live long enough
-  --> $DIR/normalization.rs:11:31
+  --> $DIR/normalization.rs:9:31
    |
 LL |     let b: <() as Foo>::Out = &a;
    |            ----------------   ^^ borrowed value does not live long enough
index d97cc88dd9af4e194fbd659ec0bfd451fa3f69db..a06229a02032a48afba91d61d2394ffc7c2da362 100644 (file)
@@ -4,8 +4,6 @@
 //
 // run-pass
 
-#![feature(nll)]
-
 trait Mirror {
     type Me;
 }
index 526134b6e4b3c2ae22e26744a8a501e0cefa3e09..59cd69c0ca55d7c3d2e1280ed7d6a40f4d957403 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 enum Foo<'a> {
     Bar { field: &'a u32 }
 }
index b483f219c9007d0adf1045de9a44e1d0575e9e4d..a97e7a9fd46fc3a3b1647c5ac17e29f78ba51609 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_brace_enum_variant.rs:9:33
+  --> $DIR/pattern_substs_on_brace_enum_variant.rs:7:33
    |
 LL |     let foo = Foo::Bar { field: &y };
    |                                 ^^ borrowed value does not live long enough
@@ -10,7 +10,7 @@ LL | }
    | - `y` dropped here while still borrowed
 
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_brace_enum_variant.rs:16:33
+  --> $DIR/pattern_substs_on_brace_enum_variant.rs:14:33
    |
 LL |     let foo = Foo::Bar { field: &y };
    |                                 ^^ borrowed value does not live long enough
index 1c92858eb3a08cd9d8c1c5c58f4a60129de7b5ae..1586c4ea30c62b2a56c78b92de4302058c2260b5 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Foo<'a> { field: &'a u32 }
 
 fn in_let() {
index 9c888b0bffe5312e3ec19aacb851af3d1a8bfca9..408d7c2a5e2a5c62250df15c5bfb384f48246274 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_brace_struct.rs:7:28
+  --> $DIR/pattern_substs_on_brace_struct.rs:5:28
    |
 LL |     let foo = Foo { field: &y };
    |                            ^^ borrowed value does not live long enough
@@ -10,7 +10,7 @@ LL | }
    | - `y` dropped here while still borrowed
 
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_brace_struct.rs:14:28
+  --> $DIR/pattern_substs_on_brace_struct.rs:12:28
    |
 LL |     let foo = Foo { field: &y };
    |                            ^^ borrowed value does not live long enough
index d6c364f8e3f0c83afc4b14f08ceb155aac72e591..6fa59fdd8d8996e9595f67aaeac022cd8fd79238 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 enum Foo<'a> {
     Bar(&'a u32)
 }
index 698cff51126f9caa226977e42decf31351be31a3..920c906f63a5824a3e08bdf049149f8af153135b 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_tuple_enum_variant.rs:9:24
+  --> $DIR/pattern_substs_on_tuple_enum_variant.rs:7:24
    |
 LL |     let foo = Foo::Bar(&y);
    |                        ^^ borrowed value does not live long enough
@@ -10,7 +10,7 @@ LL | }
    | - `y` dropped here while still borrowed
 
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_tuple_enum_variant.rs:16:24
+  --> $DIR/pattern_substs_on_tuple_enum_variant.rs:14:24
    |
 LL |     let foo = Foo::Bar(&y);
    |                        ^^ borrowed value does not live long enough
index 626ca908797876dfb9a1bd067f45f4b28df4aafe..7486aab0e0883628e60630700503519e39953a50 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct Foo<'a>(&'a u32);
 
 fn in_let() {
index b5f2cb8e321ab50e3d8314b398226d779d6c83d4..3f01638d84757f6aaee8764ab4c8e56f27d2d7e6 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_tuple_struct.rs:7:19
+  --> $DIR/pattern_substs_on_tuple_struct.rs:5:19
    |
 LL |     let foo = Foo(&y);
    |                   ^^ borrowed value does not live long enough
@@ -10,7 +10,7 @@ LL | }
    | - `y` dropped here while still borrowed
 
 error[E0597]: `y` does not live long enough
-  --> $DIR/pattern_substs_on_tuple_struct.rs:14:19
+  --> $DIR/pattern_substs_on_tuple_struct.rs:12:19
    |
 LL |     let foo = Foo(&y);
    |                   ^^ borrowed value does not live long enough
index fa2d2fb81183dc32ae7f3e322e2e8a70bd4c175e..b92f8bfd23b234ce2cb7e0dc5c506e46ed7b6c00 100644 (file)
@@ -1,7 +1,5 @@
 // Test that type annotations are checked in promoted constants correctly.
 
-#![feature(nll)]
-
 fn foo<'a>() {
     let x = 0;
     let f = &drop::<&'a i32>;
index d8b01f22145db946de9c390d647158f9caf8e5e9..cb99a6a369d0b25a12b4a4656b128c832335ea36 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/promoted-annotation.rs:8:7
+  --> $DIR/promoted-annotation.rs:6:7
    |
 LL | fn foo<'a>() {
    |        -- lifetime `'a` defined here
index 362fe51c3ea377bf4f443d524de6c8be31cb6af9..101b5cfabb3d06419e37559c583179c4b15f5790 100644 (file)
@@ -1,5 +1,4 @@
 #![allow(warnings)]
-#![feature(nll)]
 #![feature(type_ascription)]
 
 fn main() {
index 93dbf7cb1b310144d1f89b37534af3092c98f138..133bbef52311dc1135ea0faf821e4619383161f3 100644 (file)
@@ -1,5 +1,5 @@
 error[E0597]: `x` does not live long enough
-  --> $DIR/type_ascription_static_lifetime.rs:7:19
+  --> $DIR/type_ascription_static_lifetime.rs:6:19
    |
 LL |     let y: &u32 = &x: &'static u32;
    |                   ^^--------------
index 2f3c094ff3954b8d53e529e48569e0249528c18b..7b499af632ecee2645fe079cde2cbfe6e9b342c6 100644 (file)
@@ -4,7 +4,6 @@
 
 // compile-pass
 
-#![feature(nll)]
 #![feature(bind_by_move_pattern_guards)]
 
 use std::sync::mpsc::channel;
index 9a9d11ce1b13ed37d893361ee6ffb9eb9ad74db4..aca6aa5f0f8676dd6369f9b37a367361aadeb684 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(nll)]
 #![feature(bind_by_move_pattern_guards)]
 
 // compile-pass
index 4faede353059a8d3ab780e87894fb589567e491f..1c1230346a56cf2ce476b3afba2d37ca51eb06b1 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 #[derive(Clone)]
 enum Either {
     One(X),
index b1aaab6a75441f7c0aac8703ac04759812d56e8e..f8e043fbfdfd4052df84589e20b53c909528e40c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:41:27
+  --> $DIR/duplicate-suggestions.rs:39:27
    |
 LL |     let &(X(_t), X(_u)) = &(x.clone(), x.clone());
    |         ---------------   ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -9,13 +9,13 @@ LL |     let &(X(_t), X(_u)) = &(x.clone(), x.clone());
    |         help: consider removing the `&`: `(X(_t), X(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:41:13
+  --> $DIR/duplicate-suggestions.rs:39:13
    |
 LL |     let &(X(_t), X(_u)) = &(x.clone(), x.clone());
    |             ^^     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:45:50
+  --> $DIR/duplicate-suggestions.rs:43:50
    |
 LL |     if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
    |            -----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -25,13 +25,13 @@ LL |     if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) {
    |            help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:45:26
+  --> $DIR/duplicate-suggestions.rs:43:26
    |
 LL |     if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
    |                          ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:49:53
+  --> $DIR/duplicate-suggestions.rs:47:53
    |
 LL |     while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
    |               -----------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -41,13 +41,13 @@ LL |     while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone())
    |               help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:49:29
+  --> $DIR/duplicate-suggestions.rs:47:29
    |
 LL |     while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { }
    |                             ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:53:11
+  --> $DIR/duplicate-suggestions.rs:51:11
    |
 LL |     match &(e.clone(), e.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -61,7 +61,7 @@ LL |         &(Either::Two(_t), Either::One(_u)) => (),
    |                       -- ...and here   -- ...and here
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:55:23
+  --> $DIR/duplicate-suggestions.rs:53:23
    |
 LL |         &(Either::One(_t), Either::Two(_u)) => (),
    |                       ^^               ^^
@@ -78,7 +78,7 @@ LL |         (Either::Two(_t), Either::One(_u)) => (),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:63:11
+  --> $DIR/duplicate-suggestions.rs:61:11
    |
 LL |     match &(e.clone(), e.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -91,13 +91,13 @@ LL |         &(Either::One(_t), Either::Two(_u))
    |         help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:65:23
+  --> $DIR/duplicate-suggestions.rs:63:23
    |
 LL |         &(Either::One(_t), Either::Two(_u))
    |                       ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:72:11
+  --> $DIR/duplicate-suggestions.rs:70:11
    |
 LL |     match &(e.clone(), e.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -110,13 +110,13 @@ LL |         &(Either::One(_t), Either::Two(_u)) => (),
    |         help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:74:23
+  --> $DIR/duplicate-suggestions.rs:72:23
    |
 LL |         &(Either::One(_t), Either::Two(_u)) => (),
    |                       ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:80:11
+  --> $DIR/duplicate-suggestions.rs:78:11
    |
 LL |     match &(e.clone(), e.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -129,13 +129,13 @@ LL |         &(Either::One(_t), Either::Two(_u)) => (),
    |         help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:82:23
+  --> $DIR/duplicate-suggestions.rs:80:23
    |
 LL |         &(Either::One(_t), Either::Two(_u)) => (),
    |                       ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:93:31
+  --> $DIR/duplicate-suggestions.rs:91:31
    |
 LL |     let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
    |         -------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -145,13 +145,13 @@ LL |     let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
    |         help: consider removing the `&mut`: `(X(_t), X(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:93:17
+  --> $DIR/duplicate-suggestions.rs:91:17
    |
 LL |     let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone());
    |                 ^^     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:97:54
+  --> $DIR/duplicate-suggestions.rs:95:54
    |
 LL |     if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
    |            ---------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -161,13 +161,13 @@ LL |     if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.c
    |            help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:97:30
+  --> $DIR/duplicate-suggestions.rs:95:30
    |
 LL |     if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
    |                              ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:101:57
+  --> $DIR/duplicate-suggestions.rs:99:57
    |
 LL |     while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
    |               ---------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -177,13 +177,13 @@ LL |     while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), e
    |               help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:101:33
+  --> $DIR/duplicate-suggestions.rs:99:33
    |
 LL |     while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { }
    |                                 ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:105:11
+  --> $DIR/duplicate-suggestions.rs:103:11
    |
 LL |     match &mut (em.clone(), em.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -197,7 +197,7 @@ LL |         &mut (Either::Two(_t), Either::One(_u)) => (),
    |                           -- ...and here   -- ...and here
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:107:27
+  --> $DIR/duplicate-suggestions.rs:105:27
    |
 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |                           ^^               ^^
@@ -214,7 +214,7 @@ LL |         (Either::Two(_t), Either::One(_u)) => (),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:115:11
+  --> $DIR/duplicate-suggestions.rs:113:11
    |
 LL |     match &mut (em.clone(), em.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -227,13 +227,13 @@ LL |         &mut (Either::One(_t), Either::Two(_u))
    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:117:27
+  --> $DIR/duplicate-suggestions.rs:115:27
    |
 LL |         &mut (Either::One(_t), Either::Two(_u))
    |                           ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:124:11
+  --> $DIR/duplicate-suggestions.rs:122:11
    |
 LL |     match &mut (em.clone(), em.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -246,13 +246,13 @@ LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:126:27
+  --> $DIR/duplicate-suggestions.rs:124:27
    |
 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |                           ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:132:11
+  --> $DIR/duplicate-suggestions.rs:130:11
    |
 LL |     match &mut (em.clone(), em.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -265,13 +265,13 @@ LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:134:27
+  --> $DIR/duplicate-suggestions.rs:132:27
    |
 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |                           ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:140:11
+  --> $DIR/duplicate-suggestions.rs:138:11
    |
 LL |     match &mut (em.clone(), em.clone()) {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -284,13 +284,13 @@ LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |         help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:142:27
+  --> $DIR/duplicate-suggestions.rs:140:27
    |
 LL |         &mut (Either::One(_t), Either::Two(_u)) => (),
    |                           ^^               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:88:11
+  --> $DIR/duplicate-suggestions.rs:86:11
    |
 LL |     fn f5(&(X(_t), X(_u)): &(X, X)) { }
    |           ^^^^--^^^^^--^^
@@ -301,13 +301,13 @@ LL |     fn f5(&(X(_t), X(_u)): &(X, X)) { }
    |           help: consider removing the `&`: `(X(_t), X(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:88:15
+  --> $DIR/duplicate-suggestions.rs:86:15
    |
 LL |     fn f5(&(X(_t), X(_u)): &(X, X)) { }
    |               ^^     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/duplicate-suggestions.rs:148:11
+  --> $DIR/duplicate-suggestions.rs:146:11
    |
 LL |     fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
    |           ^^^^^^^^--^^^^^--^^
@@ -318,7 +318,7 @@ LL |     fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
    |           help: consider removing the `&mut`: `(X(_t), X(_u))`
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/duplicate-suggestions.rs:148:19
+  --> $DIR/duplicate-suggestions.rs:146:19
    |
 LL |     fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { }
    |                   ^^     ^^
index 90a9fe4e7d06ce1646cdbe0e3fcae8e67f26c944..6e3879a4155b9be456afdd0ee9520cc538acabfa 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 #[derive(Clone)]
 enum Either {
     One(X),
index f1d515e932c600773c8c50c2bee1249f9a968c71..74f3a63be57de2886d2c28b829c06b56532d185c 100644 (file)
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:30:21
+  --> $DIR/move-into-closure.rs:28:21
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -12,13 +12,13 @@ LL |         let X(_t) = x;
    |               data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:30:15
+  --> $DIR/move-into-closure.rs:28:15
    |
 LL |         let X(_t) = x;
    |               ^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:34:34
+  --> $DIR/move-into-closure.rs:32:34
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -31,13 +31,13 @@ LL |         if let Either::One(_t) = e { }
    |                            data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:34:28
+  --> $DIR/move-into-closure.rs:32:28
    |
 LL |         if let Either::One(_t) = e { }
    |                            ^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:38:37
+  --> $DIR/move-into-closure.rs:36:37
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -50,13 +50,13 @@ LL |         while let Either::One(_t) = e { }
    |                               data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:38:31
+  --> $DIR/move-into-closure.rs:36:31
    |
 LL |         while let Either::One(_t) = e { }
    |                               ^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:42:15
+  --> $DIR/move-into-closure.rs:40:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -71,13 +71,13 @@ LL |             Either::One(_t)
    |                         -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:46:25
+  --> $DIR/move-into-closure.rs:44:25
    |
 LL |             Either::One(_t)
    |                         ^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:49:15
+  --> $DIR/move-into-closure.rs:47:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -92,13 +92,13 @@ LL |             Either::One(_t) => (),
    |                         -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:53:25
+  --> $DIR/move-into-closure.rs:51:25
    |
 LL |             Either::One(_t) => (),
    |                         ^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:58:25
+  --> $DIR/move-into-closure.rs:56:25
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -111,13 +111,13 @@ LL |         let X(mut _t) = x;
    |               data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:58:15
+  --> $DIR/move-into-closure.rs:56:15
    |
 LL |         let X(mut _t) = x;
    |               ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:62:38
+  --> $DIR/move-into-closure.rs:60:38
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -130,13 +130,13 @@ LL |         if let Either::One(mut _t) = em { }
    |                            data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:62:28
+  --> $DIR/move-into-closure.rs:60:28
    |
 LL |         if let Either::One(mut _t) = em { }
    |                            ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:66:41
+  --> $DIR/move-into-closure.rs:64:41
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -149,13 +149,13 @@ LL |         while let Either::One(mut _t) = em { }
    |                               data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:66:31
+  --> $DIR/move-into-closure.rs:64:31
    |
 LL |         while let Either::One(mut _t) = em { }
    |                               ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:70:15
+  --> $DIR/move-into-closure.rs:68:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -170,13 +170,13 @@ LL |             Either::One(mut _t)
    |                         ------ data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:74:25
+  --> $DIR/move-into-closure.rs:72:25
    |
 LL |             Either::One(mut _t)
    |                         ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/move-into-closure.rs:77:15
+  --> $DIR/move-into-closure.rs:75:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -191,13 +191,13 @@ LL |             Either::One(mut _t) => (),
    |                         ------ data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:81:25
+  --> $DIR/move-into-closure.rs:79:25
    |
 LL |             Either::One(mut _t) => (),
    |                         ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:97:21
+  --> $DIR/move-into-closure.rs:95:21
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -210,13 +210,13 @@ LL |         let X(_t) = x;
    |               data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:97:15
+  --> $DIR/move-into-closure.rs:95:15
    |
 LL |         let X(_t) = x;
    |               ^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:101:34
+  --> $DIR/move-into-closure.rs:99:34
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -229,13 +229,13 @@ LL |         if let Either::One(_t) = e { }
    |                            data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:101:28
+  --> $DIR/move-into-closure.rs:99:28
    |
 LL |         if let Either::One(_t) = e { }
    |                            ^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:105:37
+  --> $DIR/move-into-closure.rs:103:37
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -248,13 +248,13 @@ LL |         while let Either::One(_t) = e { }
    |                               data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:105:31
+  --> $DIR/move-into-closure.rs:103:31
    |
 LL |         while let Either::One(_t) = e { }
    |                               ^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:109:15
+  --> $DIR/move-into-closure.rs:107:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -269,13 +269,13 @@ LL |             Either::One(_t)
    |                         -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:113:25
+  --> $DIR/move-into-closure.rs:111:25
    |
 LL |             Either::One(_t)
    |                         ^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:116:15
+  --> $DIR/move-into-closure.rs:114:15
    |
 LL |     let e = Either::One(X(Y));
    |         - captured outer variable
@@ -290,13 +290,13 @@ LL |             Either::One(_t) => (),
    |                         -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:120:25
+  --> $DIR/move-into-closure.rs:118:25
    |
 LL |             Either::One(_t) => (),
    |                         ^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:125:25
+  --> $DIR/move-into-closure.rs:123:25
    |
 LL |     let x = X(Y);
    |         - captured outer variable
@@ -309,13 +309,13 @@ LL |         let X(mut _t) = x;
    |               data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:125:15
+  --> $DIR/move-into-closure.rs:123:15
    |
 LL |         let X(mut _t) = x;
    |               ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:129:38
+  --> $DIR/move-into-closure.rs:127:38
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -328,13 +328,13 @@ LL |         if let Either::One(mut _t) = em { }
    |                            data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:129:28
+  --> $DIR/move-into-closure.rs:127:28
    |
 LL |         if let Either::One(mut _t) = em { }
    |                            ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:133:41
+  --> $DIR/move-into-closure.rs:131:41
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -347,13 +347,13 @@ LL |         while let Either::One(mut _t) = em { }
    |                               data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:133:31
+  --> $DIR/move-into-closure.rs:131:31
    |
 LL |         while let Either::One(mut _t) = em { }
    |                               ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:137:15
+  --> $DIR/move-into-closure.rs:135:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -368,13 +368,13 @@ LL |             Either::One(mut _t)
    |                         ------ data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:141:25
+  --> $DIR/move-into-closure.rs:139:25
    |
 LL |             Either::One(mut _t)
    |                         ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:144:15
+  --> $DIR/move-into-closure.rs:142:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -389,13 +389,13 @@ LL |             Either::One(mut _t) => (),
    |                         ------ data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:148:25
+  --> $DIR/move-into-closure.rs:146:25
    |
 LL |             Either::One(mut _t) => (),
    |                         ^^^^^^
 
 error[E0507]: cannot move out of captured variable in an `FnMut` closure
-  --> $DIR/move-into-closure.rs:152:15
+  --> $DIR/move-into-closure.rs:150:15
    |
 LL |     let mut em = Either::One(X(Y));
    |         ------ captured outer variable
@@ -410,7 +410,7 @@ LL |             Either::One(mut _t) => (),
    |                         ------ data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/move-into-closure.rs:156:25
+  --> $DIR/move-into-closure.rs:154:25
    |
 LL |             Either::One(mut _t) => (),
    |                         ^^^^^^
index 58aab85ac2673625abc3d10b1307b41867f434d1..31ab1a6639acc7e95294754638864141bae0621b 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 #[derive(Clone)]
 enum Either {
     One(X),
index 6a8b17ca870474c033cd3a1b6d528b5f64730d8d..7f2ba4da714d8db31b8568c2074ee03ce3810dee 100644 (file)
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:40:17
+  --> $DIR/simple.rs:38:17
    |
 LL |     let X(_t) = *s;
    |           --    ^^
@@ -9,13 +9,13 @@ LL |     let X(_t) = *s;
    |           data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:40:11
+  --> $DIR/simple.rs:38:11
    |
 LL |     let X(_t) = *s;
    |           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:44:30
+  --> $DIR/simple.rs:42:30
    |
 LL |     if let Either::One(_t) = *r { }
    |                        --    ^^
@@ -25,13 +25,13 @@ LL |     if let Either::One(_t) = *r { }
    |                        data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:44:24
+  --> $DIR/simple.rs:42:24
    |
 LL |     if let Either::One(_t) = *r { }
    |                        ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:48:33
+  --> $DIR/simple.rs:46:33
    |
 LL |     while let Either::One(_t) = *r { }
    |                           --    ^^
@@ -41,13 +41,13 @@ LL |     while let Either::One(_t) = *r { }
    |                           data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:48:27
+  --> $DIR/simple.rs:46:27
    |
 LL |     while let Either::One(_t) = *r { }
    |                           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:52:11
+  --> $DIR/simple.rs:50:11
    |
 LL |     match *r {
    |           ^^
@@ -59,13 +59,13 @@ LL |         Either::One(_t)
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:56:21
+  --> $DIR/simple.rs:54:21
    |
 LL |         Either::One(_t)
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:59:11
+  --> $DIR/simple.rs:57:11
    |
 LL |     match *r {
    |           ^^
@@ -77,13 +77,13 @@ LL |         Either::One(_t) => (),
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:63:21
+  --> $DIR/simple.rs:61:21
    |
 LL |         Either::One(_t) => (),
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:68:17
+  --> $DIR/simple.rs:66:17
    |
 LL |     let X(_t) = *sm;
    |           --    ^^^
@@ -93,13 +93,13 @@ LL |     let X(_t) = *sm;
    |           data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:68:11
+  --> $DIR/simple.rs:66:11
    |
 LL |     let X(_t) = *sm;
    |           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:72:30
+  --> $DIR/simple.rs:70:30
    |
 LL |     if let Either::One(_t) = *rm { }
    |                        --    ^^^
@@ -109,13 +109,13 @@ LL |     if let Either::One(_t) = *rm { }
    |                        data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:72:24
+  --> $DIR/simple.rs:70:24
    |
 LL |     if let Either::One(_t) = *rm { }
    |                        ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:76:33
+  --> $DIR/simple.rs:74:33
    |
 LL |     while let Either::One(_t) = *rm { }
    |                           --    ^^^
@@ -125,13 +125,13 @@ LL |     while let Either::One(_t) = *rm { }
    |                           data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:76:27
+  --> $DIR/simple.rs:74:27
    |
 LL |     while let Either::One(_t) = *rm { }
    |                           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:80:11
+  --> $DIR/simple.rs:78:11
    |
 LL |     match *rm {
    |           ^^^
@@ -143,13 +143,13 @@ LL |         Either::One(_t)
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:84:21
+  --> $DIR/simple.rs:82:21
    |
 LL |         Either::One(_t)
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:87:11
+  --> $DIR/simple.rs:85:11
    |
 LL |     match *rm {
    |           ^^^
@@ -161,13 +161,13 @@ LL |         Either::One(_t) => (),
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:91:21
+  --> $DIR/simple.rs:89:21
    |
 LL |         Either::One(_t) => (),
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:95:11
+  --> $DIR/simple.rs:93:11
    |
 LL |     match *rm {
    |           ^^^
@@ -179,13 +179,13 @@ LL |         Either::One(_t) => (),
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:99:21
+  --> $DIR/simple.rs:97:21
    |
 LL |         Either::One(_t) => (),
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:104:17
+  --> $DIR/simple.rs:102:17
    |
 LL |     let X(_t) = vs[0];
    |           --    ^^^^^
@@ -195,13 +195,13 @@ LL |     let X(_t) = vs[0];
    |           data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:104:11
+  --> $DIR/simple.rs:102:11
    |
 LL |     let X(_t) = vs[0];
    |           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:108:30
+  --> $DIR/simple.rs:106:30
    |
 LL |     if let Either::One(_t) = vr[0] { }
    |                        --    ^^^^^
@@ -211,13 +211,13 @@ LL |     if let Either::One(_t) = vr[0] { }
    |                        data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:108:24
+  --> $DIR/simple.rs:106:24
    |
 LL |     if let Either::One(_t) = vr[0] { }
    |                        ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:112:33
+  --> $DIR/simple.rs:110:33
    |
 LL |     while let Either::One(_t) = vr[0] { }
    |                           --    ^^^^^
@@ -227,13 +227,13 @@ LL |     while let Either::One(_t) = vr[0] { }
    |                           data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:112:27
+  --> $DIR/simple.rs:110:27
    |
 LL |     while let Either::One(_t) = vr[0] { }
    |                           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:116:11
+  --> $DIR/simple.rs:114:11
    |
 LL |     match vr[0] {
    |           ^^^^^
@@ -245,13 +245,13 @@ LL |         Either::One(_t)
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:120:21
+  --> $DIR/simple.rs:118:21
    |
 LL |         Either::One(_t)
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:123:11
+  --> $DIR/simple.rs:121:11
    |
 LL |     match vr[0] {
    |           ^^^^^
@@ -263,13 +263,13 @@ LL |         Either::One(_t) => (),
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:127:21
+  --> $DIR/simple.rs:125:21
    |
 LL |         Either::One(_t) => (),
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:132:17
+  --> $DIR/simple.rs:130:17
    |
 LL |     let X(_t) = vsm[0];
    |           --    ^^^^^^
@@ -279,13 +279,13 @@ LL |     let X(_t) = vsm[0];
    |           data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:132:11
+  --> $DIR/simple.rs:130:11
    |
 LL |     let X(_t) = vsm[0];
    |           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:136:30
+  --> $DIR/simple.rs:134:30
    |
 LL |     if let Either::One(_t) = vrm[0] { }
    |                        --    ^^^^^^
@@ -295,13 +295,13 @@ LL |     if let Either::One(_t) = vrm[0] { }
    |                        data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:136:24
+  --> $DIR/simple.rs:134:24
    |
 LL |     if let Either::One(_t) = vrm[0] { }
    |                        ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:140:33
+  --> $DIR/simple.rs:138:33
    |
 LL |     while let Either::One(_t) = vrm[0] { }
    |                           --    ^^^^^^
@@ -311,13 +311,13 @@ LL |     while let Either::One(_t) = vrm[0] { }
    |                           data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:140:27
+  --> $DIR/simple.rs:138:27
    |
 LL |     while let Either::One(_t) = vrm[0] { }
    |                           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:144:11
+  --> $DIR/simple.rs:142:11
    |
 LL |     match vrm[0] {
    |           ^^^^^^
@@ -329,13 +329,13 @@ LL |         Either::One(_t)
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:148:21
+  --> $DIR/simple.rs:146:21
    |
 LL |         Either::One(_t)
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:151:11
+  --> $DIR/simple.rs:149:11
    |
 LL |     match vrm[0] {
    |           ^^^^^^
@@ -347,13 +347,13 @@ LL |         Either::One(_t) => (),
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:155:21
+  --> $DIR/simple.rs:153:21
    |
 LL |         Either::One(_t) => (),
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:159:11
+  --> $DIR/simple.rs:157:11
    |
 LL |     match vrm[0] {
    |           ^^^^^^
@@ -365,13 +365,13 @@ LL |         Either::One(_t) => (),
    |                     -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:163:21
+  --> $DIR/simple.rs:161:21
    |
 LL |         Either::One(_t) => (),
    |                     ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:170:18
+  --> $DIR/simple.rs:168:18
    |
 LL |     let &X(_t) = s;
    |         ------   ^ cannot move out of borrowed content
@@ -380,13 +380,13 @@ LL |     let &X(_t) = s;
    |         help: consider removing the `&`: `X(_t)`
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:170:12
+  --> $DIR/simple.rs:168:12
    |
 LL |     let &X(_t) = s;
    |            ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:174:31
+  --> $DIR/simple.rs:172:31
    |
 LL |     if let &Either::One(_t) = r { }
    |            ----------------   ^ cannot move out of borrowed content
@@ -395,13 +395,13 @@ LL |     if let &Either::One(_t) = r { }
    |            help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:174:25
+  --> $DIR/simple.rs:172:25
    |
 LL |     if let &Either::One(_t) = r { }
    |                         ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:178:34
+  --> $DIR/simple.rs:176:34
    |
 LL |     while let &Either::One(_t) = r { }
    |               ----------------   ^ cannot move out of borrowed content
@@ -410,13 +410,13 @@ LL |     while let &Either::One(_t) = r { }
    |               help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:178:28
+  --> $DIR/simple.rs:176:28
    |
 LL |     while let &Either::One(_t) = r { }
    |                            ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:182:11
+  --> $DIR/simple.rs:180:11
    |
 LL |     match r {
    |           ^ cannot move out of borrowed content
@@ -428,13 +428,13 @@ LL |         &Either::One(_t)
    |         help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:184:22
+  --> $DIR/simple.rs:182:22
    |
 LL |         &Either::One(_t)
    |                      ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:190:11
+  --> $DIR/simple.rs:188:11
    |
 LL |     match r {
    |           ^ cannot move out of borrowed content
@@ -446,13 +446,13 @@ LL |         &Either::One(_t) => (),
    |         help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:192:22
+  --> $DIR/simple.rs:190:22
    |
 LL |         &Either::One(_t) => (),
    |                      ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:197:11
+  --> $DIR/simple.rs:195:11
    |
 LL |     match r {
    |           ^ cannot move out of borrowed content
@@ -464,13 +464,13 @@ LL |         &Either::One(_t) => (),
    |         help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:199:22
+  --> $DIR/simple.rs:197:22
    |
 LL |         &Either::One(_t) => (),
    |                      ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:209:22
+  --> $DIR/simple.rs:207:22
    |
 LL |     let &mut X(_t) = sm;
    |         ----------   ^^ cannot move out of borrowed content
@@ -479,13 +479,13 @@ LL |     let &mut X(_t) = sm;
    |         help: consider removing the `&mut`: `X(_t)`
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:209:16
+  --> $DIR/simple.rs:207:16
    |
 LL |     let &mut X(_t) = sm;
    |                ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:213:35
+  --> $DIR/simple.rs:211:35
    |
 LL |     if let &mut Either::One(_t) = rm { }
    |            --------------------   ^^ cannot move out of borrowed content
@@ -494,13 +494,13 @@ LL |     if let &mut Either::One(_t) = rm { }
    |            help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:213:29
+  --> $DIR/simple.rs:211:29
    |
 LL |     if let &mut Either::One(_t) = rm { }
    |                             ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:217:38
+  --> $DIR/simple.rs:215:38
    |
 LL |     while let &mut Either::One(_t) = rm { }
    |               --------------------   ^^ cannot move out of borrowed content
@@ -509,13 +509,13 @@ LL |     while let &mut Either::One(_t) = rm { }
    |               help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:217:32
+  --> $DIR/simple.rs:215:32
    |
 LL |     while let &mut Either::One(_t) = rm { }
    |                                ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:221:11
+  --> $DIR/simple.rs:219:11
    |
 LL |     match rm {
    |           ^^ cannot move out of borrowed content
@@ -527,7 +527,7 @@ LL |         &mut Either::Two(_t) => (),
    |                          -- ...and here
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/simple.rs:223:26
+  --> $DIR/simple.rs:221:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
@@ -544,7 +544,7 @@ LL |         Either::Two(_t) => (),
    |         ^^^^^^^^^^^^^^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:230:11
+  --> $DIR/simple.rs:228:11
    |
 LL |     match rm {
    |           ^^ cannot move out of borrowed content
@@ -556,13 +556,13 @@ LL |         &mut Either::One(_t) => (),
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:232:26
+  --> $DIR/simple.rs:230:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:237:11
+  --> $DIR/simple.rs:235:11
    |
 LL |     match rm {
    |           ^^ cannot move out of borrowed content
@@ -574,13 +574,13 @@ LL |         &mut Either::One(_t) => (),
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:239:26
+  --> $DIR/simple.rs:237:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:244:11
+  --> $DIR/simple.rs:242:11
    |
 LL |     match rm {
    |           ^^ cannot move out of borrowed content
@@ -592,13 +592,13 @@ LL |         &mut Either::One(_t) => (),
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:246:26
+  --> $DIR/simple.rs:244:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:260:21
+  --> $DIR/simple.rs:258:21
    |
 LL |     let (&X(_t),) = (&x.clone(),);
    |             --      ^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -606,13 +606,13 @@ LL |     let (&X(_t),) = (&x.clone(),);
    |             data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:260:13
+  --> $DIR/simple.rs:258:13
    |
 LL |     let (&X(_t),) = (&x.clone(),);
    |             ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:262:34
+  --> $DIR/simple.rs:260:34
    |
 LL |     if let (&Either::One(_t),) = (&e.clone(),) { }
    |                          --      ^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -620,13 +620,13 @@ LL |     if let (&Either::One(_t),) = (&e.clone(),) { }
    |                          data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:262:26
+  --> $DIR/simple.rs:260:26
    |
 LL |     if let (&Either::One(_t),) = (&e.clone(),) { }
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:264:37
+  --> $DIR/simple.rs:262:37
    |
 LL |     while let (&Either::One(_t),) = (&e.clone(),) { }
    |                             --      ^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -634,13 +634,13 @@ LL |     while let (&Either::One(_t),) = (&e.clone(),) { }
    |                             data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:264:29
+  --> $DIR/simple.rs:262:29
    |
 LL |     while let (&Either::One(_t),) = (&e.clone(),) { }
    |                             ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:266:11
+  --> $DIR/simple.rs:264:11
    |
 LL |     match (&e.clone(),) {
    |           ^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -649,13 +649,13 @@ LL |         (&Either::One(_t),)
    |                       -- data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:268:23
+  --> $DIR/simple.rs:266:23
    |
 LL |         (&Either::One(_t),)
    |                       ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:274:25
+  --> $DIR/simple.rs:272:25
    |
 LL |     let (&mut X(_t),) = (&mut xm.clone(),);
    |                 --      ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -663,13 +663,13 @@ LL |     let (&mut X(_t),) = (&mut xm.clone(),);
    |                 data moved here
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:274:17
+  --> $DIR/simple.rs:272:17
    |
 LL |     let (&mut X(_t),) = (&mut xm.clone(),);
    |                 ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:276:38
+  --> $DIR/simple.rs:274:38
    |
 LL |     if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
    |                              --      ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -677,13 +677,13 @@ LL |     if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
    |                              data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:276:30
+  --> $DIR/simple.rs:274:30
    |
 LL |     if let (&mut Either::One(_t),) = (&mut em.clone(),) { }
    |                              ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:278:41
+  --> $DIR/simple.rs:276:41
    |
 LL |     while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
    |                                 --      ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -691,13 +691,13 @@ LL |     while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
    |                                 data moved here
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:278:33
+  --> $DIR/simple.rs:276:33
    |
 LL |     while let (&mut Either::One(_t),) = (&mut em.clone(),) { }
    |                                 ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:280:11
+  --> $DIR/simple.rs:278:11
    |
 LL |     match (&mut em.clone(),) {
    |           ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
@@ -708,7 +708,7 @@ LL |         (&mut Either::Two(_t),) => (),
    |                           -- ...and here
    |
 note: move occurs because these variables have types that don't implement the `Copy` trait
-  --> $DIR/simple.rs:282:27
+  --> $DIR/simple.rs:280:27
    |
 LL |         (&mut Either::One(_t),) => (),
    |                           ^^
@@ -716,7 +716,7 @@ LL |         (&mut Either::Two(_t),) => (),
    |                           ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:290:18
+  --> $DIR/simple.rs:288:18
    |
 LL |     let &X(_t) = &x;
    |         ------   ^^ cannot move out of borrowed content
@@ -725,13 +725,13 @@ LL |     let &X(_t) = &x;
    |         help: consider removing the `&`: `X(_t)`
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:290:12
+  --> $DIR/simple.rs:288:12
    |
 LL |     let &X(_t) = &x;
    |            ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:294:31
+  --> $DIR/simple.rs:292:31
    |
 LL |     if let &Either::One(_t) = &e { }
    |            ----------------   ^^ cannot move out of borrowed content
@@ -740,13 +740,13 @@ LL |     if let &Either::One(_t) = &e { }
    |            help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:294:25
+  --> $DIR/simple.rs:292:25
    |
 LL |     if let &Either::One(_t) = &e { }
    |                         ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:298:34
+  --> $DIR/simple.rs:296:34
    |
 LL |     while let &Either::One(_t) = &e { }
    |               ----------------   ^^ cannot move out of borrowed content
@@ -755,13 +755,13 @@ LL |     while let &Either::One(_t) = &e { }
    |               help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:298:28
+  --> $DIR/simple.rs:296:28
    |
 LL |     while let &Either::One(_t) = &e { }
    |                            ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:302:11
+  --> $DIR/simple.rs:300:11
    |
 LL |     match &e {
    |           ^^ cannot move out of borrowed content
@@ -773,13 +773,13 @@ LL |         &Either::One(_t)
    |         help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:304:22
+  --> $DIR/simple.rs:302:22
    |
 LL |         &Either::One(_t)
    |                      ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:310:11
+  --> $DIR/simple.rs:308:11
    |
 LL |     match &e {
    |           ^^ cannot move out of borrowed content
@@ -791,13 +791,13 @@ LL |         &Either::One(_t) => (),
    |         help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:312:22
+  --> $DIR/simple.rs:310:22
    |
 LL |         &Either::One(_t) => (),
    |                      ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:317:11
+  --> $DIR/simple.rs:315:11
    |
 LL |     match &e {
    |           ^^ cannot move out of borrowed content
@@ -809,13 +809,13 @@ LL |         &Either::One(_t) => (),
    |         help: consider removing the `&`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:319:22
+  --> $DIR/simple.rs:317:22
    |
 LL |         &Either::One(_t) => (),
    |                      ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:325:22
+  --> $DIR/simple.rs:323:22
    |
 LL |     let &mut X(_t) = &mut xm;
    |         ----------   ^^^^^^^ cannot move out of borrowed content
@@ -824,13 +824,13 @@ LL |     let &mut X(_t) = &mut xm;
    |         help: consider removing the `&mut`: `X(_t)`
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:325:16
+  --> $DIR/simple.rs:323:16
    |
 LL |     let &mut X(_t) = &mut xm;
    |                ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:329:35
+  --> $DIR/simple.rs:327:35
    |
 LL |     if let &mut Either::One(_t) = &mut em { }
    |            --------------------   ^^^^^^^ cannot move out of borrowed content
@@ -839,13 +839,13 @@ LL |     if let &mut Either::One(_t) = &mut em { }
    |            help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:329:29
+  --> $DIR/simple.rs:327:29
    |
 LL |     if let &mut Either::One(_t) = &mut em { }
    |                             ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:333:38
+  --> $DIR/simple.rs:331:38
    |
 LL |     while let &mut Either::One(_t) = &mut em { }
    |               --------------------   ^^^^^^^ cannot move out of borrowed content
@@ -854,13 +854,13 @@ LL |     while let &mut Either::One(_t) = &mut em { }
    |               help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:333:32
+  --> $DIR/simple.rs:331:32
    |
 LL |     while let &mut Either::One(_t) = &mut em { }
    |                                ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:337:11
+  --> $DIR/simple.rs:335:11
    |
 LL |     match &mut em {
    |           ^^^^^^^ cannot move out of borrowed content
@@ -872,13 +872,13 @@ LL |         &mut Either::One(_t)
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:339:26
+  --> $DIR/simple.rs:337:26
    |
 LL |         &mut Either::One(_t)
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:345:11
+  --> $DIR/simple.rs:343:11
    |
 LL |     match &mut em {
    |           ^^^^^^^ cannot move out of borrowed content
@@ -890,13 +890,13 @@ LL |         &mut Either::One(_t) => (),
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:347:26
+  --> $DIR/simple.rs:345:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:352:11
+  --> $DIR/simple.rs:350:11
    |
 LL |     match &mut em {
    |           ^^^^^^^ cannot move out of borrowed content
@@ -908,13 +908,13 @@ LL |         &mut Either::One(_t) => (),
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:354:26
+  --> $DIR/simple.rs:352:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:359:11
+  --> $DIR/simple.rs:357:11
    |
 LL |     match &mut em {
    |           ^^^^^^^ cannot move out of borrowed content
@@ -926,13 +926,13 @@ LL |         &mut Either::One(_t) => (),
    |         help: consider removing the `&mut`: `Either::One(_t)`
    |
 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:361:26
+  --> $DIR/simple.rs:359:26
    |
 LL |         &mut Either::One(_t) => (),
    |                          ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:204:11
+  --> $DIR/simple.rs:202:11
    |
 LL |     fn f1(&X(_t): &X) { }
    |           ^^^--^
@@ -942,13 +942,13 @@ LL |     fn f1(&X(_t): &X) { }
    |           help: consider removing the `&`: `X(_t)`
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:204:14
+  --> $DIR/simple.rs:202:14
    |
 LL |     fn f1(&X(_t): &X) { }
    |              ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:251:11
+  --> $DIR/simple.rs:249:11
    |
 LL |     fn f2(&mut X(_t): &mut X) { }
    |           ^^^^^^^--^
@@ -958,13 +958,13 @@ LL |     fn f2(&mut X(_t): &mut X) { }
    |           help: consider removing the `&mut`: `X(_t)`
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:251:18
+  --> $DIR/simple.rs:249:18
    |
 LL |     fn f2(&mut X(_t): &mut X) { }
    |                  ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:271:11
+  --> $DIR/simple.rs:269:11
    |
 LL |     fn f3((&X(_t),): (&X,)) { }
    |           ^^^^--^^^
@@ -973,13 +973,13 @@ LL |     fn f3((&X(_t),): (&X,)) { }
    |           cannot move out of borrowed content
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:271:15
+  --> $DIR/simple.rs:269:15
    |
 LL |     fn f3((&X(_t),): (&X,)) { }
    |               ^^
 
 error[E0507]: cannot move out of borrowed content
-  --> $DIR/simple.rs:285:11
+  --> $DIR/simple.rs:283:11
    |
 LL |     fn f4((&mut X(_t),): (&mut X,)) { }
    |           ^^^^^^^^--^^^
@@ -988,7 +988,7 @@ LL |     fn f4((&mut X(_t),): (&mut X,)) { }
    |           cannot move out of borrowed content
    |
 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
-  --> $DIR/simple.rs:285:19
+  --> $DIR/simple.rs:283:19
    |
 LL |     fn f4((&mut X(_t),): (&mut X,)) { }
    |                   ^^
index b4a6fa39f9052ba22d3eddd4cc649a51153db528..d04113ffccc3a9b63c5b9177a9374f36e7161ca2 100644 (file)
@@ -1,5 +1,3 @@
-#![feature(nll)]
-
 struct X(usize);
 
 impl X {
index 3dd9fbc6f1480012a486f22b4d95bc5ae5184d2c..24143678757187454e6ec86e0e2039d72ee15673 100644 (file)
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `self.0` which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:9:9
+  --> $DIR/suggest-ref-mut.rs:7:9
    |
 LL |     fn zap(&self) {
    |            ----- help: consider changing this to be a mutable reference: `&mut self`
@@ -8,7 +8,7 @@ LL |         self.0 = 32;
    |         ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written
 
 error[E0594]: cannot assign to `*foo` which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:18:5
+  --> $DIR/suggest-ref-mut.rs:16:5
    |
 LL |     let ref foo = 16;
    |         ------- help: consider changing this to be a mutable reference: `ref mut foo`
@@ -17,7 +17,7 @@ LL |     *foo = 32;
    |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
 
 error[E0594]: cannot assign to `*bar` which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:23:9
+  --> $DIR/suggest-ref-mut.rs:21:9
    |
 LL |     if let Some(ref bar) = Some(16) {
    |                 ------- help: consider changing this to be a mutable reference: `ref mut bar`
@@ -26,7 +26,7 @@ LL |         *bar = 32;
    |         ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written
 
 error[E0594]: cannot assign to `*quo` which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:27:22
+  --> $DIR/suggest-ref-mut.rs:25:22
    |
 LL |         ref quo => { *quo = 32; },
    |         -------      ^^^^^^^^^ `quo` is a `&` reference, so the data it refers to cannot be written