The <*const T>::guaranteed_* methods now return an option for the unknown case
This commit is contained in:
@@ -97,7 +97,7 @@ pub(crate) fn const_to_valtree_inner<'tcx>(
|
||||
}
|
||||
|
||||
// Raw pointers are not allowed in type level constants, as we cannot properly test them for
|
||||
// equality at compile-time (see `ptr_guaranteed_eq`/`_ne`).
|
||||
// equality at compile-time (see `ptr_guaranteed_cmp`).
|
||||
// Technically we could allow function pointers (represented as `ty::Instance`), but this is not guaranteed to
|
||||
// agree with runtime equality tests.
|
||||
ty::FnPtr(_) | ty::RawPtr(_) => Err(ValTreeCreationError::NonSupportedType),
|
||||
|
||||
Reference in New Issue
Block a user