Skip to content

Commit b6314bc

Browse files
committed
Refactor inferred bound filtering
1 parent 8d51928 commit b6314bc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/expand.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,9 @@ fn transform_sig(
267267
&[InferredBound::Send]
268268
};
269269

270-
let bounds = bounds.iter().filter(|bound| {
271-
let assume_bound = match context {
272-
Context::Trait { supertraits, .. } => !has_default || has_bound(supertraits, bound),
273-
Context::Impl { .. } => true,
274-
};
275-
!assume_bound
270+
let bounds = bounds.iter().filter(|bound| match context {
271+
Context::Trait { supertraits, .. } => has_default && !has_bound(supertraits, bound),
272+
Context::Impl { .. } => false,
276273
});
277274

278275
where_clause_or_default(&mut sig.generics.where_clause)

0 commit comments

Comments
 (0)