summary refs log tree commit diff
path: root/src/libsyntax_ext/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-10resolve: Remove `unshadowable_attrs`Vadim Petrochenkov-12/+2
2018-09-04Move #[test_case] to a syntax extensionJohn Renner-0/+2
2018-09-04Fix #[test] shadowing in macro_preludeJohn Renner-2/+12
2018-09-04Introduce Custom Test FrameworksJohn Renner-2/+8
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-23Use optimized SmallVec implementationIgor Gutorov-0/+2
2018-08-09[nll] libsyntax_ext: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-19rework printlnEsteban Küber-0/+10
2018-07-12Deny bare trait objects in src/libsyntax_extljedrz-1/+3
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+2
2018-05-23Rollup merge of #50846 - GuillaumeGomez:add-e0665, r=frewsxcvkennytm-3/+5
Add E0665
2018-05-21Add E0665Guillaume Gomez-3/+5
2018-05-17Pass crate editions to macro expansions, update testsVadim Petrochenkov-1/+4
2018-05-17Switch to 1.26 bootstrap compilerMark Simulacrum-2/+1
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-0/+1
2018-04-14Add error codes for libsyntax_extGuillaume Gomez-0/+5
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-16Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichtonbors-0/+3
Make `assert` a built-in procedural macro Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838).
2018-03-14Escape stringified expressionShotaro Yamada-0/+1
Payload of `Literal` token must be escaped. Also print printable non-ASCII characters.
2018-03-07check stability of macro invocationsAustin Bonander-0/+2
2018-03-07Make `assert` macro a built-in procedural macroShotaro Yamada-0/+2
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-2/+3
2017-12-09Use hygiene to access the injected crate (`core` or `std`) from builtin macros.Jeffrey Seyfried-0/+1
2017-08-27Move unused-extern-crate to late passTatsuyuki Ishi-1/+0
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-2/+12
2017-08-10Add a feature gateest31-1/+1
@alexcrichton figured out a way how to do it :)
2017-08-08Avoid calling the column!() macro in panicest31-0/+1
2017-06-21Rollup merge of #42620 - wesleywiser:compile_error, r=brsonCorey Farwell-0/+2
Add compile_error! Related to #40872
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-19Add compile_error!Wesley Wiser-0/+2
Related to #40872
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+2
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-1/+1
2017-02-28Add `syntax::ext::tt::quoted::{TokenTree, ..}` and remove ↵Jeffrey Seyfried-1/+0
`tokenstream::TokenTree::Sequence`.
2017-02-05Move derive macro expansion into the MacroExpanderJosh Driver-4/+1
This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.
2017-02-05Make builtin derives a SyntaxExtensionJosh Driver-0/+2
This allows builtin derives to be registered and resolved, just like other derive types.
2017-01-16Implement `#[proc_macro_attribute]`Austin Bonander-0/+2
* Add support for `#[proc_macro]` * Reactivate `proc_macro` feature and gate `#[proc_macro_attribute]` under it * Have `#![feature(proc_macro)]` imply `#![feature(use_extern_macros)]`, error on legacy import of proc macros via `#[macro_use]`
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2017-01-02rustc: Stabilize the `proc_macro` featureAlex Crichton-1/+0
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
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-18Remove scope placeholders, remove method `add_macro` of `ext::base::Resolver`.Jeffrey Seyfried-4/+1
2016-11-30Update the bootstrap compilerAlex Crichton-1/+0
Now that we've got a beta build, let's use it!
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-5/+6
2016-11-12Rollup merge of #37613 - DanielKeep:eww-you-got-printf-in-your-format, ↵Eduard-Mihai Burtescu-0/+1
r=alexcrichton Add foreign formatting directive detection. This teaches `format_args!` how to interpret format printf- and shell-style format directives. This is used in cases where there are unused formatting arguments, and the reason for that *might* be because the programmer is trying to use the wrong kind of formatting string. This was prompted by an issue encountered by simulacrum on the #rust IRC channel. In short: although `println!` told them that they weren't using all of the conversion arguments, the problem was in using printf-syle directives rather than ones `println!` would undertand. Where possible, `format_args!` will tell the programmer what they should use instead. For example, it will suggest replacing `%05d` with `{:0>5}`, or `%2$.*3$s` with `{1:.3$}`. Even if it cannot suggest a replacement, it will explicitly note that Rust does not support that style of directive, and direct the user to the `std::fmt` documentation. ----- **Example**: given: ```rust fn main() { println!("%.*3$s %s!\n", "Hello,", "World", 4); println!("%1$*2$.*3$f", 123.456); } ``` The compiler outputs the following: ```text error: multiple unused formatting arguments --> local/fmt.rs:2:5 | 2 | println!("%.*3$s %s!\n", "Hello,", "World", 4); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: argument never used --> local/fmt.rs:2:30 | 2 | println!("%.*3$s %s!\n", "Hello,", "World", 4); | ^^^^^^^^ note: argument never used --> local/fmt.rs:2:40 | 2 | println!("%.*3$s %s!\n", "Hello,", "World", 4); | ^^^^^^^ note: argument never used --> local/fmt.rs:2:49 | 2 | println!("%.*3$s %s!\n", "Hello,", "World", 4); | ^ = help: `%.*3$s` should be written as `{:.2$}` = help: `%s` should be written as `{}` = note: printf formatting not supported; see the documentation for `std::fmt` = note: this error originates in a macro outside of the current crate error: argument never used --> local/fmt.rs:6:29 | 6 | println!("%1$*2$.*3$f", 123.456); | ^^^^^^^ | = help: `%1$*2$.*3$f` should be written as `{0:1$.2$}` = note: printf formatting not supported; see the documentation for `std::fmt` ```
2016-11-11Add foreign formatting directive detection.Daniel Keep-0/+1
This teaches `format_args!` how to interpret format printf- and shell-style format directives. This is used in cases where there are unused formatting arguments, and the reason for that *might* be because the programmer is trying to use the wrong kind of formatting string. This was prompted by an issue encountered by simulacrum on the #rust IRC channel. In short: although `println!` told them that they weren't using all of the conversion arguments, the problem was in using printf-syle directives rather than ones `println!` would undertand. Where possible, `format_args!` will tell the programmer what they should use instead. For example, it will suggest replacing `%05d` with `{:0>5}`, or `%2$.*3$s` with `{1:.3$}`. Even if it cannot suggest a replacement, it will explicitly note that Rust does not support that style of directive, and direct the user to the `std::fmt` documentation.
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-1/+1