Auto merge of #16524 - evertedsphere:swann/trait-bound-dyn, r=Veykril

minor: test that flip_trait_bound works with trait objects

Closes https://github.com/rust-lang/rust-analyzer/issues/16522.
This commit is contained in:
bors 2024-02-10 10:59:46 +00:00
commit 0878cdef2a

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(