Skip to content

Commit 05c8753

Browse files
Check parenthesized
1 parent 62ad1c8 commit 05c8753

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_hir/src/hir.rs

+3
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,9 @@ impl<'hir> Generics<'hir> {
655655
match bound {
656656
GenericBound::Trait(data, _) => {
657657
let segment = data.trait_ref.path.segments.first()?;
658+
if segment.args().parenthesized != GenericArgsParentheses::ParenSugar {
659+
return None;
660+
}
658661
let binding = segment.args().bindings.first()?;
659662
if let TypeBindingKind::Equality { term: Term::Ty(ty) } = binding.kind {
660663
Some(ty)

0 commit comments

Comments
 (0)