diff options
| author | fee1-dead <ent3rm4n@gmail.com> | 2023-04-16 14:24:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-16 14:24:33 +0800 |
| commit | 312cad1f74c3abc6fb273e7dfcf1c52ddef25666 (patch) | |
| tree | 160c2d714b88f79ecaf3af7a7f6721379101ec97 | |
| parent | 4d868c9508cd69b5f9622b6775b2ab670e33998c (diff) | |
| parent | 1ffa331c728d1e850922588499111232c56d86c7 (diff) | |
| download | rust-312cad1f74c3abc6fb273e7dfcf1c52ddef25666.tar.gz rust-312cad1f74c3abc6fb273e7dfcf1c52ddef25666.zip | |
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.
| -rw-r--r-- | compiler/rustc_middle/src/ty/relate.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 46c931d61dc..c6d10f4741a 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -7,7 +7,7 @@ use crate::ty::error::{ExpectedFound, TypeError}; use crate::ty::{self, Expr, ImplSubject, Term, TermKind, Ty, TyCtxt, TypeFoldable}; use crate::ty::{GenericArg, GenericArgKind, SubstsRef}; -use rustc_hir as ast; +use rustc_hir as hir; use rustc_hir::def_id::DefId; use rustc_target::spec::abi; use std::iter; @@ -123,8 +123,8 @@ pub fn relate_type_and_mut<'tcx, R: TypeRelation<'tcx>>( } else { let mutbl = a.mutbl; let (variance, info) = match mutbl { - ast::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None), - ast::Mutability::Mut => { + hir::Mutability::Not => (ty::Covariant, ty::VarianceDiagInfo::None), + hir::Mutability::Mut => { (ty::Invariant, ty::VarianceDiagInfo::Invariant { ty: base_ty, param_index: 0 }) } }; @@ -239,12 +239,12 @@ impl<'tcx> Relate<'tcx> for ty::BoundConstness { } } -impl<'tcx> Relate<'tcx> for ast::Unsafety { +impl<'tcx> Relate<'tcx> for hir::Unsafety { fn relate<R: TypeRelation<'tcx>>( relation: &mut R, - a: ast::Unsafety, - b: ast::Unsafety, - ) -> RelateResult<'tcx, ast::Unsafety> { + a: hir::Unsafety, + b: hir::Unsafety, + ) -> RelateResult<'tcx, hir::Unsafety> { if a != b { Err(TypeError::UnsafetyMismatch(expected_found(relation, a, b))) } else { |
