Skip to content

Commit dfd8828

Browse files
committed
Add basic clippy support for cilk keywords
1 parent 69e127a commit dfd8828

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/tools/clippy/clippy_utils/src

src/tools/clippy/clippy_utils/src/sugg.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ impl<'a> Sugg<'a> {
222222
| ast::ExprKind::Array(..)
223223
| ast::ExprKind::While(..)
224224
| ast::ExprKind::Await(..)
225+
// TODO(jhilton): think harder about clippy suggestions for cilk_spawn and cilk_sync. Also add
226+
// tests if that behavior becomes more complicated.
227+
| ast::ExprKind::CilkSpawn(..)
228+
| ast::ExprKind::CilkSync
225229
| ast::ExprKind::Err => Sugg::NonParen(snippet_with_context(cx, expr.span, ctxt, default, app).0),
226230
ast::ExprKind::Range(ref lhs, ref rhs, RangeLimits::HalfOpen) => Sugg::BinOp(
227231
AssocOp::DotDot,

0 commit comments

Comments
 (0)