提交 6659ae7d 编写于 作者: P Patrick Walton

librustc: De-`@mut` `Rib::self_binding`

上级 d1e23aeb
......@@ -285,7 +285,7 @@ enum DuplicateCheckingMode {
/// One local scope.
struct Rib {
bindings: RefCell<HashMap<Name, DefLike>>,
self_binding: @mut Option<DefLike>,
self_binding: RefCell<Option<DefLike>>,
kind: RibKind,
}
......@@ -293,7 +293,7 @@ impl Rib {
fn new(kind: RibKind) -> Rib {
Rib {
bindings: RefCell::new(HashMap::new()),
self_binding: @mut None,
self_binding: RefCell::new(None),
kind: kind
}
}
......@@ -3883,7 +3883,7 @@ fn resolve_function(&mut self,
_ => false
};
let def_like = DlDef(DefSelf(self_node_id, mutable));
*function_value_rib.self_binding = Some(def_like);
function_value_rib.self_binding.set(Some(def_like));
}
}
......@@ -4947,7 +4947,7 @@ fn resolve_self_value_in_local_ribs(&mut self, span: Span)
let mut i = self.value_ribs.len();
while i != 0 {
i -= 1;
match *self.value_ribs[i].self_binding {
match self.value_ribs[i].self_binding.get() {
Some(def_like) => {
match self.upvarify(self.value_ribs,
i,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册