{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/49247","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/49247/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/49247/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/49247/events","html_url":"https://github.com/rust-lang/rust/issues/49247","id":307400694,"number":49247,"title":"Provide rustfix to upgrade code to Rust 2018 automatically","user":{"login":"killercup","id":20063,"avatar_url":"https://avatars1.githubusercontent.com/u/20063?v=4","gravatar_id":"","url":"https://api.github.com/users/killercup","html_url":"https://github.com/killercup","followers_url":"https://api.github.com/users/killercup/followers","following_url":"https://api.github.com/users/killercup/following{/other_user}","gists_url":"https://api.github.com/users/killercup/gists{/gist_id}","starred_url":"https://api.github.com/users/killercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killercup/subscriptions","organizations_url":"https://api.github.com/users/killercup/orgs","repos_url":"https://api.github.com/users/killercup/repos","events_url":"https://api.github.com/users/killercup/events{/privacy}","received_events_url":"https://api.github.com/users/killercup/received_events","type":"User","site_admin":false},"labels":[{"id":650846969,"url":"https://api.github.com/repos/rust-lang/rust/labels/C-tracking-issue","name":"C-tracking-issue","color":"f5f1fd","default":false},{"id":602425123,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-dev-tools","name":"T-dev-tools","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-21T20:11:36Z","updated_at":"2018-03-22T07:18:20Z","closed_at":null,"author_association":"MEMBER","body":"Rustfix is a CLI tool that parses the compiler's suggestions and applies them to the source files. It is the official tool to migrate from Rust 2015 to 2018.\r\n\r\nThis issue is to track the development of the CLI tool. Other ways to interact with the compiler suggestions include \"reading them and changing code manually\" as well as \"using RLS and clicking on lightbulb icons in VSCode\".\r\n\r\n## What needs to be done\r\n\r\n- *Not* tracked in this issue: Implement lints that emit suggestions to migrate to code valid in the new edition (cf. #48461)\r\n- Implement rustfix as a library that reads rustc diagnostic messages and source files and emit transformed source files\r\n\t- Integrate this into compiletest\r\n\t- Add tests for all machine-applicable suggestions (and continue to add them as new lints land!)\r\n\t- Find and fix edge cases that prevent rustfix from always producing valid code\r\n- Decide on final design of the CLI (see below)\r\n- Publish official beta version and ask community to test it\r\n- Distribute with rustup"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/375201915","html_url":"https://github.com/rust-lang/rust/issues/49247#issuecomment-375201915","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/49247","id":375201915,"user":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T07:18:20Z","updated_at":"2018-03-22T07:18:20Z","author_association":"MEMBER","body":"Overall I think there's _huge_ potential for fixture tests in rustc, both as a way to test suggestions and to test rustfix.\r\n\r\nThe way I envision it is that if any compile-fail or UI test foo.rs is accompanied by a foo.rs.fixed file, it's an indication that we must run rustfix on it, and the fixed source should match the .fixed file. Additionally, the fixed file should not emit any of the warning entries that had suggestions."}}
{"actor":{"display_login":"Manishearth"}}