Path has only 2 fields now

See also: https://github.com/phildawes/racer/pull/72
This commit is contained in:
Rohan Prinja 2014-12-04 18:05:49 +05:30
parent e9c08c4b12
commit 3a9fda7c7b
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ declare_lint!(CLIPPY_DLIST, Warn,
/// Matches a type with a provided string, and returns its type parameters if successful
pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> {
match ty.node {
TyPath(Path {segments: ref seg, ..}, _, _) => {
TyPath(Path {segments: ref seg, ..}, _) => {
// So ast::Path isn't the full path, just the tokens that were provided.
// I could muck around with the maps and find the full path
// however the more efficient way is to simply reverse the iterators and zip them
@ -81,4 +81,4 @@ impl LintPass for TypePass {
}
}
}
}
}