Skip to content

Commit 715a0cd

Browse files
pcwaltonpnkfelix
authored andcommitted
Make RScopes structs non-copyable.
1 parent f61b4af commit 715a0cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc/middle/typeck/rscope.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use middle::ty;
1313

1414
use std::cell::Cell;
15+
use std::kinds::marker::NoCopy;
1516
use syntax::ast;
1617
use syntax::codemap::Span;
1718

@@ -49,13 +50,15 @@ impl RegionScope for ExplicitRscope {
4950
pub struct BindingRscope {
5051
binder_id: ast::NodeId,
5152
anon_bindings: Cell<uint>,
53+
noncopyable: NoCopy,
5254
}
5355

5456
impl BindingRscope {
5557
pub fn new(binder_id: ast::NodeId) -> BindingRscope {
5658
BindingRscope {
5759
binder_id: binder_id,
5860
anon_bindings: Cell::new(0),
61+
noncopyable: NoCopy,
5962
}
6063
}
6164
}

0 commit comments

Comments
 (0)