{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48989","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48989/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48989/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48989/events","html_url":"https://github.com/rust-lang/rust/pull/48989","id":304895850,"number":48989,"title":"Make signature of Path::strip_prefix accept non-references","user":{"login":"ExpHP","id":1411280,"avatar_url":"https://avatars0.githubusercontent.com/u/1411280?v=4","gravatar_id":"","url":"https://api.github.com/users/ExpHP","html_url":"https://github.com/ExpHP","followers_url":"https://api.github.com/users/ExpHP/followers","following_url":"https://api.github.com/users/ExpHP/following{/other_user}","gists_url":"https://api.github.com/users/ExpHP/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpHP/subscriptions","organizations_url":"https://api.github.com/users/ExpHP/orgs","repos_url":"https://api.github.com/users/ExpHP/repos","events_url":"https://api.github.com/users/ExpHP/events{/privacy}","received_events_url":"https://api.github.com/users/ExpHP/received_events","type":"User","site_admin":false},"labels":[{"id":583426710,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false},{"id":211668062,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false},{"id":638321554,"url":"https://api.github.com/repos/rust-lang/rust/labels/proposed-final-comment-period","name":"proposed-final-comment-period","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"dtolnay","id":1940490,"avatar_url":"https://avatars2.githubusercontent.com/u/1940490?v=4","gravatar_id":"","url":"https://api.github.com/users/dtolnay","html_url":"https://github.com/dtolnay","followers_url":"https://api.github.com/users/dtolnay/followers","following_url":"https://api.github.com/users/dtolnay/following{/other_user}","gists_url":"https://api.github.com/users/dtolnay/gists{/gist_id}","starred_url":"https://api.github.com/users/dtolnay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtolnay/subscriptions","organizations_url":"https://api.github.com/users/dtolnay/orgs","repos_url":"https://api.github.com/users/dtolnay/repos","events_url":"https://api.github.com/users/dtolnay/events{/privacy}","received_events_url":"https://api.github.com/users/dtolnay/received_events","type":"User","site_admin":false},"assignees":[{"login":"dtolnay","id":1940490,"avatar_url":"https://avatars2.githubusercontent.com/u/1940490?v=4","gravatar_id":"","url":"https://api.github.com/users/dtolnay","html_url":"https://github.com/dtolnay","followers_url":"https://api.github.com/users/dtolnay/followers","following_url":"https://api.github.com/users/dtolnay/following{/other_user}","gists_url":"https://api.github.com/users/dtolnay/gists{/gist_id}","starred_url":"https://api.github.com/users/dtolnay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtolnay/subscriptions","organizations_url":"https://api.github.com/users/dtolnay/orgs","repos_url":"https://api.github.com/users/dtolnay/repos","events_url":"https://api.github.com/users/dtolnay/events{/privacy}","received_events_url":"https://api.github.com/users/dtolnay/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-03-13T19:02:17Z","updated_at":"2018-03-17T22:45:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/48989","html_url":"https://github.com/rust-lang/rust/pull/48989","diff_url":"https://github.com/rust-lang/rust/pull/48989.diff","patch_url":"https://github.com/rust-lang/rust/pull/48989.patch"},"body":"I did this a while back but didn't submit a PR. Might as well see what happens.\r\n\r\nFixes #48390.\r\n\r\n**Note: This has the potential to cause regressions in type inference.**  However, in order for code to break, it would need to be relying on the signature to determine that a type is `&_`, while still being able to figure out what the `_` is.  I'm having a hard time imagining such a scenario in real code."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/373958403","html_url":"https://github.com/rust-lang/rust/pull/48989#issuecomment-373958403","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/48989","id":373958403,"user":{"login":"dtolnay","id":1940490,"avatar_url":"https://avatars2.githubusercontent.com/u/1940490?v=4","gravatar_id":"","url":"https://api.github.com/users/dtolnay","html_url":"https://github.com/dtolnay","followers_url":"https://api.github.com/users/dtolnay/followers","following_url":"https://api.github.com/users/dtolnay/following{/other_user}","gists_url":"https://api.github.com/users/dtolnay/gists{/gist_id}","starred_url":"https://api.github.com/users/dtolnay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtolnay/subscriptions","organizations_url":"https://api.github.com/users/dtolnay/orgs","repos_url":"https://api.github.com/users/dtolnay/repos","events_url":"https://api.github.com/users/dtolnay/events{/privacy}","received_events_url":"https://api.github.com/users/dtolnay/received_events","type":"User","site_admin":false},"created_at":"2018-03-17T22:45:10Z","updated_at":"2018-03-17T22:45:10Z","author_association":"MEMBER","body":"I would be on board with attempting to land this. The original signature is indeed strange, and the way `strip_prefix` is typically used I would expect nothing to break.\r\n\r\n```diff\r\n  impl Path {\r\n-     pub fn strip_prefix<'a, P: ?Sized>(&'a self, base: &'a P) -> Result<&'a Path, StripPrefixError>\r\n+     pub fn strip_prefix<P>(&self, base: P) -> Result<&Path, StripPrefixError>\r\n          where P: AsRef<Path>;\r\n  }\r\n```\r\n\r\n@rfcbot fcp merge"}}
{"actor":{"display_login":"dtolnay"}}