mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 00:47:18 +00:00
tests: add tests for mismatches with unresolved projections
This commit is contained in:
parent
8d6b65c544
commit
3d373fec8c
2 changed files with 19 additions and 1 deletions
|
@ -136,3 +136,20 @@ impl Trait for () {
|
|||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_mismatches_with_unresolved_projections() {
|
||||
check_no_mismatches(
|
||||
r#"
|
||||
// Thing is {unknown}
|
||||
fn create() -> Option<(i32, Thing)> {
|
||||
Some((69420, Thing))
|
||||
}
|
||||
|
||||
fn consume() -> Option<()> {
|
||||
let (number, thing) = create()?;
|
||||
Some(())
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,8 @@ use hir_ty::{
|
|||
traits::FnTrait,
|
||||
AliasTy, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast, ClosureId, GenericArg,
|
||||
GenericArgData, Interner, ParamKind, QuantifiedWhereClause, Scalar, Substitution,
|
||||
TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyDefId, TyExt, TyKind, ValueTyDefId, WhereClause,
|
||||
TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyDefId, TyExt, TyKind, ValueTyDefId,
|
||||
WhereClause,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use nameres::diagnostics::DefDiagnosticKind;
|
||||
|
|
Loading…
Reference in a new issue