From 65780bc0c70f9a0282569c04cbdb9124bf59d5a2 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Mon, 3 Sep 2018 11:06:00 +0200 Subject: [PATCH 1/3] Migrated `src/test/run-pass/borrowck` to `src/test/ui/run-pass`. Just shuffling files here; the needed updates to content come later. --- .../{ => ui}/run-pass/borrowck/borrowck-assign-to-subfield.rs | 0 .../run-pass/borrowck/borrowck-assignment-to-static-mut.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-binding-mutbl.rs | 0 .../{ => ui}/run-pass/borrowck/borrowck-borrow-from-expr-block.rs | 0 .../run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-closures-two-imm.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-field-sensitivity.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-fixed-length-vecs.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-freeze-frozen-mut.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-lend-args.rs | 0 .../run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs | 0 .../{ => ui}/run-pass/borrowck/borrowck-move-by-capture-ok.rs | 0 .../run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-mut-uniq.rs | 0 .../{ => ui}/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-pat-enum.rs | 0 .../run-pass/borrowck/borrowck-pat-reassign-no-binding.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-rvalues-mutable.rs | 0 .../run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs | 0 .../run-pass/borrowck/borrowck-slice-pattern-element-loan.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-static-item-in-fn.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-trait-lifetime.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-uniq-via-ref.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-univariant-enum.rs | 0 .../run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-unused-mut-locals.rs | 0 src/test/{ => ui}/run-pass/borrowck/borrowck-use-mut-borrow.rs | 0 src/test/{ => ui}/run-pass/borrowck/two-phase-baseline.rs | 0 src/test/{ => ui}/run-pass/borrowck/two-phase-bin-ops.rs | 0 .../borrowck/two-phase-control-flow-split-before-activation.rs | 0 30 files changed, 0 insertions(+), 0 deletions(-) rename src/test/{ => ui}/run-pass/borrowck/borrowck-assign-to-subfield.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-assignment-to-static-mut.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-binding-mutbl.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-borrow-from-expr-block.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-closures-two-imm.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-field-sensitivity.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-fixed-length-vecs.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-freeze-frozen-mut.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-lend-args.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-move-by-capture-ok.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-mut-uniq.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-pat-enum.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-rvalues-mutable.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-static-item-in-fn.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-trait-lifetime.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-uniq-via-ref.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-univariant-enum.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-unused-mut-locals.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/borrowck-use-mut-borrow.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/two-phase-baseline.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/two-phase-bin-ops.rs (100%) rename src/test/{ => ui}/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs (100%) diff --git a/src/test/run-pass/borrowck/borrowck-assign-to-subfield.rs b/src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-assign-to-subfield.rs rename to src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs diff --git a/src/test/run-pass/borrowck/borrowck-assignment-to-static-mut.rs b/src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-assignment-to-static-mut.rs rename to src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs diff --git a/src/test/run-pass/borrowck/borrowck-binding-mutbl.rs b/src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-binding-mutbl.rs rename to src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs diff --git a/src/test/run-pass/borrowck/borrowck-borrow-from-expr-block.rs b/src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-borrow-from-expr-block.rs rename to src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs diff --git a/src/test/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs b/src/test/ui/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs rename to src/test/ui/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs diff --git a/src/test/run-pass/borrowck/borrowck-closures-two-imm.rs b/src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-closures-two-imm.rs rename to src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs diff --git a/src/test/run-pass/borrowck/borrowck-field-sensitivity.rs b/src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-field-sensitivity.rs rename to src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs diff --git a/src/test/run-pass/borrowck/borrowck-fixed-length-vecs.rs b/src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-fixed-length-vecs.rs rename to src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs diff --git a/src/test/run-pass/borrowck/borrowck-freeze-frozen-mut.rs b/src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-freeze-frozen-mut.rs rename to src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs diff --git a/src/test/run-pass/borrowck/borrowck-lend-args.rs b/src/test/ui/run-pass/borrowck/borrowck-lend-args.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-lend-args.rs rename to src/test/ui/run-pass/borrowck/borrowck-lend-args.rs diff --git a/src/test/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs b/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs rename to src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs diff --git a/src/test/run-pass/borrowck/borrowck-move-by-capture-ok.rs b/src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-move-by-capture-ok.rs rename to src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs diff --git a/src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs b/src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs rename to src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs diff --git a/src/test/run-pass/borrowck/borrowck-mut-uniq.rs b/src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-mut-uniq.rs rename to src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs diff --git a/src/test/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs b/src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs rename to src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs diff --git a/src/test/run-pass/borrowck/borrowck-pat-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-pat-enum.rs rename to src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs diff --git a/src/test/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs b/src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs rename to src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs diff --git a/src/test/run-pass/borrowck/borrowck-rvalues-mutable.rs b/src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-rvalues-mutable.rs rename to src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs diff --git a/src/test/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs b/src/test/ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs rename to src/test/ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs diff --git a/src/test/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs b/src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs rename to src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs diff --git a/src/test/run-pass/borrowck/borrowck-static-item-in-fn.rs b/src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-static-item-in-fn.rs rename to src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs diff --git a/src/test/run-pass/borrowck/borrowck-trait-lifetime.rs b/src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-trait-lifetime.rs rename to src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs diff --git a/src/test/run-pass/borrowck/borrowck-uniq-via-ref.rs b/src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-uniq-via-ref.rs rename to src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs diff --git a/src/test/run-pass/borrowck/borrowck-univariant-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-univariant-enum.rs rename to src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs diff --git a/src/test/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs b/src/test/ui/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs rename to src/test/ui/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs diff --git a/src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs b/src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-unused-mut-locals.rs rename to src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs diff --git a/src/test/run-pass/borrowck/borrowck-use-mut-borrow.rs b/src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs similarity index 100% rename from src/test/run-pass/borrowck/borrowck-use-mut-borrow.rs rename to src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs diff --git a/src/test/run-pass/borrowck/two-phase-baseline.rs b/src/test/ui/run-pass/borrowck/two-phase-baseline.rs similarity index 100% rename from src/test/run-pass/borrowck/two-phase-baseline.rs rename to src/test/ui/run-pass/borrowck/two-phase-baseline.rs diff --git a/src/test/run-pass/borrowck/two-phase-bin-ops.rs b/src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs similarity index 100% rename from src/test/run-pass/borrowck/two-phase-bin-ops.rs rename to src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs diff --git a/src/test/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs b/src/test/ui/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs similarity index 100% rename from src/test/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs rename to src/test/ui/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs From 4a7c8cc4b9b65650639261d892a02fab0da33bfd Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Tue, 4 Sep 2018 12:05:53 +0200 Subject: [PATCH 2/3] Add `// run-pass` to collection of tests. --- src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs | 1 + .../ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs | 2 ++ .../ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs | 1 + .../run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-lend-args.rs | 1 + .../run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs | 1 + .../borrowck/borrowck-multiple-borrows-interior-boxes.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs | 1 + .../ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs | 1 + .../ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs | 1 + .../ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs | 2 +- .../run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs | 1 + src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs | 1 + src/test/ui/run-pass/borrowck/two-phase-baseline.rs | 1 + src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs | 1 + .../borrowck/two-phase-control-flow-split-before-activation.rs | 1 + 30 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs b/src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs index ee74a0544084..248e34bde09c 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-assign-to-subfield.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // pretty-expanded FIXME #23616 pub fn main() { diff --git a/src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs b/src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs index 302a7b96bc07..fa79ac84c865 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641) // revisions: ast mir diff --git a/src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs b/src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs index b6c2a3a61ea4..86875a038daa 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass + struct F { f: Vec } fn impure(_v: &[isize]) { diff --git a/src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs b/src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs index 1d7230510df2..b85a9baf5a0a 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass #![feature(box_syntax)] fn borrow(x: &isize, f: F) where F: FnOnce(&isize) { diff --git a/src/test/ui/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs b/src/test/ui/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs index b716a1a27a19..72634651d959 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-borrow-of-mut-base-ptr-safe.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Test that freezing an `&mut` pointer while referent is // frozen is legal. // diff --git a/src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs b/src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs index 5b15c8f0797f..8c6d92c99626 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Tests that two closures can simultaneously have immutable // access to the variable, whether that immutable access be used // for direct reads or for taking immutable ref. Also check diff --git a/src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs b/src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs index a465c9cf811a..a3d6f129f183 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // pretty-expanded FIXME #23616 #![feature(box_syntax)] diff --git a/src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs b/src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs index 0e33351894d1..baefdf657ea3 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass pub fn main() { let x = [22]; diff --git a/src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs b/src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs index 380bd398a7cb..0ddb71d1d158 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Test that a `&mut` inside of an `&` is freezable. diff --git a/src/test/ui/run-pass/borrowck/borrowck-lend-args.rs b/src/test/ui/run-pass/borrowck/borrowck-lend-args.rs index f1f0274c5cc4..4ec7e0a58983 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-lend-args.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-lend-args.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // pretty-expanded FIXME #23616 diff --git a/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs b/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs index fb30c85e7096..7395fcd71715 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Check that we do not ICE when compiling this // macro, which reuses the expression `$id` diff --git a/src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs b/src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs index c3645867117d..180a6ad8f87f 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass #![feature(box_syntax)] pub fn main() { diff --git a/src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs b/src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs index f57a7bd7add4..4650ce8d2c42 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Test case from #39963. #![feature(nll)] diff --git a/src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs b/src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs index ec868bc5c85e..87dd1f1de537 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass #![feature(box_syntax)] use std::mem::swap; diff --git a/src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs b/src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs index 4699f376313b..b616cf253821 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-mut-vec-as-imm-slice.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass fn want_slice(v: &[isize]) -> isize { diff --git a/src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs index 8de45e4205df..3b9c4aed03ec 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // ignore-pretty issue #37199 fn match_ref(v: Option) -> isize { diff --git a/src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs b/src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs index e0a5db678d2f..1ce7a00d4235 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass pub fn main() { let mut x = None; diff --git a/src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs b/src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs index 93cb0cb0af23..936e5565eed6 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass struct Counter { value: usize diff --git a/src/test/ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs b/src/test/ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs index 59a5fea769a6..dd832b9eee08 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-scope-of-deref-issue-4666.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Tests that the scope of the pointer returned from `get()` is // limited to the deref operation itself, and does not infect the // block as a whole. diff --git a/src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs b/src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs index 48d16102ff3c..e7c1699f7b41 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass //compile-flags: -Z borrowck=mir #![feature(slice_patterns)] diff --git a/src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs b/src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs index d51d0b1d2e1f..809948d5423d 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // Regression test for issue #7740 // pretty-expanded FIXME #23616 diff --git a/src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs b/src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs index 0bfa8f48650b..cf7a976628e8 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // This test verifies that casting from the same lifetime on a value // to the same lifetime on a trait succeeds. See issue #10766. diff --git a/src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs b/src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs index 0ec87599c639..f9b650e0e828 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // pretty-expanded FIXME #23616 diff --git a/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs index 2e8ddb080647..431d50a80c77 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - +// run-pass use std::cell::Cell; diff --git a/src/test/ui/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs b/src/test/ui/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs index de411d309609..aba46ad609f7 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-unsafe-static-mutable-borrows.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // revisions: ast mir //[mir]compile-flags: -Z borrowck=mir diff --git a/src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs b/src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs index 7f1b6ed17016..15eaf83b5084 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass #![feature(nll)] #![deny(unused_mut)] diff --git a/src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs b/src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs index 8c94df6dbf45..10809c1bb0be 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // pretty-expanded FIXME #23616 #![feature(box_syntax)] diff --git a/src/test/ui/run-pass/borrowck/two-phase-baseline.rs b/src/test/ui/run-pass/borrowck/two-phase-baseline.rs index ca15591a1019..561a5b3c1151 100644 --- a/src/test/ui/run-pass/borrowck/two-phase-baseline.rs +++ b/src/test/ui/run-pass/borrowck/two-phase-baseline.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // compile-flags: -Z borrowck=mir -Z two-phase-borrows // This is the "goto example" for why we want two phase borrows. diff --git a/src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs b/src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs index 1b2529d7875a..ce601bc9a3c2 100644 --- a/src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs +++ b/src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // revisions: lxl nll #![cfg_attr(nll, feature(nll))] diff --git a/src/test/ui/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs b/src/test/ui/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs index 35a5422040a1..6d06d0c7941b 100644 --- a/src/test/ui/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs +++ b/src/test/ui/run-pass/borrowck/two-phase-control-flow-split-before-activation.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// run-pass // revisions: lxl nll //[lxl]compile-flags: -Z borrowck=mir -Z two-phase-borrows From ff8f1a3b94302c91de1d23a9df7461fbc1d491ec Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 6 Sep 2018 13:51:09 +0200 Subject: [PATCH 3/3] Allow some lints to let the ported run-pass/borrowck tests get through. --- .../run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs | 2 ++ src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs b/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs index 7395fcd71715..3f81c2e5619e 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs @@ -9,6 +9,8 @@ // except according to those terms. // run-pass +#![allow(unconditional_recursion)] + // Check that we do not ICE when compiling this // macro, which reuses the expression `$id` diff --git a/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs index 431d50a80c77..0a8d30753362 100644 --- a/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs @@ -9,6 +9,7 @@ // except according to those terms. // run-pass +#![allow(non_camel_case_types)] use std::cell::Cell;