Skip to content

Commit

Permalink
Auto merge of rust-lang#127414 - workingjubilee:rollup-lcxw1eh, r=wor…
Browse files Browse the repository at this point in the history
…kingjubilee

Rollup of 5 pull requests

Successful merges:

 - rust-lang#125751 (Add `new_range_api` for RFC 3550)
 - rust-lang#127098 (Migrate `output-type-permutations` `run-make` test to rmake)
 - rust-lang#127369 (Match ergonomics 2024: align with RFC again)
 - rust-lang#127383 (Use verbose style for argument removal suggestion)
 - rust-lang#127392 (Use verbose suggestion for changing arg type)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jul 6, 2024
2 parents 51917e2 + 8531487 commit 28cc0b6
Show file tree
Hide file tree
Showing 65 changed files with 2,332 additions and 547 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ fn report_trait_method_mismatch<'tcx>(
.next()
.unwrap_or(impl_err_span);

diag.span_suggestion(
diag.span_suggestion_verbose(
span,
"change the self-receiver type to match the trait",
sugg,
Expand All @@ -1005,12 +1005,12 @@ fn report_trait_method_mismatch<'tcx>(
}
hir::FnRetTy::Return(hir_ty) => {
let sugg = trait_sig.output();
diag.span_suggestion(hir_ty.span, msg, sugg, ap);
diag.span_suggestion_verbose(hir_ty.span, msg, sugg, ap);
}
};
};
} else if let Some(trait_ty) = trait_sig.inputs().get(*i) {
diag.span_suggestion(
diag.span_suggestion_verbose(
impl_err_span,
"change the parameter type to match the trait",
trait_ty,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
Some(format!("provide the argument{}", if plural { "s" } else { "" }))
}
SuggestionText::Remove(plural) => {
err.multipart_suggestion(
err.multipart_suggestion_verbose(
format!("remove the extra argument{}", if plural { "s" } else { "" }),
suggestions,
Applicability::HasPlaceholders,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
debug!("check_pat_ref: expected={:?}", expected);
match *expected.kind() {
ty::Ref(_, r_ty, r_mutbl)
if (new_match_ergonomics && r_mutbl >= pat_mutbl)
if (no_ref_mut_behind_and && r_mutbl >= pat_mutbl)
|| r_mutbl == pat_mutbl =>
{
if no_ref_mut_behind_and && r_mutbl == Mutability::Not {
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ pub mod panicking;
#[unstable(feature = "core_pattern_types", issue = "none")]
pub mod pat;
pub mod pin;
#[unstable(feature = "new_range_api", issue = "125687")]
pub mod range;
pub mod result;
pub mod sync;

Expand Down
Loading

0 comments on commit 28cc0b6

Please sign in to comment.