{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/33169","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/33169/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33169/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/33169/events","html_url":"https://github.com/rust-lang/rust/pull/33169","id":150592003,"number":33169,"title":"const_fn: Check the terminating expression of a block for blocks in a const initializer","user":{"login":"swgillespie","id":1871912,"avatar_url":"https://avatars.githubusercontent.com/u/1871912?v=3","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jroesch","id":696509,"avatar_url":"https://avatars.githubusercontent.com/u/696509?v=3","gravatar_id":"","url":"https://api.github.com/users/jroesch","html_url":"https://github.com/jroesch","followers_url":"https://api.github.com/users/jroesch/followers","following_url":"https://api.github.com/users/jroesch/following{/other_user}","gists_url":"https://api.github.com/users/jroesch/gists{/gist_id}","starred_url":"https://api.github.com/users/jroesch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jroesch/subscriptions","organizations_url":"https://api.github.com/users/jroesch/orgs","repos_url":"https://api.github.com/users/jroesch/repos","events_url":"https://api.github.com/users/jroesch/events{/privacy}","received_events_url":"https://api.github.com/users/jroesch/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2016-04-23T20:09:08Z","updated_at":"2016-05-12T06:20:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/33169","html_url":"https://github.com/rust-lang/rust/pull/33169","diff_url":"https://github.com/rust-lang/rust/pull/33169.diff","patch_url":"https://github.com/rust-lang/rust/pull/33169.patch"},"body":"In a const or static initializer, the `CheckBlock` check ensures that blocks in the initializer expression are only in tail positions or in items. In this case, it didn't check the terminating expression of a block, which resulted in an ICE later in the compiler pipeline if the trailing expression was itself a block. This change fixes the ICE and ensures that the proper error is emitted. This fixes the ICE in #32829 ."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/218669975","html_url":"https://github.com/rust-lang/rust/pull/33169#issuecomment-218669975","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/33169","id":218669975,"user":{"login":"bors","id":3372342,"avatar_url":"https://avatars.githubusercontent.com/u/3372342?v=3","gravatar_id":"","url":"https://api.github.com/users/bors","html_url":"https://github.com/bors","followers_url":"https://api.github.com/users/bors/followers","following_url":"https://api.github.com/users/bors/following{/other_user}","gists_url":"https://api.github.com/users/bors/gists{/gist_id}","starred_url":"https://api.github.com/users/bors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors/subscriptions","organizations_url":"https://api.github.com/users/bors/orgs","repos_url":"https://api.github.com/users/bors/repos","events_url":"https://api.github.com/users/bors/events{/privacy}","received_events_url":"https://api.github.com/users/bors/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T06:20:01Z","updated_at":"2016-05-12T06:20:01Z","body":":sunny: Test successful - [auto-linux-32-nopt-t](http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/9140), [auto-linux-32-opt](http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/9177), [auto-linux-32cross-opt](http://buildbot.rust-lang.org/builders/auto-linux-32cross-opt/builds/260), [auto-linux-64-cargotest](http://buildbot.rust-lang.org/builders/auto-linux-64-cargotest/builds/452), [auto-linux-64-cross-armhf](http://buildbot.rust-lang.org/builders/auto-linux-64-cross-armhf/builds/263), [auto-linux-64-cross-armsf](http://buildbot.rust-lang.org/builders/auto-linux-64-cross-armsf/builds/267), [auto-linux-64-cross-freebsd](http://buildbot.rust-lang.org/builders/auto-linux-64-cross-freebsd/builds/266), [auto-linux-64-cross-netbsd](http://buildbot.rust-lang.org/builders/auto-linux-64-cross-netbsd/builds/266), [auto-linux-64-debug-opt](http://buildbot.rust-lang.org/builders/auto-linux-64-debug-opt/builds/2409), [auto-linux-64-nopt-t](http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/9115), [auto-linux-64-opt](http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/9101), [auto-linux-64-opt-mir](http://buildbot.rust-lang.org/builders/auto-linux-64-opt-mir/builds/687), [auto-linux-64-opt-rustbuild](http://buildbot.rust-lang.org/builders/auto-linux-64-opt-rustbuild/builds/1072), [auto-linux-64-x-android-t](http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/9097), [auto-linux-cross-opt](http://buildbot.rust-lang.org/builders/auto-linux-cross-opt/builds/2308), [auto-linux-musl-64-opt](http://buildbot.rust-lang.org/builders/auto-linux-musl-64-opt/builds/4252), [auto-mac-32-opt](http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/9153), [auto-mac-64-nopt-t](http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/9162), [auto-mac-64-opt](http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/9123), [auto-mac-64-opt-rustbuild](http://buildbot.rust-lang.org/builders/auto-mac-64-opt-rustbuild/builds/1081), [auto-mac-cross-ios-opt](http://buildbot.rust-lang.org/builders/auto-mac-cross-ios-opt/builds/265), [auto-win-gnu-32-nopt-t](http://buildbot.rust-lang.org/builders/auto-win-gnu-32-nopt-t/builds/4189), [auto-win-gnu-32-opt](http://buildbot.rust-lang.org/builders/auto-win-gnu-32-opt/builds/4201), [auto-win-gnu-32-opt-rustbuild](http://buildbot.rust-lang.org/builders/auto-win-gnu-32-opt-rustbuild/builds/1087), [auto-win-gnu-64-nopt-t](http://buildbot.rust-lang.org/builders/auto-win-gnu-64-nopt-t/builds/4196), [auto-win-gnu-64-opt](http://buildbot.rust-lang.org/builders/auto-win-gnu-64-opt/builds/4177), [auto-win-msvc-32-cross-opt](http://buildbot.rust-lang.org/builders/auto-win-msvc-32-cross-opt/builds/552), [auto-win-msvc-32-opt](http://buildbot.rust-lang.org/builders/auto-win-msvc-32-opt/builds/3399), [auto-win-msvc-64-cargotest](http://buildbot.rust-lang.org/builders/auto-win-msvc-64-cargotest/builds/455), [auto-win-msvc-64-opt](http://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/4190), [auto-win-msvc-64-opt-mir](http://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-mir/builds/690), [auto-win-msvc-64-opt-rustbuild](http://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-rustbuild/builds/1090)"}}