about summary refs log tree commit diff
path: root/src/test/run-pass/hygiene
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-246/+56
2018-09-26Add `#![allow(..)]` as necessary to get re-migrated run-pass tests compiling ↵Felix S. Klock II-56/+62
with clean stderr again. Most were added mechanically.
2018-09-26Migrate `src/test/ui/run-pass/*` back to `src/test/run-pass/`.Felix S. Klock II-0/+1361
Fix #54047
2018-09-06Migrated slew of run-pass tests to various subdirectories of `ui/run-pass/`.Felix S. Klock II-455/+0
2018-07-08Remove fallback to parent modules from lexical resolutionVadim Petrochenkov-27/+0
2018-04-27Don't feature gate bang macros on 'proc_macro_path_invoc'.Sergio Benitez-6/+6
2018-04-20rustc: Tweak custom attribute capabilitiesAlex Crichton-6/+6
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
2018-02-26Auto merge of #48082 - jseyfried:improve_struct_field_hygiene, r=petrochenkovbors-0/+26
macros: improve struct constructor field hygiene, fix span bug Fixes #47311. r? @nrc
2018-02-19Add test.Jeffrey Seyfried-0/+26
2018-02-11Add test.Jeffrey Seyfried-0/+30
2017-12-13Add example of making an unhygienic macro hygienic by wrapping it in a ↵Jeffrey Seyfried-0/+91
declarative macro.
2017-12-13Improve interaction between macros 2.0 and `macro_rules!`.Jeffrey Seyfried-0/+69
2017-12-13Auto merge of #46419 - jseyfried:all_imports_in_metadata, r=nrcbors-0/+59
Record all imports (`use`, `extern crate`) in the crate metadata This PR adds non-`pub` `use` and `extern crate` imports in the crate metadata since hygienic macros invoked in other crates may use them. We already include all other non-`pub` items in the crate metadata. This improves import suggestions in some cases. Fixes #42337. r? @nrc
2017-12-07Add test for #44128.Jeffrey Seyfried-0/+25
2017-12-05Include non-`pub` `use` and `extern crate` items in the crate metadata for ↵Jeffrey Seyfried-0/+59
macros 2.0.
2017-10-06Improve resolution of associated types in macros 2.0Vadim Petrochenkov-0/+34
2017-07-06Check types for privacyVadim Petrochenkov-126/+0
2017-05-25Ignore pretty.Jeffrey Seyfried-0/+16
2017-05-25Add tests.Jeffrey Seyfried-0/+258