Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #106760

Merged
merged 27 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4e38d06
doc: rewrite doc for signed int::{carrying_add,borrowing_sub}
tspiteri Oct 19, 2022
a29425c
Stabilize f16c_target_feature
starkat99 Dec 31, 2022
89f1555
Add `AstConv::astconv` method to remove `<dyn AstConv>::` calls
WaffleLapkin Jan 11, 2023
d642781
Make selfless `dyn AstConv` methods into toplevel functions
WaffleLapkin Jan 11, 2023
ede5c31
Be more specific about constructor `FnDef`s in type mismatch
compiler-errors Jan 6, 2023
d375440
label where constructor is defined and note that it should be called
compiler-errors Jan 6, 2023
c8334ce
Move autoderef to rustc_hir_analysis
compiler-errors Dec 27, 2022
2024aa4
Make `&`-removal suggestion verbose
estebank Jan 2, 2023
ce83be4
Account for type params
estebank Jan 2, 2023
bb72117
fix rebase
estebank Jan 7, 2023
8b8cce1
Use the root trait predicate to determine whether to remove references
estebank Jan 9, 2023
48b7e2a
Stabilize `::{core,std}::pin::pin!`
danielhenrymantilla Oct 31, 2022
519b1ab
Translate const_to_pat.rs
Dec 19, 2022
5d2b9a9
Migrate deconstruct_pat.rs
Dec 20, 2022
ef33072
Migrate usefulness.rs
Dec 20, 2022
31c2021
Migrate pattern matching
Dec 23, 2022
8476c51
Don't recommend `if let` if `let else` works
Dec 23, 2022
3d260fa
Some cleanup, oops
Dec 23, 2022
372ac9c
Translate `Overlap` eagerly
Jan 9, 2023
e23b0fd
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
compiler-errors Jan 12, 2023
2e17a5d
Rollup merge of #103800 - danielhenrymantilla:stabilize-pin-macro, r=…
compiler-errors Jan 12, 2023
83d3b76
Rollup merge of #106097 - mejrs:mir_build2, r=oli-obk
compiler-errors Jan 12, 2023
9928b14
Rollup merge of #106170 - compiler-errors:autoderef-to-analysis, r=lcnr
compiler-errors Jan 12, 2023
244b90e
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=…
compiler-errors Jan 12, 2023
54f6fea
Rollup merge of #106360 - estebank:remove-borrow-suggestion, r=compil…
compiler-errors Jan 12, 2023
d711394
Rollup merge of #106524 - compiler-errors:constructor-note, r=cjgillot
compiler-errors Jan 12, 2023
9ec36f5
Rollup merge of #106739 - WaffleLapkin:astconv, r=estebank
compiler-errors Jan 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
("bmi2", None),
("cmpxchg16b", Some(sym::cmpxchg16b_target_feature)),
("ermsb", Some(sym::ermsb_target_feature)),
("f16c", Some(sym::f16c_target_feature)),
("f16c", None),
("fma", None),
("fxsr", None),
("gfni", Some(sym::avx512_target_feature)),
Expand Down Expand Up @@ -396,7 +396,6 @@ pub fn from_target_feature(
Some(sym::cmpxchg16b_target_feature) => rust_features.cmpxchg16b_target_feature,
Some(sym::movbe_target_feature) => rust_features.movbe_target_feature,
Some(sym::rtm_target_feature) => rust_features.rtm_target_feature,
Some(sym::f16c_target_feature) => rust_features.f16c_target_feature,
Some(sym::ermsb_target_feature) => rust_features.ermsb_target_feature,
Some(sym::bpf_target_feature) => rust_features.bpf_target_feature,
Some(sym::aarch64_ver_target_feature) => rust_features.aarch64_ver_target_feature,
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,7 @@ hir_analysis_self_in_impl_self =

hir_analysis_linkage_type =
invalid type for variable with `#[linkage]` attribute

hir_analysis_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
.label = deref recursion limit reached
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)
61 changes: 61 additions & 0 deletions compiler/rustc_error_messages/locales/en-US/mir_build.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,64 @@ mir_build_multiple_mut_borrows = cannot borrow value as mutable more than once a
.mutable_borrow = another mutable borrow, by `{$name_mut}`, occurs here
.immutable_borrow = also borrowed as immutable, by `{$name_immut}`, here
.moved = also moved into `{$name_moved}` here

