{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/40413","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/40413/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/40413/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/40413/events","html_url":"https://github.com/rust-lang/rust/pull/40413","id":213321954,"number":40413,"title":"wip: Better error when violating `for<'a> T: 'a`","user":{"login":"tschottdorf","id":5076964,"avatar_url":"https://avatars2.githubusercontent.com/u/5076964?v=3","gravatar_id":"","url":"https://api.github.com/users/tschottdorf","html_url":"https://github.com/tschottdorf","followers_url":"https://api.github.com/users/tschottdorf/followers","following_url":"https://api.github.com/users/tschottdorf/following{/other_user}","gists_url":"https://api.github.com/users/tschottdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/tschottdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschottdorf/subscriptions","organizations_url":"https://api.github.com/users/tschottdorf/orgs","repos_url":"https://api.github.com/users/tschottdorf/repos","events_url":"https://api.github.com/users/tschottdorf/events{/privacy}","received_events_url":"https://api.github.com/users/tschottdorf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars3.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars3.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-03-10T11:54:21Z","updated_at":"2017-03-11T12:56:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/40413","html_url":"https://github.com/rust-lang/rust/pull/40413","diff_url":"https://github.com/rust-lang/rust/pull/40413.diff","patch_url":"https://github.com/rust-lang/rust/pull/40413.patch"},"body":"Rust currently handles certain higher-ranked trait bound such as `where for<'a> T: 'a`\r\nthrough a `'static` region, which gives an unintuitive error message in the case in which\r\nthe lifetime bound does not hold (see #27114). \r\n\r\nThis is a work in progress that gives a better result but not with code worth\r\nchecking in yet. Please see the comments starting with `Q:` in the diff.\r\n\r\nThis is the new message:\r\n\r\n```\r\nerror[E0592]: the type `&'b i32` does not fulfill the required lifetime imposed\r\nby a higher-ranked trait bound\r\n --> /Users/tschottdorf/rust/i27114/main.rs:6:5\r\n  |\r\n6 |     foo::<&'b i32>();\r\n  |     ^^^^^^^^^^^^^^\r\n  |\r\n  = note: type must outlive the static lifetime\r\nnote: which is implied by\r\n --> /Users/tschottdorf/rust/i27114/main.rs:3:23\r\n  |\r\n3 | fn foo<T>() where for<'a> T: 'a {}\r\n  |                       ^^\r\n\r\nerror: aborting due to previous error\r\n```\r\n\r\nFixes the simple case in #27114, though without attempting at all to handle\r\nmore complicated HRTBs (which is also discussed in said issue).\r\n\r\ncc @eddyb"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/285865011","html_url":"https://github.com/rust-lang/rust/pull/40413#issuecomment-285865011","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/40413","id":285865011,"user":{"login":"eddyb","id":77424,"avatar_url":"https://avatars1.githubusercontent.com/u/77424?v=3","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"created_at":"2017-03-11T12:56:34Z","updated_at":"2017-03-11T12:56:34Z","body":"Only one should run but OSX fails to start (only to stop soon after) sometimes. I restarted it, should be green in a minute now."}}
{"actor":{"display_login":"eddyb"}}