{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/212072098","pull_request_review_id":148626745,"id":212072098,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjA3MjA5OA==","diff_hunk":"@@ -0,0 +1,74 @@\n+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n+// file at the top-level directory of this distribution and at\n+// http://rust-lang.org/COPYRIGHT.\n+//\n+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n+// option. This file may not be copied, modified, or distributed\n+// except according to those terms.\n+\n+#![feature(min_const_fn)]\n+\n+// ok\n+const fn foo1() {}\n+const fn foo2(x: i32) -> i32 { x }\n+const fn foo3<T>(x: T) -> T { x }\n+const fn foo7() {\n+    (\n+        foo1(),\n+        foo2(420),\n+        foo3(69),\n+    ).0\n+}\n+const fn foo12<T: Sized>(t: T) -> T { t }\n+const fn foo13<T: ?Sized>(t: &T) -> &T { t }\n+const fn foo14<'a, T: 'a>(t: &'a T) -> &'a T { t }\n+const fn foo15<T>(t: T) -> T where T: Sized { t }\n+const fn foo16(f: f32) -> f32 { f }\n+const fn foo17(f: f32) -> u32 { f as u32 }\n+const fn foo18(i: i32) -> i32 { i * 3 }\n+const fn foo20(b: bool) -> bool { !b }\n+const fn foo21<T, U>(t: T, u: U) -> (T, U) { (t, u) }\n+const fn foo22(s: &[u8], i: usize) -> u8 { s[i] }\n+const FOO: u32 = 42;\n+const fn foo23() -> u32 { FOO }\n+const fn foo24() -> &'static u32 { &FOO }\n+const fn foo27(x: &u32) -> u32 { *x }\n+const fn foo28(x: u32) -> u32 { *&x }\n+const fn foo29(x: u32) -> i32 { x as i32 }\n+const fn foo31(a: bool, b: bool) -> bool { a && b }","path":"src/test/ui/consts/min_const_fn/min_const_fn.rs","position":40,"original_position":40,"commit_id":"7c861bb34284c04c4e5f4f57435e7682471f191f","original_commit_id":"7c861bb34284c04c4e5f4f57435e7682471f191f","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},"body":"Where is that translation you are talking about even happening?","created_at":"2018-08-22T19:03:19Z","updated_at":"2018-08-22T19:03:19Z","html_url":"https://github.com/rust-lang/rust/pull/53604#discussion_r212072098","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/53604","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/212072098"},"html":{"href":"https://github.com/rust-lang/rust/pull/53604#discussion_r212072098"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/53604"}},"in_reply_to_id":212011424},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/53604","id":210144589,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMTQ0NTg5","html_url":"https://github.com/rust-lang/rust/pull/53604","diff_url":"https://github.com/rust-lang/rust/pull/53604.diff","patch_url":"https://github.com/rust-lang/rust/pull/53604.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/53604","number":53604,"state":"open","locked":false,"title":"Implement the `min_const_fn` feature gate","user":{"login":"oli-obk","id":332036,"node_id":"MDQ6VXNlcjMzMjAzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/332036?v=4","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"body":"cc @RalfJung @eddyb \r\n\r\nr? @Centril \r\n\r\nimplements the feature gate for #53555\r\n\r\nI added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all.\r\n\r\nThe regular `const_fn` checks are run first, and then the `min_const_fn` checks are run additionally.\r\n\r\nThis could probably use some more tests, but I wanted to get it out for review quickly","created_at":"2018-08-22T14:02:22Z","updated_at":"2018-08-22T19:03:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2dc62bca2db6a31cdb2e7facf9b2c8c9282830b","assignee":{"login":"Centril","id":855702,"node_id":"MDQ6VXNlcjg1NTcwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false},"assignees":[{"login":"Centril","id":855702,"node_id":"MDQ6VXNlcjg1NTcwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":583426710,"node_id":"MDU6TGFiZWw1ODM0MjY3MTA=","url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/53604/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/53604/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/53604/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/7c861bb34284c04c4e5f4f57435e7682471f191f","head":{"label":"oli-obk:min_const_fn","ref":"min_const_fn","sha":"7c861bb34284c04c4e5f4f57435e7682471f191f","user":{"login":"oli-obk","id":332036,"node_id":"MDQ6VXNlcjMzMjAzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/332036?v=4","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"repo":{"id":26541058,"node_id":"MDEwOlJlcG9zaXRvcnkyNjU0MTA1OA==","name":"rust","full_name":"oli-obk/rust","owner":{"login":"oli-obk","id":332036,"node_id":"MDQ6VXNlcjMzMjAzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/332036?v=4","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oli-obk/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/oli-obk/rust","forks_url":"https://api.github.com/repos/oli-obk/rust/forks","keys_url":"https://api.github.com/repos/oli-obk/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oli-obk/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oli-obk/rust/teams","hooks_url":"https://api.github.com/repos/oli-obk/rust/hooks","issue_events_url":"https://api.github.com/repos/oli-obk/rust/issues/events{/number}","events_url":"https://api.github.com/repos/oli-obk/rust/events","assignees_url":"https://api.github.com/repos/oli-obk/rust/assignees{/user}","branches_url":"https://api.github.com/repos/oli-obk/rust/branches{/branch}","tags_url":"https://api.github.com/repos/oli-obk/rust/tags","blobs_url":"https://api.github.com/repos/oli-obk/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oli-obk/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oli-obk/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/oli-obk/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oli-obk/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/oli-obk/rust/languages","stargazers_url":"https://api.github.com/repos/oli-obk/rust/stargazers","contributors_url":"https://api.github.com/repos/oli-obk/rust/contributors","subscribers_url":"https://api.github.com/repos/oli-obk/rust/subscribers","subscription_url":"https://api.github.com/repos/oli-obk/rust/subscription","commits_url":"https://api.github.com/repos/oli-obk/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/oli-obk/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/oli-obk/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/oli-obk/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/oli-obk/rust/contents/{+path}","compare_url":"https://api.github.com/repos/oli-obk/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oli-obk/rust/merges","archive_url":"https://api.github.com/repos/oli-obk/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oli-obk/rust/downloads","issues_url":"https://api.github.com/repos/oli-obk/rust/issues{/number}","pulls_url":"https://api.github.com/repos/oli-obk/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/oli-obk/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/oli-obk/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oli-obk/rust/labels{/name}","releases_url":"https://api.github.com/repos/oli-obk/rust/releases{/id}","deployments_url":"https://api.github.com/repos/oli-obk/rust/deployments","created_at":"2014-11-12T15:00:39Z","updated_at":"2018-05-19T18:03:34Z","pushed_at":"2018-08-22T16:32:05Z","git_url":"git://github.com/oli-obk/rust.git","ssh_url":"git@github.com:oli-obk/rust.git","clone_url":"https://github.com/oli-obk/rust.git","svn_url":"https://github.com/oli-obk/rust","homepage":"http://www.rust-lang.org","size":388008,"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,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"674ef668f13c52a1fadbf01b24d8da1e12d15e70","user":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","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,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ3MTI=","name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MzA5MDU=","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-08-22T18:40:16Z","pushed_at":"2018-08-22T18:58:54Z","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":388302,"stargazers_count":30145,"watchers_count":30145,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5128,"mirror_url":null,"archived":false,"open_issues_count":4230,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5128,"open_issues":4230,"watchers":30145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/53604"},"html":{"href":"https://github.com/rust-lang/rust/pull/53604"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/53604"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/53604/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/53604/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/53604/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/7c861bb34284c04c4e5f4f57435e7682471f191f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"RalfJung"}}