Fix error span to play nicely with rustfix

This commit is contained in:
Phil Ellison
2018-01-16 21:20:55 +00:00
parent ad164939ed
commit a64d19cc0e
4 changed files with 23 additions and 9 deletions

View File

@@ -606,7 +606,7 @@ pub fn span_lint_and_then<'a, 'tcx: 'a, T: LintContext<'tcx>, F>(
/// --> $DIR/methods.rs:390:13
/// |
/// 390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
/// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
/// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
/// |
/// = note: `-D fold-any` implied by `-D warnings`
/// </pre>
@@ -1055,4 +1055,4 @@ pub fn get_arg_name(pat: &Pat) -> Option<ast::Name> {
PatKind::Ref(ref subpat, _) => get_arg_name(subpat),
_ => None,
}
}
}