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] 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 ee74a054408..248e34bde09 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 302a7b96bc0..fa79ac84c86 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 b6c2a3a61ea..86875a038da 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 1d7230510df..b85a9baf5a0 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 b716a1a27a1..72634651d95 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 5b15c8f0797..8c6d92c9962 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 a465c9cf811..a3d6f129f18 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 0e33351894d..baefdf657ea 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 380bd398a7c..0ddb71d1d15 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 f1f0274c5cc..4ec7e0a5898 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 fb30c85e709..7395fcd7171 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 c3645867117..180a6ad8f87 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 f57a7bd7add..4650ce8d2c4 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 ec868bc5c85..87dd1f1de53 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 4699f376313..b616cf25382 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 8de45e4205d..3b9c4aed03e 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 e0a5db678d2..1ce7a00d423 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 93cb0cb0af2..936e5565eed 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 59a5fea769a..dd832b9eee0 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 48d16102ff3..e7c1699f7b4 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 d51d0b1d2e1..809948d5423 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 0bfa8f48650..cf7a976628e 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 0ec87599c63..f9b650e0e82 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 2e8ddb08064..431d50a80c7 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 de411d30960..aba46ad609f 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 7f1b6ed1701..15eaf83b508 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 8c94df6dbf4..10809c1bb0b 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 ca15591a101..561a5b3c115 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 1b2529d7875..ce601bc9a3c 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 35a5422040a..6d06d0c7941 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