{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/54155","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/54155/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/54155/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/54155/events","html_url":"https://github.com/rust-lang/rust/issues/54155","id":359521436,"node_id":"MDU6SXNzdWUzNTk1MjE0MzY=","number":54155,"title":"Stack overflow reported for &'static str `into()`","user":{"login":"johnedmonds","id":865383,"node_id":"MDQ6VXNlcjg2NTM4Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/865383?v=4","gravatar_id":"","url":"https://api.github.com/users/johnedmonds","html_url":"https://github.com/johnedmonds","followers_url":"https://api.github.com/users/johnedmonds/followers","following_url":"https://api.github.com/users/johnedmonds/following{/other_user}","gists_url":"https://api.github.com/users/johnedmonds/gists{/gist_id}","starred_url":"https://api.github.com/users/johnedmonds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnedmonds/subscriptions","organizations_url":"https://api.github.com/users/johnedmonds/orgs","repos_url":"https://api.github.com/users/johnedmonds/repos","events_url":"https://api.github.com/users/johnedmonds/events{/privacy}","received_events_url":"https://api.github.com/users/johnedmonds/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-12T14:58:20Z","updated_at":"2018-09-13T14:42:20Z","closed_at":"2018-09-13T14:42:20Z","author_association":"NONE","body":"```\r\nstruct Test {\r\n  s: String\r\n}\r\n\r\nimpl<'a> From<&'a String> for Test {\r\n  fn from(s: &'a String) -> Test {\r\n    return Test {s: s.to_string()};\r\n  }\r\n}\r\n\r\nimpl From<&'static str> for Test {\r\n  fn from(s: &'static str) -> Test {\r\n    s.into()\r\n  }\r\n}\r\n\r\nfn main() {\r\n  let test: Test = \"test\".into();\r\n}\r\n```\r\n\r\nDoing `rustc main.rs && ./main` results in\r\n\r\n```\r\nthread 'main' has overflowed its stack\r\nfatal runtime error: stack overflow\r\nAbort trap: 6\r\n```\r\n\r\nThe cause does not appear to actually be a stack overflow though. Running with rust-lldb reports `EXC_BAD_ACCESS` in the `from` method for `&'static str`."}}
{"actor":{"display_login":"johnedmonds"}}