]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/issue-22019.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / traits / issue-22019.rs
CommitLineData
b7449926 1// run-pass
85aaf69f
SL
2// Test an issue where global caching was causing free regions from
3// distinct scopes to be compared (`'g` and `'h`). The only important
4// thing is that compilation succeeds here.
5
c34b1796
AL
6// pretty-expanded FIXME #23616
7
85aaf69f
SL
8#![allow(missing_copy_implementations)]
9#![allow(unused_variables)]
10
11use std::borrow::ToOwned;
12
13pub struct CFGNode;
14
15pub type Node<'a> = &'a CFGNode;
16
17pub trait GraphWalk<'c, N> {
18 /// Returns all the nodes in this graph.
19 fn nodes(&'c self) where [N]:ToOwned<Owned=Vec<N>>;
20}
21
22impl<'g> GraphWalk<'g, Node<'g>> for u32
23{
24 fn nodes(&'g self) where [Node<'g>]:ToOwned<Owned=Vec<Node<'g>>>
25 { loop { } }
26}
27
28impl<'h> GraphWalk<'h, Node<'h>> for u64
29{
30 fn nodes(&'h self) where [Node<'h>]:ToOwned<Owned=Vec<Node<'h>>>
31 { loop { } }
32}
33
34fn main() { }