Skip to content

Commit 312cad1

Browse files
authored
Rollup merge of #110387 - nnethercote:rm-use-rustc_hir-as-ast, r=fee1-dead
Don't `use rustc_hir as ast`(!) It makes for confusing code. This was introduced in a large commit in #67886 that rearranged a lot of `use` statements. I suspect it was an accident.
2 parents 4d868c9 + 1ffa331 commit 312cad1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compiler/rustc_middle/src/ty/relate.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use crate::ty::error::{ExpectedFound, TypeError};
88
use crate::ty::{self, Expr, ImplSubject, Term, TermKind, Ty, TyCtxt, TypeFoldable};
99
use crate::ty::{GenericArg, GenericArgKind, SubstsRef};
10-
use rustc_hir as ast;
10+
use rustc_hir as hir;
1111
use rustc_hir::def_id::DefId;
1212
use rustc_target::spec::abi;
1313
use std::iter;
@@ -123,8 +123,8 @@ pub fn relate_type_and_mut<'tcx, R: TypeRelation<'tcx>>(
123123
} else {
124124
let mutbl = a.mutbl;
125125
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 => {
128128
(ty::Invariant, ty::VarianceDiagInfo::Invariant { ty: base_ty, param_index: 0 })
129129
}
130130
};
@@ -239,12 +239,12 @@ impl<'tcx> Relate<'tcx> for ty::BoundConstness {
239239
}
240240
}
241241

242-
impl<'tcx> Relate<'tcx> for ast::Unsafety {
242+
impl<'tcx> Relate<'tcx> for hir::Unsafety {
243243
fn relate<R: TypeRelation<'tcx>>(
244244
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> {
248248
if a != b {
249249
Err(TypeError::UnsafetyMismatch(expected_found(relation, a, b)))
250250
} else {

0 commit comments

Comments
 (0)