]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/traits/auxiliary/crate_a1.rs
fixup! Add negative tests where the diagnostic message would be wrong
[rust.git] / src / test / ui / traits / auxiliary / crate_a1.rs
index 724206860fe501408281b38ae285e553d119e730..6aa010258ebd5c6b15a24f30f1caa7ad6aed5dcf 100644 (file)
@@ -1,5 +1,9 @@
-pub struct Foo;
+pub trait Bar {}
 
-pub trait Bar{}
+pub fn try_foo(x: impl Bar) {}
 
-pub fn try_foo(x: impl Bar){}
+pub struct ImplementsTraitForUsize<T> {
+    _marker: std::marker::PhantomData<T>,
+}
+
+impl Bar for ImplementsTraitForUsize<usize> {}