Skip to content

Commit

Permalink
Work around rust-lang#16994
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Sep 4, 2014
1 parent a6eb263 commit c4bd9da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc/lint/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ impl LintStore {
}

pub fn get_lint_groups<'t>(&'t self) -> Vec<(&'static str, Vec<LintId>, bool)> {
self.lint_groups.iter().map(|(k, &(ref v, b))| (*k, v.clone(), b)).collect()
self.lint_groups.iter().map(|(k, v)| (*k,
v.ref0().clone(),
*v.ref1())).collect()
}

pub fn register_pass(&mut self, sess: Option<&Session>,
Expand Down Expand Up @@ -210,7 +212,7 @@ impl LintStore {
match self.by_name.find_equiv(&lint_name.as_slice()) {
Some(&lint_id) => self.set_level(lint_id, (level, CommandLine)),
None => {
match self.lint_groups.iter().map(|(&x, &(ref y, _))| (x, y.clone()))
match self.lint_groups.iter().map(|(&x, pair)| (x, pair.ref0().clone()))
.collect::<HashMap<&'static str, Vec<LintId>>>()
.find_equiv(&lint_name.as_slice()) {
Some(v) => {
Expand Down

0 comments on commit c4bd9da

Please sign in to comment.