summaryrefslogtreecommitdiff
path: root/src/parser.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-07-09 13:02:56 -0700
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-07-10 14:00:39 -0700
commit32313ecece3cb76b2e7de7b49cc9c07553a23e9b (patch)
treeb91d1073e14db02114f848a2f22ea7d33957249c /src/parser.rs
parent97a6593e89e3844d140bc2837f58e5afd6492852 (diff)
hack: Use a local clone of refcell to not depend on borrow_state
This is the same that we do in components/style in servo.
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 3004eb40..12047213 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1,7 +1,7 @@
#![allow(non_upper_case_globals)]
use std::collections::{HashMap, HashSet};
-use std::cell::RefCell;
+use hacks::refcell::RefCell;
use std::rc::Rc;
use std::path::Path;
use std::cmp;
@@ -393,7 +393,7 @@ fn conv_decl_ty_resolving_typedefs(ctx: &mut ClangParserCtx,
// We might incur in double borrows here. If that's the case, we're
// already scanning the compinfo, and we'd get the args from the
// ast.
- use std::cell::BorrowState;
+ use hacks::refcell::BorrowState;
if !args.is_empty() && ci.borrow_state() == BorrowState::Unused {
ci.borrow_mut().args = args;
@@ -607,7 +607,7 @@ fn visit_composite(cursor: &Cursor, parent: &Cursor,
is_class_typedef);
- use std::cell::BorrowState;
+ use hacks::refcell::BorrowState;
if let Some(child_ci) = ty.get_outermost_composite() {
if let BorrowState::Unused = child_ci.borrow_state() {
let mut child_ci = child_ci.borrow_mut();