Stop ICEing on impossible predicates.
This commit is contained in:
@@ -846,9 +846,10 @@ impl Map {
|
||||
|
||||
if let ty::Ref(_, ref_ty, _) | ty::RawPtr(ref_ty, _) = ty.kind()
|
||||
&& let ty::Slice(..) = ref_ty.kind()
|
||||
// The user may have written a predicate like `[T]: Sized` in their where clauses,
|
||||
// which makes slices scalars.
|
||||
&& self.places[place].value_index.is_none()
|
||||
{
|
||||
assert!(self.places[place].value_index.is_none(), "slices are not scalars");
|
||||
|
||||
// Prepend new child to the linked list.
|
||||
let len = self.places.push(PlaceInfo::new(Some(TrackElem::DerefLen)));
|
||||
self.places[len].next_sibling = self.places[place].first_child;
|
||||
|
||||
Reference in New Issue
Block a user