Revert "Structurally resolve correctly in check_pat_lit"
This reverts commit 54fb5a48b9
.
This commit is contained in:
parent
1d67eba687
commit
e304a1f13b
4 changed files with 30 additions and 3 deletions
|
@ -393,8 +393,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
// They can denote both statically and dynamically-sized byte arrays.
|
||||
let mut pat_ty = ty;
|
||||
if let hir::ExprKind::Lit(Spanned { node: ast::LitKind::ByteStr(..), .. }) = lt.kind {
|
||||
if let ty::Ref(_, inner_ty, _) = *self.structurally_resolved_type(span, expected).kind()
|
||||
&& self.structurally_resolved_type(span, inner_ty).is_slice()
|
||||
let expected = self.structurally_resolved_type(span, expected);
|
||||
if let ty::Ref(_, inner_ty, _) = expected.kind()
|
||||
&& matches!(inner_ty.kind(), ty::Slice(_))
|
||||
{
|
||||
let tcx = self.tcx;
|
||||
trace!(?lt.hir_id.local_id, "polymorphic byte string lit");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue