From 8bcbcc454cbb48b897083c122566c0b4c2b780aa Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 14 Apr 2019 13:07:45 +0200 Subject: Extract generic_params method to a HasGenericParams trait --- crates/ra_hir/src/ty/infer.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src/ty/infer.rs') diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 28459d750..651a78fe5 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -20,9 +20,9 @@ use std::sync::Arc; use std::mem; use ena::unify::{InPlaceUnificationTable, UnifyKey, UnifyValue, NoError}; -use ra_arena::map::ArenaMap; use rustc_hash::FxHashMap; +use ra_arena::map::ArenaMap; use test_utils::tested_by; use crate::{ @@ -33,15 +33,18 @@ use crate::{ ImplItem, type_ref::{TypeRef, Mutability}, expr::{Body, Expr, BindingAnnotation, Literal, ExprId, Pat, PatId, UnaryOp, BinaryOp, Statement, FieldPat,Array, self}, - generics::GenericParams, + generics::{GenericParams, HasGenericParams}, path::{GenericArgs, GenericArg}, adt::VariantDef, resolve::{Resolver, Resolution}, nameres::Namespace, - ty::infer::diagnostics::InferenceDiagnostic, diagnostics::DiagnosticSink, }; -use super::{Ty, TypableDef, Substs, primitive, op, ApplicationTy, TypeCtor, traits::{ Solution, Obligation, Guidance}, CallableDef, TraitRef}; +use super::{ + Ty, TypableDef, Substs, primitive, op, ApplicationTy, TypeCtor, CallableDef, TraitRef, + traits::{ Solution, Obligation, Guidance}, +}; +use self::diagnostics::InferenceDiagnostic; /// The entry point of type inference. pub fn infer(db: &impl HirDatabase, def: DefWithBody) -> Arc { -- cgit v1.2.3