diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.ast.stderr similarity index 100% rename from src/test/ui/borrowck/borrowck-box-insensitivity.stderr rename to src/test/ui/borrowck/borrowck-box-insensitivity.ast.stderr diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr b/src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr new file mode 100644 index 0000000000000000000000000000000000000000..0e380e90e75915b5f12f7df4a26414b267c3444e --- /dev/null +++ b/src/test/ui/borrowck/borrowck-box-insensitivity.mir.stderr @@ -0,0 +1,14 @@ +error: compilation successful + --> $DIR/borrowck-box-insensitivity.rs:160:1 + | +LL | / fn main() { +LL | | copy_after_move(); +LL | | move_after_move(); +LL | | borrow_after_move(); +... | +LL | | mut_borrow_after_borrow_nested(); +LL | | } + | |_^ + +error: aborting due to previous error + diff --git a/src/test/ui/borrowck/borrowck-box-insensitivity.rs b/src/test/ui/borrowck/borrowck-box-insensitivity.rs index 5efc414da7731219c1f3de32e95ad6a3a07ce082..1f1a7ea5ad9c192d9e21a32bcc97ad77b086ff9a 100644 --- a/src/test/ui/borrowck/borrowck-box-insensitivity.rs +++ b/src/test/ui/borrowck/borrowck-box-insensitivity.rs @@ -1,13 +1,13 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. +// This test is an artifact of the old policy that `Box` should not +// be treated specially by the AST-borrowck. // -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// NLL goes back to treating `Box` specially (namely, knowing that +// it uniquely owns the data it holds). See rust-lang/rfcs#130. +// revisions: ast mir +//[ast] compile-flags: -Z borrowck=ast +//[mir] compile-flags: -Z borrowck=mir +// ignore-compare-mode-nll #![feature(box_syntax, rustc_attrs)] struct A {