Skip to content

Commit 0878cde

Browse files
committed
Auto merge of rust-lang#16524 - evertedsphere:swann/trait-bound-dyn, r=Veykril
minor: test that flip_trait_bound works with trait objects Closes rust-lang/rust-analyzer#16522.
2 parents 1ef7a23 + dcdfc35 commit 0878cde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/ide-assists/src/handlers/flip_trait_bound.rs

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ mod tests {
5858
check_assist_not_applicable(flip_trait_bound, "struct S<T> where T: $0A { }")
5959
}
6060

61+
#[test]
62+
fn flip_trait_bound_works_for_dyn() {
63+
check_assist(flip_trait_bound, "fn f<'a>(x: dyn Copy $0+ 'a)", "fn f<'a>(x: dyn 'a + Copy)")
64+
}
65+
6166
#[test]
6267
fn flip_trait_bound_works_for_struct() {
6368
check_assist(

0 commit comments

Comments
 (0)