Skip to content

Commit 23831ec

Browse files
authored
Removed TODO about removed box syntax (#854)
rust-lang/rust#108471
1 parent 7f8411a commit 23831ec

File tree

8 files changed

+0
-10
lines changed

8 files changed

+0
-10
lines changed

meta/src/ast.rs

-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ impl Expr {
116116
let expr = f(expr);
117117

118118
match expr {
119-
// TODO: Use box syntax when it gets stabilized.
120119
Expr::PosPred(expr) => {
121120
let mapped = Box::new(map_internal(*expr, f));
122121
Expr::PosPred(mapped)
@@ -189,7 +188,6 @@ impl Expr {
189188
{
190189
let mapped = match expr {
191190
Expr::PosPred(expr) => {
192-
// TODO: Use box syntax when it gets stabilized.
193191
let mapped = Box::new(map_internal(*expr, f));
194192
Expr::PosPred(mapped)
195193
}

meta/src/optimizer/concatenator.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub fn concatenate(rule: Rule) -> Rule {
1616
ty,
1717
expr: expr.map_bottom_up(|expr| {
1818
if ty == RuleType::Atomic {
19-
// TODO: Use box syntax when it gets stabilized.
2019
match expr {
2120
Expr::Seq(lhs, rhs) => match (*lhs, *rhs) {
2221
(Expr::Str(lhs), Expr::Str(rhs)) => Expr::Str(lhs + &rhs),

meta/src/optimizer/factorizer.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub fn factor(rule: Rule) -> Rule {
1515
name,
1616
ty,
1717
expr: expr.map_top_down(|expr| {
18-
// TODO: Use box syntax when it gets stabilized.
1918
match expr {
2019
Expr::Choice(lhs, rhs) => match (*lhs, *rhs) {
2120
(Expr::Seq(l1, r1), Expr::Seq(l2, r2)) => {

meta/src/optimizer/lister.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub fn list(rule: Rule) -> Rule {
1515
name,
1616
ty,
1717
expr: expr.map_bottom_up(|expr| {
18-
// TODO: Use box syntax when it gets stabilized.
1918
match expr {
2019
Expr::Seq(l, r) => match *l {
2120
Expr::Rep(l) => {

meta/src/optimizer/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ impl OptimizedExpr {
162162
let expr = f(expr);
163163

164164
match expr {
165-
// TODO: Use box syntax when it gets stabilized.
166165
OptimizedExpr::PosPred(expr) => {
167166
let mapped = Box::new(map_internal(*expr, f));
168167
OptimizedExpr::PosPred(mapped)
@@ -211,7 +210,6 @@ impl OptimizedExpr {
211210
{
212211
let mapped = match expr {
213212
OptimizedExpr::PosPred(expr) => {
214-
// TODO: Use box syntax when it gets stabilized.
215213
let mapped = Box::new(map_internal(*expr, f));
216214
OptimizedExpr::PosPred(mapped)
217215
}

meta/src/optimizer/rotater.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use crate::ast::*;
1212
pub fn rotate(rule: Rule) -> Rule {
1313
fn rotate_internal(expr: Expr) -> Expr {
1414
match expr {
15-
// TODO: Use box syntax when it gets stabilized.
1615
Expr::Seq(lhs, rhs) => {
1716
let lhs = *lhs;
1817
match lhs {

meta/src/optimizer/skipper.rs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pub fn skip(rule: Rule) -> Rule {
3434
ty,
3535
expr: if ty == RuleType::Atomic {
3636
expr.map_top_down(|expr| {
37-
// TODO: Use box syntax when it gets stabilized.
3837
if let Expr::Rep(expr) = expr.clone() {
3938
if let Expr::Seq(lhs, rhs) = *expr {
4039
if let (Expr::NegPred(expr), Expr::Ident(ident)) = (*lhs, *rhs) {

meta/src/parser.rs

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ impl<'i> ParserNode<'i> {
7171
}
7272

7373
match node.expr {
74-
// TODO: Use box syntax when it gets stabilized.
7574
ParserExpr::PosPred(node) => {
7675
filter_internal(*node, f, result);
7776
}

0 commit comments

Comments
 (0)