You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #133893 - fmease:rollup-11pi6fg, r=fmease
Rollup of 10 pull requests
Successful merges:
- #118833 (Add lint against function pointer comparisons)
- #122161 (Fix suggestion when shorthand `self` has erroneous type)
- #133233 (Add context to "const in pattern" errors)
- #133761 (Update books)
- #133843 (Do not emit empty suggestion)
- #133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro`)
- #133872 (No need to create placeholders for GAT args in confirm_object_candidate)
- #133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder)
- #133890 (Add a new test ui/incoherent-inherent-impls/no-other-unrelated-errors to check E0116 does not cause unrelated errors)
- #133892 (Revert #133817)
r? `@ghost`
`@rustbot` modify labels: rollup
.suggestion = remove the unnecessary path segments
887
887
888
+
lint_unpredictable_fn_pointer_comparisons = function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique
889
+
.note_duplicated_fn = the address of the same function can vary between different codegen units
890
+
.note_deduplicated_fn = furthermore, different functions could have the same address after being merged together
891
+
.note_visit_fn_addr_eq = for more information visit <https://doc.rust-lang.org/nightly/core/ptr/fn.fn_addr_eq.html>
892
+
.fn_addr_eq_suggestion = refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint
893
+
888
894
lint_unqualified_local_imports = `use` of a local item without leading `self::`, `super::`, or `crate::`
889
895
890
896
lint_unsafe_attr_outside_unsafe = unsafe attribute used without unsafe
mir_build_nan_pattern = cannot use NaN in patterns
253
+
.label = evaluates to `NaN`, which is not allowed in patterns
247
254
.note = NaNs compare inequal to everything, even themselves, so this pattern would never match
248
255
.help = try using the `is_nan` method instead
249
256
250
257
mir_build_non_const_path = runtime values cannot be referenced in patterns
258
+
.label = references a runtime value
251
259
252
260
mir_build_non_empty_never_pattern =
253
261
mismatched types
@@ -265,13 +273,15 @@ mir_build_non_exhaustive_patterns_type_not_empty = non-exhaustive patterns: type
265
273
.suggestion = ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
266
274
.help = ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
267
275
268
-
mir_build_non_partial_eq_match =
269
-
to use a constant of type `{$non_peq_ty}` in a pattern, the type must implement `PartialEq`
276
+
mir_build_non_partial_eq_match =constant of non-structural type `{$ty}` in a pattern
277
+
.label = constant of non-structural type
270
278
271
279
mir_build_pattern_not_covered = refutable pattern in {$origin}
272
280
.pattern_ty = the matched value is of type `{$pattern_ty}`
273
281
274
-
mir_build_pointer_pattern = function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
282
+
mir_build_pointer_pattern = function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
283
+
.label = can't be used in patterns
284
+
.note = see https://github.com/rust-lang/rust/issues/70861 for details
275
285
276
286
mir_build_privately_uninhabited = pattern `{$witness_1}` is currently uninhabited, but this variant contains private fields which may become inhabited in the future
277
287
@@ -283,6 +293,8 @@ mir_build_rustc_box_attribute_error = `#[rustc_box]` attribute used incorrectly
283
293
.missing_box = `#[rustc_box]` requires the `owned_box` lang item
284
294
285
295
mir_build_static_in_pattern = statics cannot be referenced in patterns
296
+
.label = can't be used in patterns
297
+
mir_build_static_in_pattern_def = `static` defined here
286
298
287
299
mir_build_suggest_attempted_int_lit = alternatively, you could prepend the pattern with an underscore to define a new named variable; identifiers cannot begin with digits
to use a constant of type `{$non_sm_ty}` in a pattern, `{$non_sm_ty}` must be annotated with `#[derive(PartialEq)]`
315
-
325
+
mir_build_type_not_structural =constant of non-structural type `{$ty}` in a pattern
326
+
.label = constant of non-structural type
327
+
mir_build_type_not_structural_def = `{$ty}` must be annotated with `#[derive(PartialEq)]` to be usable in patterns
316
328
mir_build_type_not_structural_more_info = see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
317
-
318
-
mir_build_type_not_structural_tip = the traits must be derived, manual `impl`s are not sufficient
329
+
mir_build_type_not_structural_tip =
330
+
the `PartialEq` trait must be derived, manual `impl`s are not sufficient; see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
319
331
320
332
mir_build_unconditional_recursion = function cannot return without recursing
0 commit comments