Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With the edition enabled, proc_macro_path_invoc feature causes bugs with tool_attributes feature #51940

Closed
nrc opened this issue Jun 30, 2018 · 1 comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-rust-2018-preview Area: The 2018 edition preview P-high High priority T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Jun 30, 2018

With #![feature(rust_2018_preview)] and #![feature(tool_attributes)]. correct attributes give errors, e.g.,

error[E0658]: paths of length greater than one in macro invocations are currently unstable (see issue #38356)
  --> src/sealed.rs:28:3
   |
28 | #[rustfmt::skip]
   |   ^^^^^^^^^^^^^
   |
   = help: add #![feature(proc_macro_path_invoc)] to the crate attributes to enable

enabling proc_macro_path_invoc gives

error[E0433]: failed to resolve. Use of undeclared type or module `rustfmt`
  --> src/sealed.rs:28:3
   |
28 | #[rustfmt::skip]
   |   ^^^^^^^ Use of undeclared type or module `rustfmt`

Expected behaviour: no errors and the attribute is ignored by the compiler

Reported in rust-lang/rustfmt#2815

cc @gnzlbg @rust-lang/compiler @petrochenkov

@nrc nrc added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) P-high High priority T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. A-rust-2018-preview Area: The 2018 edition preview labels Jun 30, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Jun 30, 2018

dupe of #51277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-rust-2018-preview Area: The 2018 edition preview P-high High priority T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants