Stop ICEing on impossible predicates.
This commit is contained in:
parent
d7c59370ce
commit
61ede075bf
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue