]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/issue-22828.rs
Rollup merge of #105756 - notriddle:notriddle/example-wrap-tooltip, r=GuillaumeGomez
[rust.git] / src / test / ui / associated-types / issue-22828.rs
1 // run-pass
2 #![allow(dead_code)]
3 // Test transitive analysis for associated types. Collected types
4 // should be normalized and new obligations generated.
5
6 // pretty-expanded FIXME #23616
7
8 trait Foo {
9     type A;
10     fn foo(&self) {}
11 }
12
13 impl Foo for usize {
14     type A = usize;
15 }
16
17 struct Bar<T: Foo> { inner: T::A }
18
19 fn is_send<T: Send>() {}
20
21 fn main() {
22     is_send::<Bar<usize>>();
23 }