{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/55522","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/55522/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/55522/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/55522/events","html_url":"https://github.com/rust-lang/rust/pull/55522","id":375747884,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MTIyMjI2","number":55522,"title":"use String::from() instead of format!() macro to construct Strings.","user":{"login":"matthiaskrgr","id":476013,"node_id":"MDQ6VXNlcjQ3NjAxMw==","avatar_url":"https://avatars2.githubusercontent.com/u/476013?v=4","gravatar_id":"","url":"https://api.github.com/users/matthiaskrgr","html_url":"https://github.com/matthiaskrgr","followers_url":"https://api.github.com/users/matthiaskrgr/followers","following_url":"https://api.github.com/users/matthiaskrgr/following{/other_user}","gists_url":"https://api.github.com/users/matthiaskrgr/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiaskrgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiaskrgr/subscriptions","organizations_url":"https://api.github.com/users/matthiaskrgr/orgs","repos_url":"https://api.github.com/users/matthiaskrgr/repos","events_url":"https://api.github.com/users/matthiaskrgr/events{/privacy}","received_events_url":"https://api.github.com/users/matthiaskrgr/received_events","type":"User","site_admin":false},"labels":[{"id":583437191,"node_id":"MDU6TGFiZWw1ODM0MzcxOTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-bors","name":"S-waiting-on-bors","color":"d3dddd","default":false}],"state":"closed","locked":false,"assignee":{"login":"zackmdavis","id":1076988,"node_id":"MDQ6VXNlcjEwNzY5ODg=","avatar_url":"https://avatars2.githubusercontent.com/u/1076988?v=4","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false},"assignees":[{"login":"zackmdavis","id":1076988,"node_id":"MDQ6VXNlcjEwNzY5ODg=","avatar_url":"https://avatars2.githubusercontent.com/u/1076988?v=4","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-10-31T00:18:54Z","updated_at":"2018-11-02T19:03:24Z","closed_at":"2018-11-01T19:11:35Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/55522","html_url":"https://github.com/rust-lang/rust/pull/55522","diff_url":"https://github.com/rust-lang/rust/pull/55522.diff","patch_url":"https://github.com/rust-lang/rust/pull/55522.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/435478046","html_url":"https://github.com/rust-lang/rust/pull/55522#issuecomment-435478046","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/55522","id":435478046,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTQ3ODA0Ng==","user":{"login":"RalfJung","id":330628,"node_id":"MDQ6VXNlcjMzMDYyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/330628?v=4","gravatar_id":"","url":"https://api.github.com/users/RalfJung","html_url":"https://github.com/RalfJung","followers_url":"https://api.github.com/users/RalfJung/followers","following_url":"https://api.github.com/users/RalfJung/following{/other_user}","gists_url":"https://api.github.com/users/RalfJung/gists{/gist_id}","starred_url":"https://api.github.com/users/RalfJung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalfJung/subscriptions","organizations_url":"https://api.github.com/users/RalfJung/orgs","repos_url":"https://api.github.com/users/RalfJung/repos","events_url":"https://api.github.com/users/RalfJung/events{/privacy}","received_events_url":"https://api.github.com/users/RalfJung/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T19:03:24Z","updated_at":"2018-11-02T19:03:24Z","author_association":"MEMBER","body":"Is this an efficiency question or a style question? (For the future, it'd be great if such questions could be answered in the PR description or commit message, which seem like a likely place someone will look if they want to find out why something got changed.)\r\n\r\nIf it is about efficiency, is there any reason `format!` on a string literal has to be less efficient? Seems easy enough to special-case in a macro.\r\n\r\nIf it is about style, I'd prefer if you could consider consistency: In the miri validator (`librustc_mir/interpret/validity.rs`), we generate quite a few error messages, and we consistently do that with `format!` as many of them need some formatting. Exactly one doesn't, and you changed it to `String::from`. Now this one error message stands out in the code because it is not consistent with what we do everywhere else, that looks really odd. `String::from` is also longer, and this this case I do not think it increases readability, either. I hope you don't mind that when I resolved a merge conflict between this PR and mine, I changed this back to `format!`."}}
{"actor":{"display_login":"RalfJung"}}