Skip to content

Commit

Permalink
Remove rustc_mir_borrowck attribute and use rustc_mir instead
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Jul 5, 2018
1 parent eded1aa commit 0e31e2f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/mod.rs
Expand Up @@ -80,7 +80,7 @@ fn mir_borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> BorrowC
let mut return_early;

// Return early if we are not supposed to use MIR borrow checker for this function.
return_early = !tcx.has_attr(def_id, "rustc_mir_borrowck") && !tcx.use_mir_borrowck();
return_early = !tcx.has_attr(def_id, "rustc_mir") && !tcx.use_mir_borrowck();

if tcx.is_struct_constructor(def_id) {
// We are not borrow checking the automatically generated struct constructors
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/rustc_peek.rs
Expand Up @@ -36,7 +36,7 @@ impl MirPass for SanityCheck {
src: MirSource, mir: &mut Mir<'tcx>) {
let def_id = src.def_id;
let id = tcx.hir.as_local_node_id(def_id).unwrap();
if !tcx.has_attr(def_id, "rustc_mir_borrowck") {
if !tcx.has_attr(def_id, "rustc_mir") {
debug!("skipping rustc_peek::SanityCheck on {}", tcx.item_path_str(def_id));
return;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/mir-dataflow/def-inits-1.rs
Expand Up @@ -10,14 +10,14 @@

// General test of maybe_uninits state computed by MIR dataflow.

#![feature(nll)]
#![feature(core_intrinsics, rustc_attrs)]

use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

struct S(i32);

#[rustc_mir_borrowck]
#[rustc_mir(rustc_peek_definite_init,stop_after_dataflow)]
fn foo(test: bool, x: &mut S, y: S, mut z: S) -> S {
let ret;
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/mir-dataflow/inits-1.rs
Expand Up @@ -10,14 +10,14 @@

// General test of maybe_inits state computed by MIR dataflow.

#![feature(nll)]
#![feature(core_intrinsics, rustc_attrs)]

use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

struct S(i32);

#[rustc_mir_borrowck]
#[rustc_mir(rustc_peek_maybe_init,stop_after_dataflow)]
fn foo(test: bool, x: &mut S, y: S, mut z: S) -> S {
let ret;
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/mir-dataflow/uninits-1.rs
Expand Up @@ -10,14 +10,14 @@

// General test of maybe_uninits state computed by MIR dataflow.

#![feature(nll)]
#![feature(core_intrinsics, rustc_attrs)]

use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

struct S(i32);

#[rustc_mir_borrowck]
#[rustc_mir(rustc_peek_maybe_uninit,stop_after_dataflow)]
fn foo(test: bool, x: &mut S, y: S, mut z: S) -> S {
let ret;
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/mir-dataflow/uninits-2.rs
Expand Up @@ -10,14 +10,14 @@

// General test of maybe_uninits state computed by MIR dataflow.

#![feature(nll)]
#![feature(core_intrinsics, rustc_attrs)]

use std::intrinsics::rustc_peek;
use std::mem::{drop, replace};

struct S(i32);

#[rustc_mir_borrowck]
#[rustc_mir(rustc_peek_maybe_uninit,stop_after_dataflow)]
fn foo(x: &mut S) {
// `x` is initialized here, so maybe-uninit bit is 0.
Expand Down

0 comments on commit 0e31e2f

Please sign in to comment.