]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/traits/auxiliary/crate_a1.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / traits / auxiliary / crate_a1.rs
index e2e18500541ef01a328d991cb0619aaf4197b890..6aa010258ebd5c6b15a24f30f1caa7ad6aed5dcf 100644 (file)
@@ -1,11 +1,9 @@
-pub struct Foo;
+pub trait Bar {}
 
-pub trait Bar{}
+pub fn try_foo(x: impl Bar) {}
 
-pub fn bar() -> Box<Bar> {
-    unimplemented!()
+pub struct ImplementsTraitForUsize<T> {
+    _marker: std::marker::PhantomData<T>,
 }
 
-
-pub fn try_foo(x: Foo){}
-pub fn try_bar(x: Box<Bar>){}
+impl Bar for ImplementsTraitForUsize<usize> {}