diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-08-10 21:55:02 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-10 21:55:02 +0000 |
| commit | 48816e74930cb8769fea5acb8a706878b4d79d5b (patch) | |
| tree | 97add24276d9ac673f80cd1e937ed259d87def64 /compiler/rustc_trait_selection/src | |
| parent | d9bd24d331919299975f36c64ddf6febc4f41fd4 (diff) | |
| download | rust-48816e74930cb8769fea5acb8a706878b4d79d5b.tar.gz rust-48816e74930cb8769fea5acb8a706878b4d79d5b.zip | |
Do not point at macro invocation when providing inference context
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs index 1c890821b1d..8551780bcd5 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs @@ -459,7 +459,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { span, format!("this is an iterator with items of type `{}`", args.type_at(0)), ); - } else { + } else if !span.overlaps(cause.span) { let expected_ty = self.tcx.short_string(expected_ty, err.long_ty_path()); err.span_label(span, format!("this expression has type `{expected_ty}`")); } |
