{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/30226","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/30226/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/30226/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/30226/events","html_url":"https://github.com/rust-lang/rust/issues/30226","id":120595642,"number":30226,"title":"const indexing broken in nightly with bit shift (<<)","user":{"login":"Johnson-A","id":12973787,"avatar_url":"https://avatars.githubusercontent.com/u/12973787?v=3","gravatar_id":"","url":"https://api.github.com/users/Johnson-A","html_url":"https://github.com/Johnson-A","followers_url":"https://api.github.com/users/Johnson-A/followers","following_url":"https://api.github.com/users/Johnson-A/following{/other_user}","gists_url":"https://api.github.com/users/Johnson-A/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnson-A/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnson-A/subscriptions","organizations_url":"https://api.github.com/users/Johnson-A/orgs","repos_url":"https://api.github.com/users/Johnson-A/repos","events_url":"https://api.github.com/users/Johnson-A/events{/privacy}","received_events_url":"https://api.github.com/users/Johnson-A/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-05T23:33:13Z","updated_at":"2015-12-05T23:33:13Z","closed_at":null,"body":"    const index: size = 1;\r\n\r\n    fn main() {\r\n        let array = [1,2,3];\r\n        let test = 1 + array[index]; // This works fine\r\n        let error = 1 << array[index]; // error: const indexing is an unstable feature\r\n    }\r\n\r\nFor some reason, indexing an array with a const requires an unstable feature when there is a bit shift operator. help: in Nightly builds, add `#![feature(const_indexing)]` to the crate attributes to enable. When adding the feature, there are no more errors but this feature shouldn't be necessary.\r\n\r\nrustc 1.6.0-nightly (d49e36552 2015-12-05)"}}