allow inference vars in type_implements_trait
This commit is contained in:
parent
26f7030b16
commit
40ee019c17
9 changed files with 118 additions and 46 deletions
|
@ -1559,9 +1559,22 @@ rustc_queries! {
|
|||
desc { "evaluating trait selection obligation `{}`", goal.value }
|
||||
}
|
||||
|
||||
/// Evaluates whether the given type implements the given trait
|
||||
/// in the given environment.
|
||||
///
|
||||
/// The inputs are:
|
||||
///
|
||||
/// - the def-id of the trait
|
||||
/// - the self type
|
||||
/// - the *other* type parameters of the trait, excluding the self-type
|
||||
/// - the parameter environment
|
||||
///
|
||||
/// FIXME. If the type, trait, or environment has inference variables,
|
||||
/// this yields `EvaluatedToUnknown`. It should be refactored
|
||||
/// to use canonicalization, really.
|
||||
query type_implements_trait(
|
||||
key: (DefId, Ty<'tcx>, SubstsRef<'tcx>, ty::ParamEnv<'tcx>, )
|
||||
) -> bool {
|
||||
) -> traits::EvaluationResult {
|
||||
desc { "evaluating `type_implements_trait` `{:?}`", key }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue