Skip to content

Commit 259febb

Browse files
committed
Auto merge of #108471 - clubby789:unbox-the-syntax, r=Nilstrieb,est31
Remove `box_syntax` r? `@Nilstrieb` This removes the feature `box_syntax`, which allows the use of `box <expr>` to create a Box, and finalises removing use of the feature from the compiler. `box_patterns` (allowing the use of `box <pat>` in a pattern) is unaffected. It also removes `ast::ExprKind::Box` - the only way to create a 'box' expression now is with the rustc-internal `#[rustc_box]` attribute. As a temporary measure to help users move away, `box <expr>` now parses the inner expression, and emits a `MachineApplicable` lint to replace it with `Box::new` Closes #49733
2 parents 87b3c72 + b96916f commit 259febb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ide-completion/src/tests/attribute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,9 @@ mod lint {
857857
#[test]
858858
fn lint_feature() {
859859
check_edit(
860-
"box_syntax",
860+
"box_patterns",
861861
r#"#[feature(box_$0)] struct Test;"#,
862-
r#"#[feature(box_syntax)] struct Test;"#,
862+
r#"#[feature(box_patterns)] struct Test;"#,
863863
)
864864
}
865865

0 commit comments

Comments
 (0)