Don't emit "field expressions may not have generic arguments" if it's a method call without ()
This commit is contained in:
parent
33c245b9e9
commit
014363e89e
6 changed files with 18 additions and 17 deletions
|
@ -576,6 +576,10 @@ pub enum StashKey {
|
|||
UndeterminedMacroResolution,
|
||||
/// Used by `Parser::maybe_recover_trailing_expr`
|
||||
ExprInPat,
|
||||
/// If in the parser we detect a field expr with turbofish generic params it's possible that
|
||||
/// it's a method call without parens. If later on in `hir_typeck` we find out that this is
|
||||
/// the case we suppress this message and we give a better suggestion.
|
||||
GenericInFieldExpr,
|
||||
}
|
||||
|
||||
fn default_track_diagnostic<R>(diag: DiagInner, f: &mut dyn FnMut(DiagInner) -> R) -> R {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue