Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 1a94020

Browse files
committed
Rustup to rustc 1.3.0-nightly (bf3c979ec 2015-06-30)
1 parent d4803e6 commit 1a94020

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "tenacious"
4-
version = "0.0.5"
4+
version = "0.0.6"
55
authors = ["Manish Goregaokar <[email protected]>"]
66
description = "A plugin to prevent certain types from being moved"
77
repository = "https://github.com/Manishearth/rust-tenacious"

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl LintPass for TenaciousPass {
5151
};
5252
if item.attrs.iter().all(|a| !a.check_name("no_move")) {
5353
for ref field in def.fields.iter() {
54-
if is_ty_no_move(cx.tcx, ty::node_id_to_type(cx.tcx, field.node.id)) {
54+
if is_ty_no_move(cx.tcx, cx.tcx.node_id_to_type(field.node.id)) {
5555
cx.span_lint(MOVED_NO_MOVE, field.span,
5656
"Structs containing #[no_move] fields should be marked #[no_move]")
5757
}
@@ -63,7 +63,7 @@ impl LintPass for TenaciousPass {
6363
if map.expect_item(map.get_parent(var.node.id)).attrs.iter().all(|a| !a.check_name("no_move")) {
6464
match var.node.kind {
6565
TupleVariantKind(_) => {
66-
if is_ty_no_move(cx.tcx, ty::node_id_to_type(cx.tcx, var.node.id)) {
66+
if is_ty_no_move(cx.tcx, cx.tcx.node_id_to_type(var.node.id)) {
6767
cx.span_lint(MOVED_NO_MOVE, var.span,
6868
"Enums containing #[no_move] fields should be marked #[no_move]")
6969
}
@@ -125,10 +125,10 @@ impl<'a, 'tcx: 'a> euv::Delegate<'tcx> for TenaciousDelegate<'a, 'tcx> {
125125

126126
fn is_ty_no_move(tcx: &ty::ctxt, t: ty::Ty) -> bool {
127127
let mut found = false;
128-
ty::maybe_walk_ty(t, |ty| {
128+
t.maybe_walk(|ty| {
129129
match ty.sty {
130130
ty::TyStruct(did, _) | ty::TyEnum(did, _) => {
131-
if ty::has_attr(tcx, did, "no_move") {
131+
if tcx.has_attr(did, "no_move") {
132132
found = true;
133133
return false;
134134
}

0 commit comments

Comments
 (0)