Skip to content

Commit

Permalink
Check parenthesized
Browse files Browse the repository at this point in the history
  • Loading branch information
long-long-float committed Apr 14, 2024
1 parent 62ad1c8 commit 05c8753
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ impl<'hir> Generics<'hir> {
match bound {
GenericBound::Trait(data, _) => {
let segment = data.trait_ref.path.segments.first()?;
if segment.args().parenthesized != GenericArgsParentheses::ParenSugar {
return None;
}
let binding = segment.args().bindings.first()?;
if let TypeBindingKind::Equality { term: Term::Ty(ty) } = binding.kind {
Some(ty)
Expand Down

0 comments on commit 05c8753

Please sign in to comment.