Remove box syntax from rustc_typeck
This commit is contained in:
parent
15672dc695
commit
395e7dfc2a
2 changed files with 4 additions and 5 deletions
|
@ -108,7 +108,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
0 => (arm_span, ObligationCauseCode::BlockTailExpression(arm.body.hir_id)),
|
0 => (arm_span, ObligationCauseCode::BlockTailExpression(arm.body.hir_id)),
|
||||||
_ => (
|
_ => (
|
||||||
expr.span,
|
expr.span,
|
||||||
ObligationCauseCode::MatchExpressionArm(box MatchExpressionArmCause {
|
ObligationCauseCode::MatchExpressionArm(Box::new(MatchExpressionArmCause {
|
||||||
arm_span,
|
arm_span,
|
||||||
scrut_span: scrut.span,
|
scrut_span: scrut.span,
|
||||||
semi_span,
|
semi_span,
|
||||||
|
@ -117,7 +117,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
last_ty: prior_arm_ty.unwrap(),
|
last_ty: prior_arm_ty.unwrap(),
|
||||||
scrut_hir_id: scrut.hir_id,
|
scrut_hir_id: scrut.hir_id,
|
||||||
opt_suggest_box_span,
|
opt_suggest_box_span,
|
||||||
}),
|
})),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
let cause = self.cause(span, code);
|
let cause = self.cause(span, code);
|
||||||
|
@ -397,13 +397,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
// Finally construct the cause:
|
// Finally construct the cause:
|
||||||
self.cause(
|
self.cause(
|
||||||
error_sp,
|
error_sp,
|
||||||
ObligationCauseCode::IfExpression(box IfExpressionCause {
|
ObligationCauseCode::IfExpression(Box::new(IfExpressionCause {
|
||||||
then: then_sp,
|
then: then_sp,
|
||||||
else_sp: error_sp,
|
else_sp: error_sp,
|
||||||
outer: outer_sp,
|
outer: outer_sp,
|
||||||
semicolon: remove_semicolon,
|
semicolon: remove_semicolon,
|
||||||
opt_suggest_box_span,
|
opt_suggest_box_span,
|
||||||
}),
|
})),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
#![cfg_attr(bootstrap, feature(bindings_after_at))]
|
#![cfg_attr(bootstrap, feature(bindings_after_at))]
|
||||||
#![feature(bool_to_option)]
|
#![feature(bool_to_option)]
|
||||||
#![feature(box_syntax)]
|
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(format_args_capture)]
|
#![feature(format_args_capture)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
|
|
Loading…
Reference in a new issue