]> git.lizzy.rs Git - rust.git/commit
Feature gate macro arguments
authorCorey Richardson <corey@octayn.net>
Wed, 24 Dec 2014 05:44:13 +0000 (00:44 -0500)
committerCorey Richardson <corey@octayn.net>
Thu, 1 Jan 2015 12:06:46 +0000 (07:06 -0500)
commit41da99dff417eadf8f296a93529d9810f79e1d1b
treeca43141bb4f40fd7659d8b31c9ad5865a219bed0
parent84f5ad8679c7fc454473ffbf389030f3e5fee379
Feature gate macro arguments

Uses the same approach as https://github.com/rust-lang/rust/pull/17286 (and
subsequent changes making it more correct), where the visitor will skip any
pieces of the AST that are from "foreign code", where the spans don't line up,
indicating that that piece of code is due to a macro expansion.

If this breaks your code, read the error message to determine which feature
gate you should add to your crate, and bask in the knowledge that your code
won't mysteriously break should you try to use the 1.0 release.

Closes #18102

[breaking-change]
src/librand/lib.rs
src/librustc/lint/builtin.rs
src/librustc_driver/driver.rs
src/libsyntax/codemap.rs
src/libsyntax/feature_gate.rs
src/test/compile-fail/feature-gated-feature-in-macro-arg.rs [new file with mode: 0644]