Work around inability to link lifetime of ref bindings (#16994)
This commit is contained in:
parent
27f87c611f
commit
0ad4644ae1
2 changed files with 5 additions and 3 deletions
|
@ -103,7 +103,9 @@ impl LintStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_lint_groups<'t>(&'t self) -> Vec<(&'static str, Vec<LintId>, bool)> {
|
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>,
|
pub fn register_pass(&mut self, sess: Option<&Session>,
|
||||||
|
@ -210,7 +212,7 @@ impl LintStore {
|
||||||
match self.by_name.find_equiv(&lint_name.as_slice()) {
|
match self.by_name.find_equiv(&lint_name.as_slice()) {
|
||||||
Some(&lint_id) => self.set_level(lint_id, (level, CommandLine)),
|
Some(&lint_id) => self.set_level(lint_id, (level, CommandLine)),
|
||||||
None => {
|
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>>>()
|
.collect::<HashMap<&'static str, Vec<LintId>>>()
|
||||||
.find_equiv(&lint_name.as_slice()) {
|
.find_equiv(&lint_name.as_slice()) {
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
|
|
|
@ -312,7 +312,7 @@ pub fn run(mut krate: clean::Crate, external_html: &ExternalHtml, dst: Path) ->
|
||||||
}).unwrap_or(HashMap::new());
|
}).unwrap_or(HashMap::new());
|
||||||
let mut cache = Cache {
|
let mut cache = Cache {
|
||||||
impls: HashMap::new(),
|
impls: HashMap::new(),
|
||||||
external_paths: paths.iter().map(|(&k, &(ref v, _))| (k, v.clone()))
|
external_paths: paths.iter().map(|(&k, v)| (k, v.ref0().clone()))
|
||||||
.collect(),
|
.collect(),
|
||||||
paths: paths,
|
paths: paths,
|
||||||
implementors: HashMap::new(),
|
implementors: HashMap::new(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue