Point at bounds when comparing impl items to trait

This commit is contained in:
Esteban Kuber
2021-10-06 12:27:42 +00:00
parent d8a3d7d0b8
commit 446b46673d
15 changed files with 62 additions and 54 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
error[E0276]: impl has stricter requirements than trait
--> $DIR/E0276.rs:6:5
--> $DIR/E0276.rs:6:30
|
LL | fn foo<T>(x: T);
| ---------------- definition of `foo` from trait
...
LL | fn foo<T>(x: T) where T: Copy {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Copy`
| ^^^^ impl has extra requirement `T: Copy`
error: aborting due to previous error