{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/23716","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/23716/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23716/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/23716/events","html_url":"https://github.com/rust-lang/rust/issues/23716","id":64379475,"number":23716,"title":"Matching of static variable name with some function's parameter name gives error.","user":{"login":"demelev","id":3952209,"avatar_url":"https://avatars.githubusercontent.com/u/3952209?v=3","gravatar_id":"","url":"https://api.github.com/users/demelev","html_url":"https://github.com/demelev","followers_url":"https://api.github.com/users/demelev/followers","following_url":"https://api.github.com/users/demelev/following{/other_user}","gists_url":"https://api.github.com/users/demelev/gists{/gist_id}","starred_url":"https://api.github.com/users/demelev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demelev/subscriptions","organizations_url":"https://api.github.com/users/demelev/orgs","repos_url":"https://api.github.com/users/demelev/repos","events_url":"https://api.github.com/users/demelev/events{/privacy}","received_events_url":"https://api.github.com/users/demelev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-diagnostics","name":"A-diagnostics","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-typesystem","name":"A-typesystem","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-25T21:40:22Z","updated_at":"2015-03-26T20:03:04Z","closed_at":null,"body":"Rustc version: rustc 1.0.0-nightly (b0aad7dd4 2015-03-22) (built 2015-03-23)\r\n\r\n```rust\r\nstatic text : i32 = 1i32;\r\n\r\nfn read_block(text: &str) {\r\n}\r\n\r\nfn main() {\r\n}\r\n```\r\n```\r\nsrc\\main.rs:79:15: 79:19 error: static variables cannot be referenced in a patte\r\nrn, use a `const` instead\r\nsrc\\main.rs:79 fn read_block(text: &str) {\r\n                             ^~~~\r\nerror: aborting due to previous error\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/86692179","html_url":"https://github.com/rust-lang/rust/issues/23716#issuecomment-86692179","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/23716","id":86692179,"user":{"login":"demelev","id":3952209,"avatar_url":"https://avatars.githubusercontent.com/u/3952209?v=3","gravatar_id":"","url":"https://api.github.com/users/demelev","html_url":"https://github.com/demelev","followers_url":"https://api.github.com/users/demelev/followers","following_url":"https://api.github.com/users/demelev/following{/other_user}","gists_url":"https://api.github.com/users/demelev/gists{/gist_id}","starred_url":"https://api.github.com/users/demelev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demelev/subscriptions","organizations_url":"https://api.github.com/users/demelev/orgs","repos_url":"https://api.github.com/users/demelev/repos","events_url":"https://api.github.com/users/demelev/events{/privacy}","received_events_url":"https://api.github.com/users/demelev/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T20:03:04Z","updated_at":"2015-03-26T20:03:04Z","body":"As I understand, this error is related to the situation like this\r\n```rust\r\nstatic text : &str = \"rust\";\r\n\r\nfn main() {\r\n    match \"rust compiler\" {\r\n        text => ... , // rather to use const text: &str = \"rust\"; \r\n        ....\r\n    }\r\n}\r\n```\r\n```rust\r\nstatic text: &str = \"rust\";\r\n\r\nfn foo( text: i32 ) {"}}