summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-1/+1
This commit removes superfluous to_string calls from various places
2014-06-25don't expand subexprs of for loop, just re-expand whole thing.John Clements-5/+6
Fixes #15167
2014-06-25remove misleading and unnecessary underscoresJohn Clements-2/+3
2014-06-25remove unneccessary pubs, shorten namesJohn Clements-9/+9
2014-06-25remove unneeded visit_ty methodsJohn Clements-9/+0
2014-06-25add unit test for match var hygieneJohn Clements-0/+12
2014-06-25enrich and rename crate_idents test caseJohn Clements-6/+12
2014-06-25comments onlyJohn Clements-4/+9
2014-06-25revive old commented-out test cases as ignored test cases for hygieneJohn Clements-6/+58
2014-06-25auto merge of #15160 : alexcrichton/rust/remove-f128, r=brsonbors-1/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24Allow splicing more things in quotesKeegan McAllister-0/+16
2014-06-24Use macros to implement syntax::ext::quote::ToSourceKeegan McAllister-125/+74
This code deserves a bigger refactor, but here's a local improvement.
2014-06-24Remove the quad_precision_float feature gateAlex Crichton-1/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-23Allow trailing comma in `concat!`Stepan Koltsov-2/+5
(And in other extensions implemented with `get_exprs_from_tts` function).
2014-06-18Revert bytes!() docstring change, and fix a typo.Simon Sapin-1/+1
2014-06-18Deprecate the bytes!() macro.Simon Sapin-0/+8
Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring.
2014-06-18auto merge of #14880 : SimonSapin/rust/byte-literals, r=alexcrichtonbors-0/+7
See #14646 (tracking issue) and rust-lang/rfcs#69. This does not close the tracking issue, as the `bytes!()` macro still needs to be removed. It will be later, after a snapshot is made with the changes in this PR, so that the new syntax can be used when bootstrapping the compiler.
2014-06-17Add a b'x' byte literal of type u8.Simon Sapin-0/+7
2014-06-17librustc: Make addresses of immutable statics insignificant unlessPatrick Walton-9/+1
`#[inline(never)]` is used. Closes #8958. This can break some code that relied on the addresses of statics being distinct; add `#[inline(never)]` to the affected statics. [breaking-change]
2014-06-16rustc: Improve span for error about using a method as a field.Kevin Butler-2/+10
libsyntax: ExprField now contains a SpannedIdent rather than Ident. [breaking-change]
2014-06-15Register new snapshotsAlex Crichton-25/+2
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-6/+11
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-14Register new snapshotsAlex Crichton-10/+0
2014-06-13Fix all violations of stronger guarantees for mutable borrowsCameron Zwarich-1/+2
Fix all violations in the Rust source tree of the stronger guarantee of a unique access path for mutable borrows as described in #12624.
2014-06-13syntax: parse outer attributes in `quote_item!` calls.Huon Wilson-5/+3
Fixes #14857.
2014-06-13syntax: fix quote_pat! & unignore a quotation test.Huon Wilson-3/+1
2014-06-13librustc: Fix the issue with labels shadowing variable names by makingPatrick Walton-5/+44
the leading quote part of the identifier for the purposes of hygiene. This adopts @jbclements' solution to #14539. I'm not sure if this is a breaking change or not. Closes #12512. [breaking-change]
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-184/+33
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-13/+14
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-452/+532
2014-06-10auto merge of #14764 : jbcrail/rust/fix-more-comments, r=alexcrichtonbors-4/+4
2014-06-10auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichtonbors-12/+3
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code. The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
2014-06-10Fix more misspelled comments and strings.Joseph Crail-4/+4
2014-06-09Implement #[plugin_registrar]Keegan McAllister-195/+34
See RFC 22. [breaking-change]
2014-06-08Remove the dead code identified by the new lintJakub Wieczorek-12/+3
2014-06-07Implement ToSource and ToToken for ast::ArgHanno Braun-0/+7
This makes ast::Arg usable in the quote_ macros. Please note that this commit doesn't include a regression test. There are tests that use the quote macros, but all of them are ignored. Due to that, there is no obvious (to me) way to test this. Since this change is absolutely trivial and only hooks up an additional type to existing infrastructure (which presumably is tested elsewhere), I concluded it's not worth the effort to follow up on this.
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-2/+2
2014-06-06Change to_str().to_string() to just to_str()Adolfo OchagavĂ­a-2/+2
2014-06-05Fallout from the libcollections movementAlex Crichton-8/+7
2014-06-04syntax: Make quasiquoter use absolute pathsklutzy-69/+54
As part of removing `pub use` glob, two extra import globs were injected to make `quote_expr!` work. However the globs caused `unused_import` warning in some places. Quasiquoter needed the globs since it generated idents (e.g. `TyU`) rather than absolute paths (`::syntax::ast::TyU`). This patch removes the extra globs and makes quasiquoter use absolute paths. Fixes #14618
2014-06-02auto merge of #14601 : skade/rust/remove-notrust-tags, r=alexcrichtonbors-7/+7
Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. `norust` as a negative statement is a bad tag. This change tags examples in other languages by their language. Plain notations are marked as `text`. Console examples are marked as `console`. Also fix markdown.rs to not highlight non-rust code. Amends the documentation to reflect the new behaviour.
2014-06-02auto merge of #14509 : klutzy/rust/de-pub-use-glob, r=alexcrichtonbors-12/+39
This patchset removes `pub use` usage except for `test/`. cc #11870
2014-06-02syntax: Remove use of `pub use` globsklutzy-12/+39
`quote_expr!` now injects two more (priv) `use` globs. This may cause extra unused_imports warning.
2014-06-02docs: Stop using `notrust`Florian Gilcher-7/+7
Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. This change tags examples in other languages by their language. Plain notations are marked as `text`. Console examples are marked as `console`. Also fix markdown.rs to not highlight non-rust code.
2014-06-02Fix deriving Encodable trait for unit structsPiotr Jawniak-0/+8
Closes #14021
2014-06-01std: Drop Total from Total{Eq,Ord}Alex Crichton-3/+3
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
2014-05-31syntax: Fix an accidental hyperlink in a commentAlex Crichton-1/+1
2014-05-30syntax: Prepare for Total{Eq,Ord} => {Eq,Ord}Alex Crichton-6/+7
This commit adds the groundwork for the renaming of the Total{Eq,Ord} traits. After this commit hits a snapshot, the traits can be renamed.
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-16/+15
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-30libsyntax: Fix snake_case errors.Kevin Butler-20/+27
A number of functions/methods have been moved or renamed to align better with rust standard conventions. syntax::ext::mtwt::xorPush => xor_push syntax::parse::parser::Parser => Parser::new [breaking-change]