File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
c2rust-transpile/src/translator Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2700,9 +2700,9 @@ impl<'c> Translation<'c> {
2700
2700
let mut init = init?;
2701
2701
2702
2702
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.
2706
2706
let init = if ctx. is_const {
2707
2707
init. to_unsafe_pure_expr ( )
2708
2708
. expect ( "init should not have any statements" )
You can’t perform that action at this time.
0 commit comments