Skip to content

Commit c4bd9da

Browse files
committed
Work around rust-lang#16994
1 parent a6eb263 commit c4bd9da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc/lint/context.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ impl LintStore {
103103
}
104104

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

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

0 commit comments

Comments
 (0)