diff options
| author | Veera <sveera.2001@gmail.com> | 2024-07-04 19:19:15 -0400 |
|---|---|---|
| committer | Veera <sveera.2001@gmail.com> | 2024-07-18 17:56:34 -0400 |
| commit | 4cad705017f34a6545deb1505d0ce85537c18df5 (patch) | |
| tree | 183a600bcce3a1af7aeb7cc82bcbe8896c0cd02a /compiler/rustc_parse/src/parser/ty.rs | |
| parent | 5834772177540912b53dc4f19413a4ba3c804ea4 (diff) | |
| download | rust-4cad705017f34a6545deb1505d0ce85537c18df5.tar.gz rust-4cad705017f34a6545deb1505d0ce85537c18df5.zip | |
Parser: Suggest Placing the Return Type After Function Parameters
Diffstat (limited to 'compiler/rustc_parse/src/parser/ty.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/ty.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 1e5b227aaa9..17a0829c6d2 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -21,6 +21,11 @@ use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::{ErrorGuaranteed, Span, Symbol}; use thin_vec::{thin_vec, ThinVec}; +/// Signals whether parsing a type should allow `+`. +/// +/// For example, let T be the type `impl Default + 'static` +/// With `AllowPlus::Yes`, T will be parsed successfully +/// With `AllowPlus::No`, parsing T will return a parse error #[derive(Copy, Clone, PartialEq)] pub(super) enum AllowPlus { Yes, |
