payload: {"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/39532","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/39532/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/39532/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/39532/events","html_url":"https://github.com/rust-lang/rust/issues/39532","id":205345832,"node_id":"MDU6SXNzdWUyMDUzNDU4MzI=","number":39532,"title":"Specifying associated type requires redundant constraints","user":{"login":"sgrif","id":1529387,"node_id":"MDQ6VXNlcjE1MjkzODc=","avatar_url":"https://avatars2.githubusercontent.com/u/1529387?v=4","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"labels":[{"id":37544,"node_id":"MDU6TGFiZWwzNzU0NA==","url":"https://api.github.com/repos/rust-lang/rust/labels/A-typesystem","name":"A-typesystem","color":"f7e101","default":false},{"id":650731663,"node_id":"MDU6TGFiZWw2NTA3MzE2NjM=","url":"https://api.github.com/repos/rust-lang/rust/labels/C-bug","name":"C-bug","color":"f5f1fd","default":false},{"id":211668100,"node_id":"MDU6TGFiZWwyMTE2NjgxMDA=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-04T12:44:04Z","updated_at":"2019-11-05T01:10:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"[Reproduction script](https://is.gd/c5tzso)\r\n\r\nExpected behavior: The file compiles successfully\r\nActual behavior: The function `x` requires an additional `<T as Foo>::Baz: Bar<U>`. This check is entirely redundant with the trait definition, and would always have to be true for `T: Foo<Bar=U>` to hold.\r\n\r\nThis only occurs if the constraint referencing the first associated type is a parameter to the trait, not an associated type, which is why this doesn't happen for `IntoIterator`. This appears to have been an unintended side effect of [RFC 1214](https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/549618472","html_url":"https://github.com/rust-lang/rust/issues/39532#issuecomment-549618472","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/39532","id":549618472,"node_id":"MDEyOklzc3VlQ29tbWVudDU0OTYxODQ3Mg==","user":{"login":"estebank","id":1606434,"node_id":"MDQ6VXNlcjE2MDY0MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1606434?v=4","gravatar_id":"","url":"https://api.github.com/users/estebank","html_url":"https://github.com/estebank","followers_url":"https://api.github.com/users/estebank/followers","following_url":"https://api.github.com/users/estebank/following{/other_user}","gists_url":"https://api.github.com/users/estebank/gists{/gist_id}","starred_url":"https://api.github.com/users/estebank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estebank/subscriptions","organizations_url":"https://api.github.com/users/estebank/orgs","repos_url":"https://api.github.com/users/estebank/repos","events_url":"https://api.github.com/users/estebank/events{/privacy}","received_events_url":"https://api.github.com/users/estebank/received_events","type":"User","site_admin":false},"created_at":"2019-11-05T01:10:13Z","updated_at":"2019-11-05T01:10:13Z","author_association":"CONTRIBUTOR","body":"Current output:\r\n\r\n```\r\nerror[E0277]: the trait bound `<T as Foo>::Baz: Bar<U>` is not satisfied\r\n  --> src/main.rs:9:1\r\n   |\r\n1  |   trait Foo {\r\n   |   --------- required by `Foo`\r\n...\r\n9  |   fn x<T: Foo<Bar=U>, U>(t: &T) {\r\n   |   ^                            - help: consider further restricting the associated type: `where <T as Foo>::Baz: Bar<U>`\r\n   |  _|\r\n   | |\r\n10 | | }\r\n   | |_^ the trait `Bar<U>` is not implemented for `<T as Foo>::Baz`\r\n```"}}
other: {"actor":{"display_login":"estebank"}}