Skip to content

Commit 606c390

Browse files
committed
Auto merge of #106760 - compiler-errors:rollup-0bogyco, r=compiler-errors
Rollup of 8 pull requests Successful merges: - #103236 (doc: rewrite doc for signed int::{carrying_add,borrowing_sub}) - #103800 (Stabilize `::{core,std}::pin::pin!`) - #106097 (Migrate mir_build diagnostics 2 of 3) - #106170 (Move autoderef to `rustc_hir_analysis`) - #106323 (Stabilize f16c_target_feature) - #106360 (Tweak E0277 `&`-removal suggestions) - #106524 (Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch) - #106739 (Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2b8590e + 9ec36f5 commit 606c390

File tree

108 files changed

+1676
-1385
lines changed

Some content is hidden

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

108 files changed

+1676
-1385
lines changed

compiler/rustc_codegen_ssa/src/target_features.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
187187
("bmi2", None),
188188
("cmpxchg16b", Some(sym::cmpxchg16b_target_feature)),
189189
("ermsb", Some(sym::ermsb_target_feature)),
190-
("f16c", Some(sym::f16c_target_feature)),
190+
("f16c", None),
191191
("fma", None),
192192
("fxsr", None),
193193
("gfni", Some(sym::avx512_target_feature)),
@@ -396,7 +396,6 @@ pub fn from_target_feature(
396396
Some(sym::cmpxchg16b_target_feature) => rust_features.cmpxchg16b_target_feature,
397397
Some(sym::movbe_target_feature) => rust_features.movbe_target_feature,
398398
Some(sym::rtm_target_feature) => rust_features.rtm_target_feature,
399-
Some(sym::f16c_target_feature) => rust_features.f16c_target_feature,
400399
Some(sym::ermsb_target_feature) => rust_features.ermsb_target_feature,
401400
Some(sym::bpf_target_feature) => rust_features.bpf_target_feature,
402401
Some(sym::aarch64_ver_target_feature) => rust_features.aarch64_ver_target_feature,

compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl

+4
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,7 @@ hir_analysis_self_in_impl_self =
120120
121121
hir_analysis_linkage_type =
122122
invalid type for variable with `#[linkage]` attribute
123+
124+
hir_analysis_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
125+
.label = deref recursion limit reached
126+
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)

compiler/rustc_error_messages/locales/en-US/mir_build.ftl

+61
Original file line numberDiff line numberDiff line change
@@ -303,3 +303,64 @@ mir_build_multiple_mut_borrows = cannot borrow value as mutable more than once a
303303
.mutable_borrow = another mutable borrow, by `{$name_mut}`, occurs here
304304
.immutable_borrow = also borrowed as immutable, by `{$name_immut}`, here
305305
.moved = also moved into `{$name_moved}` here
306+
307+
mir_build_union_pattern = cannot use unions in constant patterns
308+
309+
mir_build_type_not_structural =
310+
to use a constant of type `{$non_sm_ty}` in a pattern, `{$non_sm_ty}` must be annotated with `#[derive(PartialEq, Eq)]`
311+
312+
mir_build_unsized_pattern = cannot use unsized non-slice type `{$non_sm_ty}` in constant patterns
313+
314+
mir_build_invalid_pattern = `{$non_sm_ty}` cannot be used in patterns
315+
316+
mir_build_float_pattern = floating-point types cannot be used in patterns
317+
318+
mir_build_pointer_pattern = function pointers and unsized pointers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
319+
320+
mir_build_indirect_structural_match =
321+
to use a constant of type `{$non_sm_ty}` in a pattern, `{$non_sm_ty}` must be annotated with `#[derive(PartialEq, Eq)]`
322+
323+
mir_build_nontrivial_structural_match =
324+
to use a constant of type `{$non_sm_ty}` in a pattern, the constant's initializer must be trivial or `{$non_sm_ty}` must be annotated with `#[derive(PartialEq, Eq)]`
325+
326+
mir_build_overlapping_range_endpoints = multiple patterns overlap on their endpoints
327+
.range = ... with this range
328+
.note = you likely meant to write mutually exclusive ranges
329+
330+
mir_build_non_exhaustive_omitted_pattern = some variants are not matched explicitly
331+
.help = ensure that all variants are matched explicitly by adding the suggested match arms
332+
.note = the matched value is of type `{$scrut_ty}` and the `non_exhaustive_omitted_patterns` attribute was found
333+
334+
mir_build_uncovered = {$count ->
335+
[1] pattern `{$witness_1}`
336+
[2] patterns `{$witness_1}` and `{$witness_2}`
337+
[3] patterns `{$witness_1}`, `{$witness_2}` and `{$witness_3}`
338+
*[other] patterns `{$witness_1}`, `{$witness_2}`, `{$witness_3}` and {$remainder} more
339+
} not covered
340+
341+
mir_build_pattern_not_covered = refutable pattern in {$origin}
342+
.pattern_ty = the matched value is of type `{$pattern_ty}`
343+
344+
mir_build_inform_irrefutable = `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
345+
346+
mir_build_more_information = for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
347+
348+
mir_build_res_defined_here = {$res} defined here
349+
350+
mir_build_adt_defined_here = `{$ty}` defined here
351+
352+
mir_build_variant_defined_here = not covered
353+
354+
mir_build_interpreted_as_const = introduce a variable instead
355+
356+
mir_build_confused = missing patterns are not covered because `{$variable}` is interpreted as {$article} {$res} pattern, not a new variable
357+
358+
mir_build_suggest_if_let = you might want to use `if let` to ignore the {$count ->
359+
[one] variant that isn't
360+
*[other] variants that aren't
361+
} matched
362+
363+
mir_build_suggest_let_else = you might want to use `let else` to handle the {$count ->
364+
[one] variant that isn't
365+
*[other] variants that aren't
366+
} matched

compiler/rustc_error_messages/locales/en-US/trait_selection.ftl

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ trait_selection_dump_vtable_entries = vtable entries for `{$trait_ref}`: {$entri
22
33
trait_selection_unable_to_construct_constant_value = unable to construct a constant value for the unevaluated constant {$unevaluated}
44
5-
trait_selection_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
6-
.label = deref recursion limit reached
7-
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)
8-
95
trait_selection_empty_on_clause_in_rustc_on_unimplemented = empty `on`-clause in `#[rustc_on_unimplemented]`
106
.label = empty on-clause here
117

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ declare_features! (
161161
(accepted, extern_crate_self, "1.34.0", Some(56409), None),
162162
/// Allows access to crate names passed via `--extern` through prelude.
163163
(accepted, extern_prelude, "1.30.0", Some(44660), None),
164+
/// Allows using F16C intrinsics from `core::arch::{x86, x86_64}`.
165+
(accepted, f16c_target_feature, "CURRENT_RUSTC_VERSION", Some(44839), None),
164166
/// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
165167
(accepted, field_init_shorthand, "1.17.0", Some(37340), None),
166168
/// Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940).

compiler/rustc_feature/src/active.rs

-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ declare_features! (
254254
(active, bpf_target_feature, "1.54.0", Some(44839), None),
255255
(active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None),
256256
(active, ermsb_target_feature, "1.49.0", Some(44839), None),
257-
(active, f16c_target_feature, "1.36.0", Some(44839), None),
258257
(active, hexagon_target_feature, "1.27.0", Some(44839), None),
259258
(active, mips_target_feature, "1.27.0", Some(44839), None),
260259
(active, movbe_target_feature, "1.34.0", Some(44839), None),

0 commit comments

Comments
 (0)