Skip to content

Commit ac385a5

Browse files
committedMay 14, 2024
Auto merge of #125120 - compiler-errors:rollup-mnjybwv, r=compiler-errors
Rollup of 7 pull requests Successful merges: - #119838 (style-guide: When breaking binops handle multi-line first operand better) - #124844 (Use a proper probe for shadowing impl) - #125047 (Migrate `run-make/issue-14500` to new `rmake.rs` format) - #125080 (only find segs chain for missing methods when no available candidates) - #125088 (Uplift `AliasTy` and `AliasTerm`) - #125100 (Don't do post-method-probe error reporting steps if we're in a suggestion) - #125118 (Use new utility functions/methods in run-make tests) r? `@ghost` `@rustbot` modify labels: rollup
2 parents bdfd941 + 31016d5 commit ac385a5

File tree

42 files changed

+1042
-599
lines changed

Some content is hidden

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

42 files changed

+1042
-599
lines changed
 

‎compiler/rustc_errors/src/diagnostic_impls.rs

+6
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::ExistentialTrait
106106
}
107107
}
108108

109+
impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::UnevaluatedConst<I> {
110+
fn into_diag_arg(self) -> rustc_errors::DiagArgValue {
111+
format!("{self:?}").into_diag_arg()
112+
}
113+
}
114+
109115
into_diag_arg_for_number!(i8, u8, i16, u16, i32, u32, i64, u64, i128, u128, isize, usize);
110116

111117
impl IntoDiagArg for bool {

‎compiler/rustc_hir_typeck/src/demand.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -938,14 +938,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
938938
);
939939
}
940940

941-
pub fn get_conversion_methods(
941+
pub fn get_conversion_methods_for_diagnostic(
942942
&self,
943943
span: Span,
944944
expected: Ty<'tcx>,
945945
checked_ty: Ty<'tcx>,
946946
hir_id: hir::HirId,
947947
) -> Vec<AssocItem> {
948-
let methods = self.probe_for_return_type(
948+
let methods = self.probe_for_return_type_for_diagnostic(
949949
span,
950950
probe::Mode::MethodCall,
951951
expected,

0 commit comments

Comments
 (0)