This code here has a potential issue:
|
ty::Adt(..) if ty.is_box() => { |
|
let boxed_ty = ty.boxed_ty(); |
|
let descr_pre = &format!("{}boxed ", data.descr_pre); |
|
check_must_not_suspend_ty( |
|
tcx, |
|
boxed_ty, |
|
hir_id, |
|
param_env, |
|
SuspendCheckData { descr_pre, ..data }, |
|
) |
|
} |
If the Box has a custom allocator, then that will not be checked at all. So whatever check_must_not_suspend_ty is used for, it ignores anything stored in custom allocators.
It seems like this is just for a lint, so this is probably not critical, but I guess should still be fixed.
Cc @cjgillot -- not sure whom else to ping for coroutine state machine transform things?
This code here has a potential issue:
rust/compiler/rustc_mir_transform/src/coroutine.rs
Lines 1967 to 1977 in 010f394
If the Box has a custom allocator, then that will not be checked at all. So whatever
check_must_not_suspend_tyis used for, it ignores anything stored in custom allocators.It seems like this is just for a lint, so this is probably not critical, but I guess should still be fixed.
Cc @cjgillot -- not sure whom else to ping for coroutine state machine transform things?