mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
WellFormed -> Holds
This commit is contained in:
parent
408fa148b9
commit
dcb4837b2d
2 changed files with 27 additions and 1 deletions
|
@ -615,7 +615,7 @@ fn find_matching_impl(
|
||||||
let wh_goals =
|
let wh_goals =
|
||||||
crate::chalk_db::convert_where_clauses(db, impl_.into(), &substs)
|
crate::chalk_db::convert_where_clauses(db, impl_.into(), &substs)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|b| b.into_well_formed_goal(Interner).cast(Interner));
|
.map(|b| b.cast(Interner));
|
||||||
|
|
||||||
let goal = crate::Goal::all(Interner, wh_goals);
|
let goal = crate::Goal::all(Interner, wh_goals);
|
||||||
|
|
||||||
|
|
|
@ -1445,6 +1445,32 @@ fn f() {
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#[test]
|
||||||
|
fn wc_case_is_ok() {
|
||||||
|
check(
|
||||||
|
r#"
|
||||||
|
trait G {
|
||||||
|
fn g(&self);
|
||||||
|
}
|
||||||
|
trait BParent{}
|
||||||
|
trait Bound: BParent{}
|
||||||
|
struct Gen<T>(T);
|
||||||
|
impl <T> G for Gen<T>
|
||||||
|
where T : Bound
|
||||||
|
{
|
||||||
|
fn g(&self){
|
||||||
|
//^
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct A;
|
||||||
|
impl Bound for A{}
|
||||||
|
fn f() {
|
||||||
|
let gen = Gen::<A>(A);
|
||||||
|
gen.g$0();
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn method_call_defaulted() {
|
fn method_call_defaulted() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue