about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorOli Scherer <github35764891676564198441@oli-obk.de>2024-12-13 05:50:39 +0000
committerGitHub <noreply@github.com>2024-12-13 05:50:39 +0000
commit55db25b1cab26c39d3d647890da89f1bbb7e615b (patch)
tree5805c74a884bf2d344c0db89dfef759a8435d0d2 /compiler/rustc_errors/src
parent8e8d6d6d875393dd24be9c53deacc16f2929bd33 (diff)
parent8652177c6328fb67981ec74cfe93dd1f3399e4fa (diff)
downloadrust-55db25b1cab26c39d3d647890da89f1bbb7e615b.tar.gz
rust-55db25b1cab26c39d3d647890da89f1bbb7e615b.zip
Merge pull request #4094 from rust-lang/rustup-2024-12-13
Automatic Rustup
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index fc44340851c..25d41462556 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -94,8 +94,7 @@ mod styled_buffer;
 mod tests;
 pub mod translation;
 
-pub type PErr<'a> = Diag<'a>;
-pub type PResult<'a, T> = Result<T, PErr<'a>>;
+pub type PResult<'a, T> = Result<T, Diag<'a>>;
 
 rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
 
@@ -576,6 +575,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 {