2021-04-06 20:16:11 -05:00
|
|
|
error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-28981.rs:5:1
|
2017-10-22 10:14:53 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | impl<Foo> Deref for Foo { }
|
2017-12-18 01:46:55 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2017-10-22 10:14:53 -05:00
|
|
|
|
|
|
|
|
= note: conflicting implementation in crate `core`:
|
2020-09-02 02:40:56 -05:00
|
|
|
- impl<T> Deref for &T
|
2017-10-22 10:14:53 -05:00
|
|
|
where T: ?Sized;
|
|
|
|
|
2018-11-26 20:59:49 -06:00
|
|
|
error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g., `MyStruct<Foo>`)
|
2019-10-12 16:31:23 -05:00
|
|
|
--> $DIR/issue-28981.rs:5:6
|
2017-10-22 10:14:53 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | impl<Foo> Deref for Foo { }
|
2019-10-12 16:31:23 -05:00
|
|
|
| ^^^ type parameter `Foo` must be used as the type parameter for some local type
|
2018-03-14 21:10:28 -05:00
|
|
|
|
|
2020-10-17 04:56:54 -05:00
|
|
|
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
|
2018-03-14 21:10:28 -05:00
|
|
|
= note: only traits defined in the current crate can be implemented for a type parameter
|
2017-10-22 10:14:53 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0119, E0210.
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about an error, try `rustc --explain E0119`.
|