- 21 4月, 2018 1 次提交
-
-
由 Alex Crichton 提交于
This commit starts to lay some groundwork for the stabilization of custom attribute invocations and general procedural macros. It applies a number of changes discussed on [internals] as well as a [recent issue][issue], namely: * The path used to specify a custom attribute must be of length one and cannot be a global path. This'll help future-proof us against any ambiguities and give us more time to settle the precise syntax. In the meantime though a bare identifier can be used and imported to invoke a custom attribute macro. A new feature gate, `proc_macro_path_invoc`, was added to gate multi-segment paths and absolute paths. * The set of items which can be annotated by a custom procedural attribute has been restricted. Statements, expressions, and modules are disallowed behind two new feature gates: `proc_macro_expr` and `proc_macro_mod`. * The input to procedural macro attributes has been restricted and adjusted. Today an invocation like `#[foo(bar)]` will receive `(bar)` as the input token stream, but after this PR it will only receive `bar` (the delimiters were removed). Invocations like `#[foo]` are still allowed and will be invoked in the same way as `#[foo()]`. This is a **breaking change** for all nightly users as the syntax coming in to procedural macros will be tweaked slightly. * Procedural macros (`foo!()` style) can only be expanded to item-like items by default. A separate feature gate, `proc_macro_non_items`, is required to expand to items like expressions, statements, etc. Closes #50038 [internals]: https://internals.rust-lang.org/t/help-stabilize-a-subset-of-macros-2-0/7252 [issue]: https://github.com/rust-lang/rust/issues/50038
-
- 13 4月, 2018 1 次提交
-
-
由 Vadim Petrochenkov 提交于
-
- 07 7月, 2017 1 次提交
-
-
由 Vadim Petrochenkov 提交于
-
- 25 5月, 2017 2 次提交
-
-
由 Jeffrey Seyfried 提交于
-
由 Jeffrey Seyfried 提交于
-
- 24 4月, 2017 1 次提交
-
-
由 Esteban Küber 提交于
-
- 25 2月, 2017 1 次提交
-
-
由 sinkuu 提交于
-
- 21 2月, 2017 1 次提交
-
-
由 Guillaume Gomez 提交于
-
- 05 2月, 2017 1 次提交
-
-
由 Cengiz Can 提交于
-
- 10 12月, 2016 1 次提交
-
-
由 Keith Yeung 提交于
-
- 10 3月, 2015 1 次提交
-
-
由 Julian Orth 提交于
-
- 19 7月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
When invoking the compiler in parallel, the intermediate output of the object files and bytecode can stomp over one another if two crates with the same name are being compiled. The output file is already being disambiguated with `-C extra-filename`, so this commit alters the naming of the temporary files to also mix in the extra filename to ensure that file names don't clash.
-
- 08 7月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
The output file was only being renamed based off #[crate_name], not #[crate_id] or --crate-name. Both of these behaviors have been restored now.
-
- 24 4月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
When an error is encountered when writing dependencies, this presents a nicer error rather than an ICE. Closes #13517
-
- 08 2月, 2014 1 次提交
-
-
由 Derek Guenther 提交于
-
- 02 1月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
Closes #11259
-