test that flip_trait_bound works with trait objects

This commit is contained in:
Soham Chowdhury 2024-02-10 11:06:07 +01:00
parent aa97edb214
commit dcdfc35fce

View File

@ -58,6 +58,11 @@ mod tests {
check_assist_not_applicable(flip_trait_bound, "struct S<T> where T: $0A { }")
}
#[test]
fn flip_trait_bound_works_for_dyn() {
check_assist(flip_trait_bound, "fn f<'a>(x: dyn Copy $0+ 'a)", "fn f<'a>(x: dyn 'a + Copy)")
}
#[test]
fn flip_trait_bound_works_for_struct() {
check_assist(