Parser: Suggest Placing the Return Type After Function Parameters
This commit is contained in:
parent
5834772177
commit
4cad705017
6 changed files with 123 additions and 39 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue