Retire hir::ptr.

This commit is contained in:
Camille GILLOT 2019-12-01 17:48:49 +01:00
parent e2c9dd7a10
commit e569ada528
6 changed files with 2 additions and 153 deletions

View file

@ -5,7 +5,6 @@
use crate::hir::def::{CtorOf, DefKind, Res};
use crate::hir::def_id::DefId;
use crate::hir::print;
use crate::hir::ptr::P;
use crate::hir::{self, ExprKind, GenericArg, GenericArgs};
use crate::lint;
use crate::middle::lang_items::SizedTraitLangItem;
@ -255,7 +254,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
seg: &hir::PathSegment<'_>,
is_method_call: bool,
) -> bool {
let empty_args = P(hir::GenericArgs { args: &[], bindings: &[], parenthesized: false });
let empty_args = hir::GenericArgs::none();
let suppress_mismatch = Self::check_impl_trait(tcx, seg, &def);
Self::check_generic_arg_count(
tcx,

View file

@ -54,7 +54,6 @@ use crate::check::{FnCtxt, Needs};
use errors::DiagnosticBuilder;
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::hir::ptr::P;
use rustc::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use rustc::infer::{Coercion, InferOk, InferResult};
use rustc::traits::{self, ObligationCause, ObligationCauseCode};
@ -1377,12 +1376,6 @@ impl AsCoercionSite for hir::Expr<'_> {
}
}
impl AsCoercionSite for P<hir::Expr<'_>> {
fn as_coercion_site(&self) -> &hir::Expr<'_> {
self
}
}
impl<'a, T> AsCoercionSite for &'a T
where
T: AsCoercionSite,