{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/28981","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/28981/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28981/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/28981/events","html_url":"https://github.com/rust-lang/rust/issues/28981","id":110906766,"number":28981,"title":"WTF Error Message with `impl<T> Deref for T","user":{"login":"Havvy","id":731722,"avatar_url":"https://avatars.githubusercontent.com/u/731722?v=3","gravatar_id":"","url":"https://api.github.com/users/Havvy","html_url":"https://github.com/Havvy","followers_url":"https://api.github.com/users/Havvy/followers","following_url":"https://api.github.com/users/Havvy/following{/other_user}","gists_url":"https://api.github.com/users/Havvy/gists{/gist_id}","starred_url":"https://api.github.com/users/Havvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Havvy/subscriptions","organizations_url":"https://api.github.com/users/Havvy/orgs","repos_url":"https://api.github.com/users/Havvy/repos","events_url":"https://api.github.com/users/Havvy/events{/privacy}","received_events_url":"https://api.github.com/users/Havvy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-diagnostics","name":"A-diagnostics","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-12T04:15:17Z","updated_at":"2015-10-12T12:57:48Z","closed_at":null,"body":"Play link:  http://is.gd/WYlDGu\r\n\r\n```rust\r\nuse std::ops::Deref;\r\n\r\nstruct Foo;\r\n\r\nimpl<Foo> Deref for Foo { }\r\n\r\nfn main() {}\r\n```\r\n\r\nError message:\r\n\r\n```\r\n<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]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0210\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `core`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `core`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `core`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `core`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `alloc`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `alloc`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `core`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `alloc`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `collections`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `core`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 error: conflicting implementations for trait `core::ops::Deref` [E0119]\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n<anon>:5:1: 5:28 help: see the detailed explanation for E0119\r\n<anon>:5:1: 5:28 note: conflicting implementation in crate `std`\r\n<anon>:5 impl<Foo> Deref for Foo { }\r\n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nerror: aborting due to 22 previous errors\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/147390357","html_url":"https://github.com/rust-lang/rust/issues/28981#issuecomment-147390357","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28981","id":147390357,"user":{"login":"jonas-schievink","id":1786438,"avatar_url":"https://avatars.githubusercontent.com/u/1786438?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas-schievink","html_url":"https://github.com/jonas-schievink","followers_url":"https://api.github.com/users/jonas-schievink/followers","following_url":"https://api.github.com/users/jonas-schievink/following{/other_user}","gists_url":"https://api.github.com/users/jonas-schievink/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas-schievink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas-schievink/subscriptions","organizations_url":"https://api.github.com/users/jonas-schievink/orgs","repos_url":"https://api.github.com/users/jonas-schievink/repos","events_url":"https://api.github.com/users/jonas-schievink/events{/privacy}","received_events_url":"https://api.github.com/users/jonas-schievink/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T12:57:48Z","updated_at":"2015-10-12T12:57:48Z","body":"It would be useful if the `note` actually contained the conflicting impl and not the same code that's already printed by the `error`. I wonder how hard it would be to reconstruct the impl header from the crate metadata.\r\n\r\nIt should also probably abort after like 5 conflicts for the same impl and just print `note: N more conflicts not shown` or something similar."}}