diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-05 01:08:17 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-28 01:02:15 +0000 |
| commit | 773e8a5ad1fa012bc1574c6733a700e094a48e3d (patch) | |
| tree | 522700a419e0388d6ce179496ac564c1eb14bad6 /compiler/rustc_ast_lowering/src/lib.rs | |
| parent | fb9ca9223d42a13bc15bddd1c2dce506db2fcb21 (diff) | |
| download | rust-773e8a5ad1fa012bc1574c6733a700e094a48e3d.tar.gz rust-773e8a5ad1fa012bc1574c6733a700e094a48e3d.zip | |
RTN
Diffstat (limited to 'compiler/rustc_ast_lowering/src/lib.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 878763dca14..97b87b985d0 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -987,8 +987,20 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { GenericArgs::AngleBracketed(data) => { self.lower_angle_bracketed_parameter_data(data, ParamMode::Explicit, itctx).0 } + GenericArgs::Parenthesized(data) + if self.tcx.features().return_type_notation => + { + // TODO: Check the parens + no return type + GenericArgsCtor { + args: Default::default(), + bindings: &[], + parenthesized: true, + span: data.span, + } + } GenericArgs::Parenthesized(data) => { self.emit_bad_parenthesized_trait_in_assoc_ty(data); + // TODO: Add a RTN feature error if the parens are shaped correctly self.lower_angle_bracketed_parameter_data( &data.as_angle_bracketed_args(), ParamMode::Explicit, |
