{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/18937","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/18937/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/18937/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/18937/events","html_url":"https://github.com/rust-lang/rust/issues/18937","id":48705121,"number":18937,"title":"Methods in impls allowed more restrictive lifetime bounds than in the trait.","user":{"login":"eddyb","id":77424,"avatar_url":"https://avatars.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},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/P-high","name":"P-high","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.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":7,"created_at":"2014-11-13T23:03:18Z","updated_at":"2015-07-19T18:00:28Z","closed_at":null,"body":"```rust\r\ntrait Foo {\r\n    fn foo<T>(self) -> u64;\r\n}\r\nimpl Foo for () {\r\n    fn foo<T: 'static>(self) -> u64 {\r\n        //    ^^^^^^^ this should cause an error, the bound is missing from the\r\n        // method definition in the trait, and calls are checked against that.\r\n        std::intrinsics::TypeId::of::<&'static T>().hash()\r\n    }\r\n}\r\nfn main() {\r\n    println!(\"{}\", ().foo::<&()>());\r\n}\r\n// error: internal compiler error: non-static region found when hashing a type\r\n```\r\ncc @nikomatsakis"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/122689138","html_url":"https://github.com/rust-lang/rust/issues/18937#issuecomment-122689138","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/18937","id":122689138,"user":{"login":"stevenblenkinsop","id":3118803,"avatar_url":"https://avatars.githubusercontent.com/u/3118803?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenblenkinsop","html_url":"https://github.com/stevenblenkinsop","followers_url":"https://api.github.com/users/stevenblenkinsop/followers","following_url":"https://api.github.com/users/stevenblenkinsop/following{/other_user}","gists_url":"https://api.github.com/users/stevenblenkinsop/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenblenkinsop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenblenkinsop/subscriptions","organizations_url":"https://api.github.com/users/stevenblenkinsop/orgs","repos_url":"https://api.github.com/users/stevenblenkinsop/repos","events_url":"https://api.github.com/users/stevenblenkinsop/events{/privacy}","received_events_url":"https://api.github.com/users/stevenblenkinsop/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T18:00:28Z","updated_at":"2015-07-19T18:00:28Z","body":"Ran into an example that creates unsoundness and doesn't use unsafe. I think it's ultimately the same issue:\r\n\r\nhttps://play.rust-lang.org/?gist=25b7461083e5ee9b3415&version=nightly"}}