From 773e8a5ad1fa012bc1574c6733a700e094a48e3d Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sun, 5 Mar 2023 01:08:17 +0000 Subject: RTN --- compiler/rustc_parse/src/parser/path.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src') diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index b50d2984a4e..72f230e628d 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -550,7 +550,11 @@ impl<'a> Parser<'a> { // Gate associated type bounds, e.g., `Iterator`. if let AssocConstraintKind::Bound { .. } = kind { - self.sess.gated_spans.gate(sym::associated_type_bounds, span); + if gen_args.as_ref().map_or(false, |args| args.is_parenthesized()) { + self.sess.gated_spans.gate(sym::return_type_notation, span); + } else { + self.sess.gated_spans.gate(sym::associated_type_bounds, span); + } } let constraint = AssocConstraint { id: ast::DUMMY_NODE_ID, ident, gen_args, kind, span }; -- cgit 1.4.1-3-g733a5