-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
Play link: http://is.gd/WYlDGu
use std::ops::Deref;
struct Foo;
impl<Foo> Deref for Foo { }
fn main() {}
Error message:
<anon>:5:1: 5:28 error: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct<T>`); only traits defined in the current crate can be implemented for a type parameter [E0210]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0210
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `core`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `core`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `core`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `core`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `alloc`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `alloc`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `core`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `alloc`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `core`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:5:1: 5:28 help: see the detailed explanation for E0119
<anon>:5:1: 5:28 note: conflicting implementation in crate `std`
<anon>:5 impl<Foo> Deref for Foo { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 22 previous errors
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints