|
7 | 7 | use crate::ty::error::{ExpectedFound, TypeError};
|
8 | 8 | use crate::ty::{self, Expr, ImplSubject, Term, TermKind, Ty, TyCtxt, TypeFoldable};
|
9 | 9 | use crate::ty::{GenericArg, GenericArgKind, SubstsRef};
|
10 |
| -use rustc_hir as ast; |
| 10 | +use rustc_hir as hir; |
11 | 11 | use rustc_hir::def_id::DefId;
|
12 | 12 | use rustc_target::spec::abi;
|
13 | 13 | use std::iter;
|
@@ -123,8 +123,8 @@ pub fn relate_type_and_mut<'tcx, R: TypeRelation<'tcx>>(
|
123 | 123 | } else {
|
124 | 124 | let mutbl = a.mutbl;
|
125 | 125 | let (variance, info) = match mutbl {
|
126 |
| - ast::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None), |
127 |
| - ast::Mutability::Mut => { |
| 126 | + hir::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None), |
| 127 | + hir::Mutability::Mut => { |
128 | 128 | (ty::Invariant, ty::VarianceDiagInfo::Invariant { ty: base_ty, param_index: 0 })
|
129 | 129 | }
|
130 | 130 | };
|
@@ -239,12 +239,12 @@ impl<'tcx> Relate<'tcx> for ty::BoundConstness {
|
239 | 239 | }
|
240 | 240 | }
|
241 | 241 |
|
242 |
| -impl<'tcx> Relate<'tcx> for ast::Unsafety { |
| 242 | +impl<'tcx> Relate<'tcx> for hir::Unsafety { |
243 | 243 | fn relate<R: TypeRelation<'tcx>>(
|
244 | 244 | relation: &mut R,
|
245 |
| - a: ast::Unsafety, |
246 |
| - b: ast::Unsafety, |
247 |
| - ) -> RelateResult<'tcx, ast::Unsafety> { |
| 245 | + a: hir::Unsafety, |
| 246 | + b: hir::Unsafety, |
| 247 | + ) -> RelateResult<'tcx, hir::Unsafety> { |
248 | 248 | if a != b {
|
249 | 249 | Err(TypeError::UnsafetyMismatch(expected_found(relation, a, b)))
|
250 | 250 | } else {
|
|
0 commit comments