{"action":"opened","issue":{"url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1148","repository_url":"https://api.github.com/repos/Manishearth/rust-clippy","labels_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1148/labels{/name}","comments_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1148/comments","events_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1148/events","html_url":"https://github.com/Manishearth/rust-clippy/issues/1148","id":169785767,"number":1148,"title":"Macros are being expanded when emitting suggestions","user":{"login":"trixnz","id":2995953,"avatar_url":"https://avatars.githubusercontent.com/u/2995953?v=3","gravatar_id":"","url":"https://api.github.com/users/trixnz","html_url":"https://github.com/trixnz","followers_url":"https://api.github.com/users/trixnz/followers","following_url":"https://api.github.com/users/trixnz/following{/other_user}","gists_url":"https://api.github.com/users/trixnz/gists{/gist_id}","starred_url":"https://api.github.com/users/trixnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trixnz/subscriptions","organizations_url":"https://api.github.com/users/trixnz/orgs","repos_url":"https://api.github.com/users/trixnz/repos","events_url":"https://api.github.com/users/trixnz/events{/privacy}","received_events_url":"https://api.github.com/users/trixnz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-07T08:15:38Z","updated_at":"2016-08-07T08:15:38Z","closed_at":null,"body":"<!--\r\nHi there! Whether you've come to make a suggestion for a new lint, an improvement to an existing lint or to report a bug or a false positive in Clippy, you've come to the right place.\r\n\r\nIf you want to report that Clippy does not compile, please be sure to be using the *latest version* of *Rust nightly*! Compiler plugins are highly unstable and will only work with a nightly Rust for now. If you are but still have a problem, please let us now!\r\n\r\nThank you for using Clippy!\r\n\r\nWrite your comment below this line: -->\r\n\r\nWhen clippy reports a suggestion with a macro in the code, it seems to print the expanded form. Using the example from README.md, you can see it is not behaving as expected: \r\n```rust\r\nfn main(){                             \r\n    let x = Some(1u8);                 \r\n    match x {                          \r\n        Some(y) => println!(\"{:?}\", y),\r\n        _ => ()                        \r\n    }                                  \r\n}\r\n```\r\nresults in:\r\n```\r\nwarning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default\r\n --> src\\main.rs:3:5\r\n  |\r\n3 |     match x {\r\n  |     ^\r\n  |\r\nhelp: try this\r\n  |     if let Some(y) = x { $ crate :: io :: _print ( format_args ! ( $ ( $ arg ) * ) ) }\r\n  = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match\r\n```"}}
{"actor":{"display_login":"trixnz"}}