{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/53205","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/53205/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/53205/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/53205/events","html_url":"https://github.com/rust-lang/rust/issues/53205","id":348890117,"node_id":"MDU6SXNzdWUzNDg4OTAxMTc=","number":53205,"title":"Regression importing log’s warn! macro inside of include!()ed file","user":{"login":"SimonSapin","id":291359,"node_id":"MDQ6VXNlcjI5MTM1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291359?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"labels":[{"id":132910982,"node_id":"MDU6TGFiZWwxMzI5MTA5ODI=","url":"https://api.github.com/repos/rust-lang/rust/labels/A-macros","name":"A-macros","color":"d7e102","default":false},{"id":211668100,"node_id":"MDU6TGFiZWwyMTE2NjgxMDA=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false},{"id":147085028,"node_id":"MDU6TGFiZWwxNDcwODUwMjg=","url":"https://api.github.com/repos/rust-lang/rust/labels/regression-from-stable-to-nightly","name":"regression-from-stable-to-nightly","color":"e4008a","default":false}],"state":"open","locked":false,"assignee":{"login":"petrochenkov","id":5751617,"node_id":"MDQ6VXNlcjU3NTE2MTc=","avatar_url":"https://avatars2.githubusercontent.com/u/5751617?v=4","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false},"assignees":[{"login":"petrochenkov","id":5751617,"node_id":"MDQ6VXNlcjU3NTE2MTc=","avatar_url":"https://avatars2.githubusercontent.com/u/5751617?v=4","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-08-08T21:00:07Z","updated_at":"2018-08-08T22:53:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"`Cargo.toml`\r\n\r\n```toml\r\n[package]\r\nname = \"foo\"\r\nversion = \"0.0.0\"\r\n\r\n[dependencies]\r\nlog = \"0.4\"\r\n```\r\n\r\n`src/main.rs`\r\n```rust\r\ninclude!(\"real_main.rs\");\r\n```\r\n\r\n`src/real_main.rs`\r\n```rust\r\n#[macro_use] extern crate log;\r\n\r\nfn main() {\r\n    warn!(\"!!!\");\r\n}\r\n```\r\n\r\nCode like this used to build correctly:\r\n\r\n```sh\r\n$ rustup run --install nightly-2018-08-02 rustc -V \r\nrustc 1.29.0-nightly (97085f9fb 2018-08-01)\r\n$ rustup run --install nightly-2018-08-02 cargo run\r\n    Finished dev [unoptimized + debuginfo] target(s) in 0.01s\r\n     Running `target/debug/foo`\r\n```\r\n\r\nAnd now produces an error whose message seems wrong: it points at the call site of a macro as a \"name also defined here\":\r\n\r\n```sh\r\n$ rustup run --install nightly-2018-08-03 rustc -V\r\nrustc 1.30.0-nightly (7e8ca9f8b 2018-08-03)\r\n$ rustup run --install nightly-2018-08-03 cargo run\r\n   Compiling foo v0.0.0 (file:///tmp/foo)\r\nerror[E0659]: `warn` is ambiguous\r\n --> src/real_main.rs:4:5\r\n  |\r\n4 |     warn!(\"!!!\");\r\n  |     ^^^^\r\n  |\r\nnote: `warn` could refer to the name imported here\r\n --> src/real_main.rs:1:1\r\n  |\r\n1 | #[macro_use] extern crate log;\r\n  | ^^^^^^^^^^^^\r\nnote: `warn` could also refer to the name defined here\r\n --> src/real_main.rs:4:5\r\n  |\r\n4 |     warn!(\"!!!\");\r\n  |     ^^^^\r\n  = note: macro-expanded macro imports do not shadow\r\n\r\nerror: aborting due to previous error\r\n\r\nFor more information about this error, try `rustc --explain E0659`.\r\nerror: Could not compile `foo`.\r\n\r\nTo learn more, run the command again with --verbose.\r\n```\r\n\r\nCommit range between these two nightlies: https://github.com/rust-lang/rust/compare/97085f9fb...7e8ca9f8b\r\n\r\nhttps://github.com/rust-lang/rust/pull/52841 is the only PR in the range that seems relevant. CC @petrochenkov, @alexcrichton "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/411579026","html_url":"https://github.com/rust-lang/rust/issues/53205#issuecomment-411579026","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/53205","id":411579026,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTU3OTAyNg==","user":{"login":"petrochenkov","id":5751617,"node_id":"MDQ6VXNlcjU3NTE2MTc=","avatar_url":"https://avatars2.githubusercontent.com/u/5751617?v=4","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T22:53:16Z","updated_at":"2018-08-08T22:53:16Z","author_association":"CONTRIBUTOR","body":"Waiting on https://github.com/rust-lang/rust/issues/53089"}}
{"actor":{"display_login":"petrochenkov"}}