diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-24 12:23:36 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-27 10:08:14 -0400 |
| commit | 2fe936f17d86fa1c8bcf96844888ccf740cf3d89 (patch) | |
| tree | 1b86b471ba83fb0f63849400634a9012f11ffa99 /compiler/rustc_middle/src/traits | |
| parent | 10a7aa14fed9b528b74b0f098c4899c37c09a9c7 (diff) | |
| download | rust-2fe936f17d86fa1c8bcf96844888ccf740cf3d89.tar.gz rust-2fe936f17d86fa1c8bcf96844888ccf740cf3d89.zip | |
Stop doing expensive work in opt_suggest_box_span eagerly
Diffstat (limited to 'compiler/rustc_middle/src/traits')
| -rw-r--r-- | compiler/rustc_middle/src/traits/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index a04bd636622..efea2a66bb2 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -571,7 +571,8 @@ pub struct MatchExpressionArmCause<'tcx> { pub scrut_span: Span, pub source: hir::MatchSource, pub prior_non_diverging_arms: Vec<Span>, - pub opt_suggest_box_span: Option<Span>, + // Is the expectation of this match expression an RPIT? + pub tail_defines_return_position_impl_trait: Option<LocalDefId>, } #[derive(Copy, Clone, Debug, PartialEq, Eq)] @@ -582,7 +583,8 @@ pub struct IfExpressionCause<'tcx> { pub then_ty: Ty<'tcx>, pub else_ty: Ty<'tcx>, pub outer_span: Option<Span>, - pub opt_suggest_box_span: Option<Span>, + // Is the expectation of this match expression an RPIT? + pub tail_defines_return_position_impl_trait: Option<LocalDefId>, } #[derive(Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)] |
