Bug
Ty::is_trivially_not_async_drop hits todo!() on ty::UnsafeBinder(_). Ty::is_async_drop always consults this fast path before is_async_drop_raw, so any query of whether an unsafe-binder type implements AsyncDrop ICEs.
Sibling trivial predicates (is_trivially_freeze, is_trivially_unpin) treat UnsafeBinder as non-trivial (false / not in the pure-true arms) rather than panicking. Without TyCtxt in this method we cannot erase binder regions, so the conservative fix is => false (not known to be !AsyncDrop).
Affected code
compiler/rustc_middle/src/ty/util.rs (is_trivially_not_async_drop)
Impact
ICE (I-crash) on the unstable unsafe_binder feature when async-drop queries reach binder types. Distinct from #525 (pointer_kind in cast.rs) and from the #567 remaining-table sites (validity, mangling, rustc_public, normalizes_to, consts).
Origin
| Lines |
Commit |
Date |
Author |
| 1304-1305 |
9a1c5eb5b385 |
2024-12-21 |
Michael Goulet |
Suggested fix
Replace todo!() with false, matching the conservative handling used for other non-trivial type kinds in this match.
Related
Bug
Ty::is_trivially_not_async_drophitstodo!()onty::UnsafeBinder(_).Ty::is_async_dropalways consults this fast path beforeis_async_drop_raw, so any query of whether an unsafe-binder type implementsAsyncDropICEs.Sibling trivial predicates (
is_trivially_freeze,is_trivially_unpin) treatUnsafeBinderas non-trivial (false/ not in the pure-true arms) rather than panicking. WithoutTyCtxtin this method we cannot erase binder regions, so the conservative fix is=> false(not known to be!AsyncDrop).Affected code
compiler/rustc_middle/src/ty/util.rs(is_trivially_not_async_drop)Impact
ICE (
I-crash) on the unstableunsafe_binderfeature when async-drop queries reach binder types. Distinct from #525 (pointer_kindincast.rs) and from the #567 remaining-table sites (validity, mangling, rustc_public, normalizes_to, consts).Origin
9a1c5eb5b385Suggested fix
Replace
todo!()withfalse, matching the conservative handling used for other non-trivial type kinds in this match.Related