diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-30123-aux.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-30123-aux.rs b/src/test/ui/issues/auxiliary/issue-30123-aux.rs new file mode 100644 index 000000000..07c743eb2 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-30123-aux.rs @@ -0,0 +1,23 @@ +use std::marker::PhantomData; + +pub struct Directed; +pub struct Undirected; + +pub struct Graph<N, E, Ty = Directed> { + nodes: Vec<PhantomData<N>>, + edges: Vec<PhantomData<E>>, + ty: PhantomData<Ty>, +} + + +impl<N, E> Graph<N, E, Directed> { + pub fn new() -> Self { + Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData} + } +} + +impl<N, E> Graph<N, E, Undirected> { + pub fn new_undirected() -> Self { + Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData} + } +} |