{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/185923535","pull_request_review_id":117412904,"id":185923535,"diff_hunk":"@@ -2568,6 +2570,21 @@ impl<'test> TestCx<'test> {\n         errors += self.compare_output(\"stdout\", &normalized_stdout, &expected_stdout);\n         errors += self.compare_output(\"stderr\", &normalized_stderr, &expected_stderr);\n \n+        if self.config.compare_mode.is_some() {\n+            // don't test rustfix with nll right now\n+        } else if self.props.run_rustfix {\n+            // Apply suggestions from rustc to the code itself\n+            let unfixed_code = self.load_expected_output_from_path(&self.testpaths.file)\n+                .unwrap();\n+            let suggestions = get_suggestions_from_json(&proc_res.stderr, &HashSet::new()).unwrap();\n+            let fixed_code = apply_suggestions(&unfixed_code, &suggestions);","path":"src/tools/compiletest/src/runtest.rs","position":36,"original_position":36,"commit_id":"60d78b4b96b246b2a7e03d9fc4b60be16931ee37","original_commit_id":"60d78b4b96b246b2a7e03d9fc4b60be16931ee37","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},"body":"We also need to stabilize the suggestion applicability stuff and use it here. cc @killercup \r\n\r\n(Perhaps with a directive letting you opt in to non-applicable suggestions)","created_at":"2018-05-03T20:15:53Z","updated_at":"2018-05-03T20:16:01Z","html_url":"https://github.com/rust-lang/rust/pull/50084#discussion_r185923535","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/50084","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/185923535"},"html":{"href":"https://github.com/rust-lang/rust/pull/50084#discussion_r185923535"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50084"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/50084","id":182912306,"html_url":"https://github.com/rust-lang/rust/pull/50084","diff_url":"https://github.com/rust-lang/rust/pull/50084.diff","patch_url":"https://github.com/rust-lang/rust/pull/50084.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50084","number":50084,"state":"open","locked":false,"title":"First step towards rustfix compiletest mode","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},"body":"This is the first small step towards testing auto-fixable compiler\r\nsuggestions using compiletest. Currently, it only checks if next to a\r\nUI test there also happens to a `*.rs.fixed` file, and then uses rustfix\r\n(added as external crate) on the original file, and asserts that it\r\nproduces the fixed version.\r\n\r\nTo show that this works, I've included one such test. I picked this test\r\ncase at random (and because it was simple) -- It is not relevant to the\r\n2018 edition. Indeed, in the near future, we want to be able to restrict\r\nrustfix to edition-lints, so this test cast might go away soon.\r\n\r\nIn case you still think this is somewhat feature-complete, here's a\r\nquick list of things currently missing that I want to add before telling\r\npeople they can use this:\r\n\r\n- [x] Make this an actual compiletest mode, with `test [fix] …` output\r\n  and everything\r\n- [x] Assert that fixed files still compile\r\n- [x] Assert that fixed files produce no (or a known set of) diagnostics\r\n  output\r\n- [x] Update `update-references.sh` to support rustfix\r\n- [x] Use a published version of rustfix (i.e.: publish a new version\r\n  rustfix that exposes a useful API for this)\r\n","created_at":"2018-04-19T22:10:21Z","updated_at":"2018-05-03T20:16:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3887f2c19835770ec1cba09899dcd4fc31fcdf1f","assignee":{"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},"assignees":[{"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}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":583436937,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-author","name":"S-waiting-on-author","color":"d3dddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/50084/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/50084/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/50084/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/60d78b4b96b246b2a7e03d9fc4b60be16931ee37","head":{"label":"killercup:compiletest-rustfix","ref":"compiletest-rustfix","sha":"60d78b4b96b246b2a7e03d9fc4b60be16931ee37","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},"repo":{"id":27124275,"name":"rust","full_name":"killercup/rust","owner":{"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},"private":false,"html_url":"https://github.com/killercup/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/killercup/rust","forks_url":"https://api.github.com/repos/killercup/rust/forks","keys_url":"https://api.github.com/repos/killercup/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/killercup/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/killercup/rust/teams","hooks_url":"https://api.github.com/repos/killercup/rust/hooks","issue_events_url":"https://api.github.com/repos/killercup/rust/issues/events{/number}","events_url":"https://api.github.com/repos/killercup/rust/events","assignees_url":"https://api.github.com/repos/killercup/rust/assignees{/user}","branches_url":"https://api.github.com/repos/killercup/rust/branches{/branch}","tags_url":"https://api.github.com/repos/killercup/rust/tags","blobs_url":"https://api.github.com/repos/killercup/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/killercup/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/killercup/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/killercup/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/killercup/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/killercup/rust/languages","stargazers_url":"https://api.github.com/repos/killercup/rust/stargazers","contributors_url":"https://api.github.com/repos/killercup/rust/contributors","subscribers_url":"https://api.github.com/repos/killercup/rust/subscribers","subscription_url":"https://api.github.com/repos/killercup/rust/subscription","commits_url":"https://api.github.com/repos/killercup/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/killercup/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/killercup/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/killercup/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/killercup/rust/contents/{+path}","compare_url":"https://api.github.com/repos/killercup/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/killercup/rust/merges","archive_url":"https://api.github.com/repos/killercup/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/killercup/rust/downloads","issues_url":"https://api.github.com/repos/killercup/rust/issues{/number}","pulls_url":"https://api.github.com/repos/killercup/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/killercup/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/killercup/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/killercup/rust/labels{/name}","releases_url":"https://api.github.com/repos/killercup/rust/releases{/id}","deployments_url":"https://api.github.com/repos/killercup/rust/deployments","created_at":"2014-11-25T12:17:03Z","updated_at":"2014-11-25T12:17:12Z","pushed_at":"2018-05-03T18:40:53Z","git_url":"git://github.com/killercup/rust.git","ssh_url":"git@github.com:killercup/rust.git","clone_url":"https://github.com/killercup/rust.git","svn_url":"https://github.com/killercup/rust","homepage":"http://www.rust-lang.org","size":368283,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"d40a0b3dc17acd585d3e41d08db6d516842cea96","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars1.githubusercontent.com/u/5430905?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"A safe, concurrent, practical language.","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rust/deployments","created_at":"2010-06-16T20:39:03Z","updated_at":"2018-05-03T19:00:03Z","pushed_at":"2018-05-03T20:15:00Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"https://www.rust-lang.org","size":371804,"stargazers_count":28041,"watchers_count":28041,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4888,"mirror_url":null,"archived":false,"open_issues_count":3720,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4888,"open_issues":3720,"watchers":28041,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50084"},"html":{"href":"https://github.com/rust-lang/rust/pull/50084"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/50084"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/50084/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50084/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/50084/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/60d78b4b96b246b2a7e03d9fc4b60be16931ee37"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Manishearth"}}