diff options
Diffstat (limited to 'tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs')
-rw-r--r-- | tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs new file mode 100644 index 000000000..df47be070 --- /dev/null +++ b/tests/ui/missing-trait-bounds/missing-trait-bound-for-op.rs @@ -0,0 +1,7 @@ +// run-rustfix + +pub fn foo<T>(s: &[T], t: &[T]) { + let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` +} + +fn main() {} |