Skip to content

Commit 4606a4d

Browse files
committedDec 12, 2024·
Auto merge of rust-lang#134201 - matthiaskrgr:rollup-22b721y, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - rust-lang#122003 (link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets) - rust-lang#133859 (Move some alloc tests to the alloctests crate) - rust-lang#134070 (Some asm! diagnostic adjustments and a papercut fix) - rust-lang#134144 (Properly consider APITs for never type fallback ascription fix) - rust-lang#134152 (Simplify `rustc_mir_dataflow::abs_domain`.) - rust-lang#134154 (suppress field expr with generics error message if it's a method) - rust-lang#134155 (Forbid `unsafe_op_in_unsafe_fn` for Hurd) - rust-lang#134173 (allow `symbol_intern_string_literal` lint in test modules) - rust-lang#134178 (Stabilize the Rust 2024 prelude) - rust-lang#134179 (Remove outdated consteval note from `<*mut T>::align_offset` docs.) - rust-lang#134187 (Remove `PErr`.) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 903d297 + 2ced8b3 commit 4606a4d

File tree

49 files changed

+475
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+475
-190
lines changed
 

‎compiler/rustc_ast/src/util/comments/tests.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(bootstrap), allow(rustc::symbol_intern_string_literal))]
2+
13
use rustc_span::create_default_session_globals_then;
24

35
use super::*;

‎compiler/rustc_errors/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ mod styled_buffer;
9494
mod tests;
9595
pub mod translation;
9696

97-
pub type PErr<'a> = Diag<'a>;
98-
pub type PResult<'a, T> = Result<T, PErr<'a>>;
97+
pub type PResult<'a, T> = Result<T, Diag<'a>>;
9998

10099
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
101100

@@ -576,6 +575,10 @@ pub enum StashKey {
576575
UndeterminedMacroResolution,
577576
/// Used by `Parser::maybe_recover_trailing_expr`
578577
ExprInPat,
578+
/// If in the parser we detect a field expr with turbofish generic params it's possible that
579+
/// it's a method call without parens. If later on in `hir_typeck` we find out that this is
580+
/// the case we suppress this message and we give a better suggestion.
581+
GenericInFieldExpr,
579582
}
580583

581584
fn default_track_diagnostic<R>(diag: DiagInner, f: &mut dyn FnMut(DiagInner) -> R) -> R {

0 commit comments

Comments
 (0)