-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-coroutinesArea: CoroutinesArea: CoroutinesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This code here has a potential issue:
rust/compiler/rustc_mir_transform/src/coroutine.rs
Lines 1967 to 1977 in 010f394
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?
Metadata
Metadata
Assignees
Labels
A-coroutinesArea: CoroutinesArea: CoroutinesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.