Change ty.kind to a method
This commit is contained in:
parent
ef55a0a92f
commit
3e14b684dd
189 changed files with 947 additions and 899 deletions
|
@ -367,7 +367,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
let tcx = self.hir.tcx();
|
||||
let place_ty =
|
||||
Place::ty_from(base_place.local, &base_place.projection, &self.local_decls, tcx);
|
||||
if let ty::Slice(_) = place_ty.ty.kind {
|
||||
if let ty::Slice(_) = place_ty.ty.kind() {
|
||||
// We need to create fake borrows to ensure that the bounds
|
||||
// check that we just did stays valid. Since we can't assign to
|
||||
// unsized values, we only need to ensure that none of the
|
||||
|
@ -406,7 +406,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
&self.local_decls,
|
||||
tcx,
|
||||
);
|
||||
match index_ty.ty.kind {
|
||||
match index_ty.ty.kind() {
|
||||
// The previous index expression has already
|
||||
// done any index expressions needed here.
|
||||
ty::Slice(_) => break,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue