We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
align_of
pref_align_of
1 parent 32729ce commit cdfc7afCopy full SHA for cdfc7af
1 file changed
c2rust-transpile/src/translator/mod.rs
@@ -3399,6 +3399,12 @@ impl<'c> Translation<'c> {
3399
path.push(mk().path_segment("intrinsics"));
3400
path.push(mk().path_segment_with_args("pref_align_of", mk().angle_bracketed_args(tys)));
3401
} else {
3402
+ if preferred {
3403
+ warn!(
3404
+ "using `core::mem::align_of` instead of `core::intrinsics::pref_align_of` \
3405
+ for preferred alignment (`__alignof`/`__alignof__`) as the latter has been removed in Rust"
3406
+ );
3407
+ }
3408
path.push(mk().path_segment("mem"));
3409
path.push(mk().path_segment_with_args("align_of", mk().angle_bracketed_args(tys)));
3410
}
0 commit comments