about summary refs log tree commit diff
path: root/src/libsyntax/ext/expand.rs
AgeCommit message (Collapse)AuthorLines
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-4/+1
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21syntax: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-4/+1
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-2/+2
2015-01-18libsyntax: int => i32 in appropriate placesPaul Collier-23/+23
2015-01-17libsyntax: uint types to usizePaul Collier-3/+3
2015-01-15Syntax extensions on trait and impl items.Nick Cameron-73/+211
Allows modifiers to be used on methods, associated types, etc.
2015-01-07Test fixes and rebase conflictsAlex Crichton-18/+2
2015-01-07use slicing sugarJorge Aparicio-35/+35
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-1/+1
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-1/+1
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-07Replace full slice notation with index callsNick Cameron-23/+24
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-78/+64
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05Reserve the keyword 'macro'Keegan McAllister-6/+6
2015-01-05Allow selective macro importKeegan McAllister-0/+1
2015-01-05Move #[macro_reexport] to extern crateKeegan McAllister-18/+4
2015-01-05Reformat metadata for exported macrosKeegan McAllister-32/+23
Instead of copy-pasting the whole macro_rules! item from the original .rs file, we serialize a separate name, attributes list, and body, the latter as pretty-printed TTs. The compilation of macro_rules! macros is decoupled somewhat from the expansion of macros in item position. This filters out comments, and facilitates selective imports.
2015-01-05Rename macro_escape to macro_useKeegan McAllister-18/+27
In the future we want to support #[macro_use(foo, bar)] mod macros; but it's not an essential part of macro reform. Reserve the syntax for now.
2015-01-05Implement macro re-exportKeegan McAllister-1/+8
Fixes #17103.
2015-01-05Add a special macro nonterminal $crateKeegan McAllister-5/+7
2015-01-05Replace LetSyntaxTT with MacroRulesTTKeegan McAllister-32/+22
The implementation of LetSyntaxTT was specialized to macro_rules! in various ways. This gets rid of the false generality and simplifies the code.
2015-01-05Ungate default type parameters.Huon Wilson-2/+0
These are in scope for 1.0, and this is good to e.g. find as many bugs as possible.
2015-01-04Add syntax for negative implementations of traitsFlavio Percoco-1/+1
This commit introduces the syntax for negative implmenetations of traits as shown below: `impl !Trait for Type {}` cc #13231 Part of RFC #3
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-2/+2
2015-01-02Make type in ast::Local optionalSeo Sanghyeon-1/+1
2014-12-31syntax: unbox closures used in let bindingsJorge Aparicio-1/+1
2014-12-31syntax: unbox closures used in function argumentsJorge Aparicio-1/+1
2014-12-30Fallout from stabilizationAaron Turon-1/+1
2014-12-29Slash the ast::Stmt type from 104 to 24 bytes.Huon Wilson-1/+1
(on platforms with 64-bit pointers.) The StmtMac variant is rather large and also fairly rare, so let's optimise the common case.
2014-12-21Fallout of std::str stabilizationAlex Crichton-29/+28
2014-12-21rollup merge of #20059: nick29581/self-implAlex Crichton-4/+47
r? @sfackler closes #20000
2014-12-20Allow `Self` in impls.Nick Cameron-4/+47
2014-12-20Drop the Match prefix from the MatchSource variantsBarosl Lee-4/+8
2014-12-20Print a friendly error for the if-let construct without an else blockBarosl Lee-1/+3
Fixes #19991.
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-31/+32
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-15auto merge of #19778 : aochagavia/rust/ice, r=alexcrichtonbors-9/+10
Fixes #19734
2014-12-14Remove `proc` types/expressions from the parser, compiler, andNiko Matsakis-18/+0
language. Recommend `move||` instead.
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-5/+7
2014-12-12Fix #19734 (ICE)Adolfo Ochagavía-9/+10
2014-11-24Fixed "::::" appearing in module_path!()Murarth-2/+9
2014-11-19Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an ↵Niko Matsakis-3/+4
optional unboxed closure kind.
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+1
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]
2014-11-16Complete the removal of ty_nil, ast::LitNil, ast::TyBot and ast::TyUniqJakub Bukaj-1/+1
[breaking-change] This will break any uses of macros that assumed () being a valid literal.
2014-10-29Rename fail! to panic!Steve Klabnik-3/+3
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-19/+19
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-16libsyntax: Remove all uses of {:?}.Luqman Aden-5/+5
2014-10-10Teach libsyntax about `while let`John Gallagher-0/+36
2014-10-01Limit recursion depth for macro expansions, closes #17628Florian Hahn-0/+2
2014-09-30Update after the fall out from the syntax::ptr changesJakub Wieczorek-30/+36
2014-09-30Update based on PR feedbackKevin Ballard-20/+16
2014-09-30Produce a better error for irrefutable `if let` patternsKevin Ballard-1/+1
Modify ast::ExprMatch to include a new value of type ast::MatchSource, making it easy to tell whether the match was written literally or produced via desugaring. This allows us to customize error messages appropriately.