Add version = "Two" to rustfmt.toml
Ignore UI tests since this change makes rustfmt less friendly with UI test comments.
This commit is contained in:
@@ -25,11 +25,7 @@ pub fn until(s: &str) -> usize {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
if up {
|
||||
last_i
|
||||
} else {
|
||||
s.len()
|
||||
}
|
||||
if up { last_i } else { s.len() }
|
||||
}
|
||||
|
||||
/// Returns index of the last camel-case component of `s`.
|
||||
|
||||
@@ -1563,12 +1563,12 @@ pub fn is_trait_impl_item(cx: &LateContext<'_>, hir_id: HirId) -> bool {
|
||||
/// ```
|
||||
pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
|
||||
use rustc_trait_selection::traits;
|
||||
let predicates =
|
||||
cx.tcx
|
||||
.predicates_of(did)
|
||||
.predicates
|
||||
.iter()
|
||||
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
|
||||
let predicates = cx
|
||||
.tcx
|
||||
.predicates_of(did)
|
||||
.predicates
|
||||
.iter()
|
||||
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
|
||||
traits::impossible_predicates(
|
||||
cx.tcx,
|
||||
traits::elaborate_predicates(cx.tcx, predicates)
|
||||
|
||||
@@ -36,11 +36,7 @@ fn extract_clone_suggestions<'tcx>(
|
||||
abort: false,
|
||||
};
|
||||
visitor.visit_body(body);
|
||||
if visitor.abort {
|
||||
None
|
||||
} else {
|
||||
Some(visitor.spans)
|
||||
}
|
||||
if visitor.abort { None } else { Some(visitor.spans) }
|
||||
}
|
||||
|
||||
struct PtrCloneVisitor<'a, 'tcx> {
|
||||
|
||||
Reference in New Issue
Block a user