mir_build_union_pattern = cannot use unions in constant patterns

mir_build_type_not_structural =
to use a constant of type `{$non_sm_ty}` in a pattern, `{$non_sm_ty}` must be annotated with `#[derive(PartialEq, Eq)]`

mir_build_unsized_pattern = cannot use unsized non-slice type `{$non_sm_ty}` in constant patterns

mir_build_invalid_pattern = `{$non_sm_ty}` cannot be used in patterns

mir_build_float_pattern = floating-point types cannot be used in patterns

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.

mir_build_indirect_structural_match =
to use a constant of type `{$non_sm_ty}` in a pattern, `{$non_sm_ty}` must be annotated with `#[derive(PartialEq, Eq)]`

mir_build_nontrivial_structural_match =
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)]`

mir_build_overlapping_range_endpoints = multiple patterns overlap on their endpoints
.range = ... with this range
.note = you likely meant to write mutually exclusive ranges

mir_build_non_exhaustive_omitted_pattern = some variants are not matched explicitly
.help = ensure that all variants are matched explicitly by adding the suggested match arms
.note = the matched value is of type `{$scrut_ty}` and the `non_exhaustive_omitted_patterns` attribute was found

mir_build_uncovered = {$count ->
[1] pattern `{$witness_1}`
[2] patterns `{$witness_1}` and `{$witness_2}`
[3] patterns `{$witness_1}`, `{$witness_2}` and `{$witness_3}`
*[other] patterns `{$witness_1}`, `{$witness_2}`, `{$witness_3}` and {$remainder} more
} not covered

mir_build_pattern_not_covered = refutable pattern in {$origin}
.pattern_ty = the matched value is of type `{$pattern_ty}`

mir_build_inform_irrefutable = `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant

mir_build_more_information = for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html

mir_build_res_defined_here = {$res} defined here

mir_build_adt_defined_here = `{$ty}` defined here

mir_build_variant_defined_here = not covered

mir_build_interpreted_as_const = introduce a variable instead

mir_build_confused = missing patterns are not covered because `{$variable}` is interpreted as {$article} {$res} pattern, not a new variable

mir_build_suggest_if_let = you might want to use `if let` to ignore the {$count ->
[one] variant that isn't
*[other] variants that aren't
} matched

mir_build_suggest_let_else = you might want to use `let else` to handle the {$count ->
[one] variant that isn't
*[other] variants that aren't
} matched
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ trait_selection_dump_vtable_entries = vtable entries for `{$trait_ref}`: {$entri

trait_selection_unable_to_construct_constant_value = unable to construct a constant value for the unevaluated constant {$unevaluated}

trait_selection_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}`
.label = deref recursion limit reached
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)

trait_selection_empty_on_clause_in_rustc_on_unimplemented = empty `on`-clause in `#[rustc_on_unimplemented]`
.label = empty on-clause here

Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ declare_features! (
(accepted, extern_crate_self, "1.34.0", Some(56409), None),
/// Allows access to crate names passed via `--extern` through prelude.
(accepted, extern_prelude, "1.30.0", Some(44660), None),
/// Allows using F16C intrinsics from `core::arch::{x86, x86_64}`.
(accepted, f16c_target_feature, "CURRENT_RUSTC_VERSION", Some(44839), None),
/// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
(accepted, field_init_shorthand, "1.17.0", Some(37340), None),
/// Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940).
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ declare_features! (
(active, bpf_target_feature, "1.54.0", Some(44839), None),
(active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None),
(active, ermsb_target_feature, "1.49.0", Some(44839), None),
(active, f16c_target_feature, "1.36.0", Some(44839), None),
(active, hexagon_target_feature, "1.27.0", Some(44839), None),
(active, mips_target_feature, "1.27.0", Some(44839), None),
(active, movbe_target_feature, "1.34.0", Some(44839), None),
Expand Down
Loading