diff options
| author | Tawan Muadmuenwai <modhanami@gmail.com> | 2025-09-15 21:24:57 +0700 |
|---|---|---|
| committer | Tawan Muadmuenwai <modhanami@gmail.com> | 2025-09-16 23:04:59 +0700 |
| commit | 6912631d3ead427848a559ef5af66ab6f30e79ed (patch) | |
| tree | 8172b0a5542abab57887a087b4d2ef334cb15788 /compiler/rustc_middle/src/ty/sty.rs | |
| parent | d1ed52b1f5b78bf66127b670af813b84d57aeedb (diff) | |
| download | rust-6912631d3ead427848a559ef5af66ab6f30e79ed.tar.gz rust-6912631d3ead427848a559ef5af66ab6f30e79ed.zip | |
Add span for struct tail recursion limit error
Diffstat (limited to 'compiler/rustc_middle/src/ty/sty.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 755fc68d86f..ea07f5c18dd 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -23,6 +23,7 @@ use ty::util::IntTypeExt; use super::GenericParamDefKind; use crate::infer::canonical::Canonical; +use crate::traits::ObligationCause; use crate::ty::InferTy::*; use crate::ty::{ self, AdtDef, BoundRegionKind, Discr, GenericArg, GenericArgs, GenericArgsRef, List, ParamEnv, @@ -1640,7 +1641,7 @@ impl<'tcx> Ty<'tcx> { tcx: TyCtxt<'tcx>, normalize: impl FnMut(Ty<'tcx>) -> Ty<'tcx>, ) -> Result<Ty<'tcx>, Ty<'tcx>> { - let tail = tcx.struct_tail_raw(self, normalize, || {}); + let tail = tcx.struct_tail_raw(self, &ObligationCause::dummy(), normalize, || {}); match tail.kind() { // Sized types ty::Infer(ty::IntVar(_) | ty::FloatVar(_)) |
