Make clippy work with parallel rustc

This commit is contained in:
John Kåre Alsaker
2019-01-03 18:17:43 +01:00
parent baec524fac
commit 3af68f831a
3 changed files with 8 additions and 8 deletions

View File

@@ -25,11 +25,11 @@ use rustc::ty::{
subst::Kind,
Binder, Ty, TyCtxt,
};
use rustc_data_structures::sync::Lrc;
use rustc_errors::{Applicability, CodeSuggestion, Substitution, SubstitutionPart};
use std::borrow::Cow;
use std::env;
use std::mem;
use std::rc::Rc;
use std::str::FromStr;
use syntax::ast::{self, LitKind};
use syntax::attr;
@@ -223,7 +223,7 @@ pub fn path_to_def(cx: &LateContext<'_, '_>, path: &[&str]) -> Option<def::Def>
None => return None,
};
for item in mem::replace(&mut items, Rc::new(vec![])).iter() {
for item in mem::replace(&mut items, Lrc::new(vec![])).iter() {
if item.ident.name == *segment {
if path_it.peek().is_none() {
return Some(item.def);