This commit is contained in:
flip1995 2019-10-24 11:54:11 +02:00
parent 8c205018d2
commit 5f4b5b91d7
No known key found for this signature in database
GPG key ID: 693086869D506637

View file

@ -64,13 +64,13 @@ pub fn range<'a, 'b, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'b hir::Expr) -> O
if def_path.data.len() != 3 { if def_path.data.len() != 3 {
return None; return None;
} }
if def_path.data.get(0)?.data.as_interned_str().as_symbol() != sym!(ops) { if def_path.data.get(0)?.data.as_symbol() != sym!(ops) {
return None; return None;
} }
if def_path.data.get(1)?.data.as_interned_str().as_symbol() != sym!(range) { if def_path.data.get(1)?.data.as_symbol() != sym!(range) {
return None; return None;
} }
let type_name = def_path.data.get(2)?.data.as_interned_str(); let type_name = def_path.data.get(2)?.data.as_symbol();
let range_types = [ let range_types = [
"RangeFrom", "RangeFrom",
"RangeFull", "RangeFull",