Skip to content

Commit 94e8a22

Browse files
add test
1 parent 6b65781 commit 94e8a22

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

crates/ide-diagnostics/src/handlers/unresolved_assoc_item.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,27 @@ fn main() {
4646
let _ = S::X;
4747
//^^^^ error: no such associated item
4848
}
49+
"#,
50+
);
51+
}
52+
53+
#[test]
54+
fn dyn_super_trait_assoc_type() {
55+
check_diagnostics(
56+
r#"
57+
//- minicore: future, send
58+
59+
use core::{future::Future, marker::Send, pin::Pin};
60+
61+
trait FusedFuture: Future {
62+
fn is_terminated(&self) -> bool;
63+
}
64+
65+
struct Box<T: ?Sized>(*const T);
66+
67+
fn main() {
68+
let _fut: Pin<Box<dyn FusedFuture<Output = ()> + Send>> = loop {};
69+
}
4970
"#,
5071
);
5172
}

0 commit comments

Comments
 (0)