Keeping code formatting.
Suggesting snippet without changing the original formatting of the code.
This commit is contained in:
parent
97b66d2987
commit
f41dc775a3
@ -914,11 +914,16 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
|
||||
new_trait_ref.to_predicate());
|
||||
|
||||
if selcx.evaluate_obligation(&new_obligation) {
|
||||
let remove_refs = refs_remaining + 1;
|
||||
let mut remove_refs = refs_remaining + 1;
|
||||
|
||||
let suggest_snippet = snippet.chars()
|
||||
.filter(|c| !c.is_whitespace())
|
||||
.skip(remove_refs)
|
||||
.skip_while(|c| c.is_whitespace() || {
|
||||
if *c == '&' && remove_refs > 0 {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
.collect::<String>();
|
||||
|
||||
err.span_suggestion(span,
|
||||
|
Loading…
Reference in New Issue
Block a user