]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-18906.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / issues / issue-18906.rs
CommitLineData
60c5eb7d 1// check-pass
0bf4aa26 2#![allow(dead_code)]
c34b1796
AL
3// pretty-expanded FIXME #23616
4
1a4d82fc
JJ
5pub trait Borrow<Borrowed: ?Sized> {
6 fn borrow(&self) -> &Borrowed;
7}
8
9impl<T: Sized> Borrow<T> for T {
10 fn borrow(&self) -> &T { self }
11}
12
13trait Foo {
14 fn foo(&self, other: &Self);
15}
16
17fn bar<K, Q>(k: &K, q: &Q) where K: Borrow<Q>, Q: Foo {
18 q.foo(k.borrow())
19}
20
85aaf69f 21struct MyTree<K>(K);
1a4d82fc
JJ
22
23impl<K> MyTree<K> {
24 // This caused a failure in #18906
25 fn bar<Q>(k: &K, q: &Q) where K: Borrow<Q>, Q: Foo {
26 q.foo(k.borrow())
27 }
28}
29
30fn main() {}