diff options
| author | bors <bors@rust-lang.org> | 2024-12-12 09:21:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-12 09:21:42 +0000 |
| commit | 4606a4d6fab93e53b54a4312c82e715eab8e122d (patch) | |
| tree | ceff21f2b5da6e001f70a428d25b09ee4e7d43d3 /compiler/rustc_errors/src | |
| parent | 903d2976fdb6ceeb65526b7555d8d1e6f8c02134 (diff) | |
| parent | 2ced8b31c712065ff2a68d68b80dd50fc8b6f70e (diff) | |
| download | rust-4606a4d6fab93e53b54a4312c82e715eab8e122d.tar.gz rust-4606a4d6fab93e53b54a4312c82e715eab8e122d.zip | |
Auto merge of #134201 - matthiaskrgr:rollup-22b721y, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #122003 (link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets) - #133859 (Move some alloc tests to the alloctests crate) - #134070 (Some asm! diagnostic adjustments and a papercut fix) - #134144 (Properly consider APITs for never type fallback ascription fix) - #134152 (Simplify `rustc_mir_dataflow::abs_domain`.) - #134154 (suppress field expr with generics error message if it's a method) - #134155 (Forbid `unsafe_op_in_unsafe_fn` for Hurd) - #134173 (allow `symbol_intern_string_literal` lint in test modules) - #134178 (Stabilize the Rust 2024 prelude) - #134179 (Remove outdated consteval note from `<*mut T>::align_offset` docs.) - #134187 (Remove `PErr`.) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 7 |
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 { |
