Skip to content

Commit 91d0b37

Browse files
committed
Fix rebase
1 parent d67dcf5 commit 91d0b37

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

Diff for: compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
562562
None
563563
};
564564

565-
let suggest_confusable = |err: &mut Diagnostic| {
565+
let suggest_confusable = |err: &mut DiagnosticBuilder<'_>| {
566566
let Some(call_name) = call_ident else {
567567
return;
568568
};

Diff for: compiler/rustc_hir_typeck/src/method/suggest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14181418

14191419
fn find_likely_intended_associated_item(
14201420
&self,
1421-
err: &mut Diagnostic,
1421+
err: &mut DiagnosticBuilder<'_>,
14221422
similar_candidate: ty::AssocItem,
14231423
span: Span,
14241424
args: Option<&'tcx [hir::Expr<'tcx>]>,
@@ -1496,7 +1496,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14961496

14971497
pub(crate) fn confusable_method_name(
14981498
&self,
1499-
err: &mut Diagnostic,
1499+
err: &mut DiagnosticBuilder<'_>,
15001500
rcvr_ty: Ty<'tcx>,
15011501
item_name: Ident,
15021502
call_args: Option<Vec<Ty<'tcx>>>,

Diff for: tests/ui/impl-trait/where-allowed.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ error[E0599]: no function or associated item named `into_vec` found for slice `[
395395
LL | vec![vec![0; 10], vec![12; 7], vec![8; 3]]
396396
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `[_]`
397397
|
398+
help: there is an associated function `to_vec` with a similar name
399+
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
398400
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
399401

400402
error[E0053]: method `in_trait_impl_return` has an incompatible type for trait

Diff for: tests/ui/ufcs/bad-builder.stderr

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ error[E0599]: no function or associated item named `mew` found for struct `Vec<Q
22
--> $DIR/bad-builder.rs:2:15
33
|
44
LL | Vec::<Q>::mew()
5-
| ^^^
6-
| |
7-
| function or associated item not found in `Vec<Q>`
8-
| help: there is an associated function with a similar name: `new`
5+
| ^^^ function or associated item not found in `Vec<Q>`
96
|
107
note: if you're trying to build a new `Vec<Q>` consider using one of the following associated functions:
118
Vec::<T>::new
@@ -14,6 +11,10 @@ note: if you're trying to build a new `Vec<Q>` consider using one of the followi
1411
Vec::<T, A>::new_in
1512
and 2 others
1613
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
14+
help: there is an associated function `new` with a similar name
15+
|
16+
LL | Vec::<Q>::new()
17+
| ~~~
1718

1819
error: aborting due to 1 previous error
1920

0 commit comments

Comments
 (0)