about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-18 17:20:57 +0200
committerGitHub <noreply@github.com>2025-09-18 17:20:57 +0200
commitb7ab58eb4d6bc12907f2a13c490ac26d53356c85 (patch)
tree7ad1c3ace059bba8b56bd09cd51e213b4d10ffbc /compiler/rustc_trait_selection
parentfd852f4bee1e8cc7a0d5a287f055b03192656571 (diff)
parent6912631d3ead427848a559ef5af66ab6f30e79ed (diff)
downloadrust-b7ab58eb4d6bc12907f2a13c490ac26d53356c85.tar.gz
rust-b7ab58eb4d6bc12907f2a13c490ac26d53356c85.zip
Rollup merge of #146597 - modhanami:add-struct-tail-recursion-limit-span, r=oli-obk
Add span for struct tail recursion limit error

Fixes rust-lang/rust#135629

Changes
1. Add span to RecursionLimitReached
2. Add ObligationCause parameter to struct_tail_raw
4. Update call sites to pass nearby ObligationCause or create one
5. Update affected .stderr
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/traits/project.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs
index 884d53732fe..042d6def84c 100644
--- a/compiler/rustc_trait_selection/src/traits/project.rs
+++ b/compiler/rustc_trait_selection/src/traits/project.rs
@@ -1057,6 +1057,7 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
                     Some(LangItem::PointeeTrait) => {
                         let tail = selcx.tcx().struct_tail_raw(
                             self_ty,
+                            &obligation.cause,
                             |ty| {
                                 // We throw away any obligations we get from this, since we normalize
                                 // and confirm these obligations once again during confirmation