diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-13 09:31:22 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-14 09:20:38 -0400 |
| commit | 95dba280b9e471fc2dce93195d3b6f4aeb31279c (patch) | |
| tree | 5c7b89181a8c4553b60931710bcab5ba7321d8d1 /compiler/rustc_parse/src/parser/path.rs | |
| parent | 7500e09b8baa6d21c85a699ef359c8c4e6175629 (diff) | |
| download | rust-95dba280b9e471fc2dce93195d3b6f4aeb31279c.tar.gz rust-95dba280b9e471fc2dce93195d3b6f4aeb31279c.zip | |
Move trait bound modifiers into ast::PolyTraitRef
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 162ff3b94de..2f19a9b6b20 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -948,8 +948,8 @@ impl<'a> Parser<'a> { { return Ok((false, seg.ident, seg.args.as_deref().cloned())); } else if let ast::TyKind::TraitObject(bounds, ast::TraitObjectSyntax::None) = &ty.kind - && let [ast::GenericBound::Trait(trait_ref, ast::TraitBoundModifiers::NONE)] = - bounds.as_slice() + && let [ast::GenericBound::Trait(trait_ref)] = bounds.as_slice() + && trait_ref.modifiers == ast::TraitBoundModifiers::NONE && let [seg] = trait_ref.trait_ref.path.segments.as_slice() { return Ok((true, seg.ident, seg.args.as_deref().cloned())); |
