Merge pull request #21076 from asukaminato0721/10018

add test for Associated type of super trait not resolved in dyn syntax. #10018
This commit is contained in:
Shoyu Vanilla (Flint)
2025-11-21 04:32:43 +00:00
committed by GitHub
@@ -46,6 +46,27 @@ fn main() {
let _ = S::X;
//^^^^ error: no such associated item
}
"#,
);
}
#[test]
fn dyn_super_trait_assoc_type() {
check_diagnostics(
r#"
//- minicore: future, send
use core::{future::Future, marker::Send, pin::Pin};
trait FusedFuture: Future {
fn is_terminated(&self) -> bool;
}
struct Box<T: ?Sized>(*const T);
fn main() {
let _fut: Pin<Box<dyn FusedFuture<Output = ()> + Send>> = loop {};
}
"#,
);
}