]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-45696-scribble-on-boxed-borrow.rs
index 0d0d22f993fd3734091a95453a42662b7dd92ba4..f568efa487cd736857243428ea8de1e7a9bcde8c 100644 (file)
@@ -1,32 +1,20 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 // rust-lang/rust#45696: This test is checking that we *cannot* return
 // mutable borrows that would be scribbled over by destructors before
 // the return occurs.
 //
-// We will explicitly test AST-borrowck, NLL, and migration modes;
+// We will explicitly test NLL, and migration modes;
 // thus we will also skip the automated compare-mode=nll.
 
-// revisions: ast nll migrate
+// revisions: nll migrate
 // ignore-compare-mode-nll
 
-// This test is going to pass in the ast and migrate revisions,
-// because the AST-borrowck accepted this code in the past (see notes
-// below). So we use `#[rustc_error]` to keep the outcome as an error
-// in all scenarios, and rely on the stderr files to show what the
-// actual behavior is. (See rust-lang/rust#49855.)
+// This test is going to pass in the migrate revision, because the AST-borrowck
+// accepted this code in the past (see notes below). So we use `#[rustc_error]`
+// to keep the outcome as an error in all scenarios, and rely on the stderr
+// files to show what the actual behavior is. (See rust-lang/rust#49855.)
 #![feature(rustc_attrs)]
 
 #![cfg_attr(nll, feature(nll))]
-//[migrate]compile-flags: -Z borrowck=migrate -Z two-phase-borrows
 
 struct Scribble<'a>(&'a mut u32);
 
@@ -89,8 +77,7 @@ fn boxed_boxed_scribbled<'a>(s: Box<Box<Scribble<'a>>>) -> &'a mut u32 {
 }
 
 #[rustc_error]
-fn main() { //[ast]~ ERROR compilation successful
-     //[migrate]~^ ERROR compilation successful
+fn main() { //[migrate]~ ERROR compilation successful
     let mut x = 1;
     {
         let mut long_lived = Scribble(&mut x);