- 05 2月, 2017 2 次提交
-
-
由 Josh Driver 提交于
This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.
-
由 Josh Driver 提交于
-
- 03 1月, 2017 1 次提交
-
-
由 Alex Crichton 提交于
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the compiler to stabilize the "Macros 1.1" feature of the language. Many more details can be found on the tracking issue, #35900. Closes #35900
-
- 07 10月, 2016 1 次提交
-
-
由 Alex Crichton 提交于
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`, which reflects the general consensus of #35900. A follow up PR to Cargo will be required to purge the `rustc-macro` name as well.
-
- 03 9月, 2016 1 次提交
-
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 1681] which adds support to the compiler for first-class user-define custom `#[derive]` modes with a far more stable API than plugins have today. [RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md The main features added by this commit are: * A new `rustc-macro` crate-type. This crate type represents one which will provide custom `derive` implementations and perhaps eventually flower into the implementation of macros 2.0 as well. * A new `rustc_macro` crate in the standard distribution. This crate will provide the runtime interface between macro crates and the compiler. The API here is particularly conservative right now but has quite a bit of room to expand into any manner of APIs required by macro authors. * The ability to load new derive modes through the `#[macro_use]` annotations on other crates. All support added here is gated behind the `rustc_macro` feature gate, both for the library support (the `rustc_macro` crate) as well as the language features. There are a few minor differences from the implementation outlined in the RFC, such as the `rustc_macro` crate being available as a dylib and all symbols are `dlsym`'d directly instead of having a shim compiled. These should only affect the implementation, however, not the public interface. This commit also ended up touching a lot of code related to `#[derive]`, making a few notable changes: * Recognized derive attributes are no longer desugared to `derive_Foo`. Wasn't sure how to keep this behavior and *not* expose it to custom derive. * Derive attributes no longer have access to unstable features by default, they have to opt in on a granular level. * The `derive(Copy,Clone)` optimization is now done through another "obscure attribute" which is just intended to ferry along in the compiler that such an optimization is possible. The `derive(PartialEq,Eq)` optimization was also updated to do something similar. --- One part of this PR which needs to be improved before stabilizing are the errors and exact interfaces here. The error messages are relatively poor quality and there are surprising spects of this such as `#[derive(PartialEq, Eq, MyTrait)]` not working by default. The custom attributes added by the compiler end up becoming unstable again when going through a custom impl. Hopefully though this is enough to start allowing experimentation on crates.io! syntax-[breaking-change]
-
- 07 8月, 2016 1 次提交
-
-
由 Panashe M. Fundira 提交于
-
- 02 3月, 2016 1 次提交
-
-
由 Vadim Petrochenkov 提交于
-
- 23 1月, 2016 1 次提交
-
-
由 Ariel Ben-Yehuda 提交于
Fixes #30535
-
- 15 1月, 2016 1 次提交
-
-
由 Brian Anderson 提交于
cc #30346
-
- 09 1月, 2016 1 次提交
-
-
由 Niko Matsakis 提交于
Fixes #29857. Fixes #30589.
-
- 08 1月, 2016 1 次提交
-
-
由 Felix S. Klock II 提交于
macro future proofing rules. (We may want to think about what this test was actually testing and figure out a way to test it without running afoul of macro future proofing. I spent some time trying to do this, e.g. by inserting parenthesis in the macro input pattern, but I could not quickly get it working, so I took this tack instead.)
-
- 06 1月, 2016 1 次提交
-
-
由 Nick Cameron 提交于
Fixes #30715
-
- 24 3月, 2015 1 次提交
-
-
由 Brian Anderson 提交于
Now that features must be declared expanded source often does not compile. This adds 'pretty-expanded' to a bunch of test cases that still work.
-
- 17 11月, 2014 1 次提交
-
-
由 Steven Fackler 提交于
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
-
- 24 4月, 2014 1 次提交
-
-
由 Steven Fackler 提交于
RFC: 0008-match-arm-attributes
-
- 08 2月, 2014 1 次提交
-
-
由 Derek Guenther 提交于
-
- 25 9月, 2013 1 次提交
-
-
由 Alex Crichton 提交于
This is required by the check-fast target because each test is slurped up into a submodule.
-
- 14 6月, 2013 1 次提交
-
-
由 Daniel Micay 提交于
-
- 31 5月, 2013 1 次提交
-
-
由 Patrick Walton 提交于
-