Skip to content

Commit 6bef46c

Browse files
committed
transpile: const macros: fix some grammar in comment about unsafe const contexts
1 parent 7dbe6b1 commit 6bef46c

File tree

1 file changed

+3
-3
lines changed
  • c2rust-transpile/src/translator

1 file changed

+3
-3
lines changed

c2rust-transpile/src/translator/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,9 +2700,9 @@ impl<'c> Translation<'c> {
27002700
let mut init = init?;
27012701

27022702
stmts.append(init.stmts_mut());
2703-
// A const context is not "already unsafe" the way code within a `fn` is (since we
2704-
// translate all fns as unsafe). Therefore, in const context expose any underlying
2705-
// unsafety in the initializer with an unsafe block.
2703+
// A `const` context is not "already unsafe" the way code within a `fn` is
2704+
// (since we translate all `fn`s as `unsafe`). Therefore, in `const` contexts,
2705+
// expose any underlying unsafety in the initializer with an `unsafe` block.
27062706
let init = if ctx.is_const {
27072707
init.to_unsafe_pure_expr()
27082708
.expect("init should not have any statements")

0 commit comments

Comments
 (0)