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 98% 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 index ee74a0544084e..248e34bde09ca 100644 --- a/src/test/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/run-pass/borrowck/borrowck-assignment-to-static-mut.rs b/src/test/ui/run-pass/borrowck/borrowck-assignment-to-static-mut.rs similarity index 98% 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 index 302a7b96bc07d..fa79ac84c8652 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-binding-mutbl.rs b/src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs similarity index 98% rename from src/test/run-pass/borrowck/borrowck-binding-mutbl.rs rename to src/test/ui/run-pass/borrowck/borrowck-binding-mutbl.rs index b6c2a3a61ea4f..86875a038daae 100644 --- a/src/test/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/run-pass/borrowck/borrowck-borrow-from-expr-block.rs b/src/test/ui/run-pass/borrowck/borrowck-borrow-from-expr-block.rs similarity index 98% 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 index 1d7230510df2b..b85a9baf5a0a3 100644 --- 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 @@ -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/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 98% 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 index b716a1a27a195..72634651d9593 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-closures-two-imm.rs b/src/test/ui/run-pass/borrowck/borrowck-closures-two-imm.rs similarity index 99% 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 index 5b15c8f0797fa..8c6d92c996263 100644 --- a/src/test/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/run-pass/borrowck/borrowck-field-sensitivity.rs b/src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs similarity index 99% rename from src/test/run-pass/borrowck/borrowck-field-sensitivity.rs rename to src/test/ui/run-pass/borrowck/borrowck-field-sensitivity.rs index a465c9cf811aa..a3d6f129f183e 100644 --- a/src/test/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/run-pass/borrowck/borrowck-fixed-length-vecs.rs b/src/test/ui/run-pass/borrowck/borrowck-fixed-length-vecs.rs similarity index 97% 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 index 0e33351894d14..baefdf657ea36 100644 --- a/src/test/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/run-pass/borrowck/borrowck-freeze-frozen-mut.rs b/src/test/ui/run-pass/borrowck/borrowck-freeze-frozen-mut.rs similarity index 98% 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 index 380bd398a7cb2..0ddb71d1d1587 100644 --- a/src/test/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/run-pass/borrowck/borrowck-lend-args.rs b/src/test/ui/run-pass/borrowck/borrowck-lend-args.rs similarity index 98% rename from src/test/run-pass/borrowck/borrowck-lend-args.rs rename to src/test/ui/run-pass/borrowck/borrowck-lend-args.rs index f1f0274c5cc48..4ec7e0a58983e 100644 --- a/src/test/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/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs b/src/test/ui/run-pass/borrowck/borrowck-macro-interaction-issue-6304.rs similarity index 95% 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 index fb30c85e70963..3f81c2e5619e0 100644 --- 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 @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // 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/run-pass/borrowck/borrowck-move-by-capture-ok.rs b/src/test/ui/run-pass/borrowck/borrowck-move-by-capture-ok.rs similarity index 98% 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 index c3645867117d2..180a6ad8f87f4 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs b/src/test/ui/run-pass/borrowck/borrowck-multiple-borrows-interior-boxes.rs similarity index 98% 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 index f57a7bd7add44..4650ce8d2c42f 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-mut-uniq.rs b/src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs similarity index 98% rename from src/test/run-pass/borrowck/borrowck-mut-uniq.rs rename to src/test/ui/run-pass/borrowck/borrowck-mut-uniq.rs index ec868bc5c85ef..87dd1f1de537e 100644 --- a/src/test/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/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 98% 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 index 4699f376313ba..b616cf2538218 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-pat-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs similarity index 98% rename from src/test/run-pass/borrowck/borrowck-pat-enum.rs rename to src/test/ui/run-pass/borrowck/borrowck-pat-enum.rs index 8de45e4205dfb..3b9c4aed03ec1 100644 --- a/src/test/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/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs b/src/test/ui/run-pass/borrowck/borrowck-pat-reassign-no-binding.rs similarity index 98% 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 index e0a5db678d2f4..1ce7a00d4235d 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-rvalues-mutable.rs b/src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs similarity index 98% rename from src/test/run-pass/borrowck/borrowck-rvalues-mutable.rs rename to src/test/ui/run-pass/borrowck/borrowck-rvalues-mutable.rs index 93cb0cb0af23a..936e5565eed6f 100644 --- a/src/test/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/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 99% 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 index 59a5fea769a6f..dd832b9eee08c 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs b/src/test/ui/run-pass/borrowck/borrowck-slice-pattern-element-loan.rs similarity index 98% 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 index 48d16102ff3c2..e7c1699f7b413 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-static-item-in-fn.rs b/src/test/ui/run-pass/borrowck/borrowck-static-item-in-fn.rs similarity index 98% 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 index d51d0b1d2e1fd..809948d5423d6 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-trait-lifetime.rs b/src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs similarity index 98% rename from src/test/run-pass/borrowck/borrowck-trait-lifetime.rs rename to src/test/ui/run-pass/borrowck/borrowck-trait-lifetime.rs index 0bfa8f48650bb..cf7a976628e8d 100644 --- a/src/test/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/run-pass/borrowck/borrowck-uniq-via-ref.rs b/src/test/ui/run-pass/borrowck/borrowck-uniq-via-ref.rs similarity index 98% 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 index 0ec87599c6391..f9b650e0e8280 100644 --- a/src/test/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/run-pass/borrowck/borrowck-univariant-enum.rs b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs similarity index 95% rename from src/test/run-pass/borrowck/borrowck-univariant-enum.rs rename to src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs index 2e8ddb0806472..0a8d307533627 100644 --- a/src/test/run-pass/borrowck/borrowck-univariant-enum.rs +++ b/src/test/ui/run-pass/borrowck/borrowck-univariant-enum.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - +// run-pass +#![allow(non_camel_case_types)] use std::cell::Cell; 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 98% 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 index de411d3096092..aba46ad609f76 100644 --- 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 @@ -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/run-pass/borrowck/borrowck-unused-mut-locals.rs b/src/test/ui/run-pass/borrowck/borrowck-unused-mut-locals.rs similarity index 98% 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 index 7f1b6ed170168..15eaf83b50847 100644 --- a/src/test/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/run-pass/borrowck/borrowck-use-mut-borrow.rs b/src/test/ui/run-pass/borrowck/borrowck-use-mut-borrow.rs similarity index 99% 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 index 8c94df6dbf454..10809c1bb0be6 100644 --- a/src/test/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/run-pass/borrowck/two-phase-baseline.rs b/src/test/ui/run-pass/borrowck/two-phase-baseline.rs similarity index 98% rename from src/test/run-pass/borrowck/two-phase-baseline.rs rename to src/test/ui/run-pass/borrowck/two-phase-baseline.rs index ca15591a10192..561a5b3c1151b 100644 --- a/src/test/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/run-pass/borrowck/two-phase-bin-ops.rs b/src/test/ui/run-pass/borrowck/two-phase-bin-ops.rs similarity index 99% 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 index 1b2529d7875ab..ce601bc9a3c23 100644 --- a/src/test/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/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 98% 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 index 35a5422040a17..6d06d0c7941be 100644 --- 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 @@ -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