Add note on nonzero-sized uninhabited types

This commit is contained in:
varkor 2018-10-23 19:13:49 +01:00
parent a38ff377e7
commit 13af92f459

View File

@ -1547,7 +1547,8 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
/// conservative: for some types that are uninhabited we return `false`,
/// but we only return `true` for types that are definitely uninhabited.
/// `ty.conservative_is_uninhabited` implies that any value of type `ty`
/// will be `Abi::Uninhabited`.
/// will be `Abi::Uninhabited`. (Note that uninhabited types may have nonzero
/// size, to account for partial initialisation. See #49298 for details.)
pub fn conservative_is_uninhabited(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> bool {
// FIXME(varkor): we can make this less conversative by substituting concrete
// type arguments.