Commit Graph

36 Commits

Author SHA1 Message Date
Felix S. Klock II
d3202354f5 AST refactoring: merge PatWild and PatWildMulti into one variant with a flag. 2014-08-06 17:04:44 +02:00
Marvin Löbel
cef4378269 Refactoring: Only use MacroExpander for expanding outside of
`syntax::ext::expand`
2014-07-22 01:00:03 +02:00
Patrick Walton
de70d76373 librustc: Remove cross-borrowing of Box<T> to &T from the language,
except where trait objects are involved.

Part of issue #15349, though I'm leaving it open for trait objects.
Cross borrowing for trait objects remains because it is needed until we
have DST.

This will break code like:

    fn foo(x: &int) { ... }

    let a = box 3i;
    foo(a);

Change this code to:

    fn foo(x: &int) { ... }

    let a = box 3i;
    foo(&*a);

[breaking-change]
2014-07-17 14:05:36 -07:00
Brian Anderson
fa2d220567 Update doc URLs for version bump 2014-07-11 11:21:57 -07:00
Alex Crichton
0c71e0c596 Register new snapshots
Closes #15544
2014-07-09 10:57:58 -07:00
Richo Healey
12c334a77b std: Rename the ToStr trait to ToString, and to_str to to_string.
[breaking-change]
2014-07-08 13:01:43 -07:00
Alex Crichton
e44c2b9bbc Add #[crate_name] attributes as necessary 2014-07-05 12:45:42 -07:00
Patrick Walton
29ec2506ab librustc: Remove the &LIFETIME EXPR production from the language.
This was parsed by the parser but completely ignored; not even stored in
the AST!

This breaks code that looks like:

    static X: &'static [u8] = &'static [1, 2, 3];

Change this code to the shorter:

    static X: &'static [u8] = &[1, 2, 3];

Closes #15312.

[breaking-change]
2014-07-04 00:56:57 -07:00
bors
5b11610ced auto merge of #15343 : alexcrichton/rust/0.11.0-release, r=brson 2014-07-04 01:21:19 +00:00
Piotr Jawniak
2f355b79dd Simplify creating a parser from a token tree
Closes #15306
2014-07-03 12:54:52 -07:00
Alex Crichton
aa1163b92d Update to 0.11.0 2014-06-27 12:50:16 -07:00
Simon Sapin
d7e01b5809 Add a b"xx" byte string literal of type &'static [u8]. 2014-06-17 23:43:18 +02:00
Alex Crichton
ade807c6dc rustc: Obsolete the @ syntax entirely
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-14 10:45:37 -07:00
Keegan McAllister
aca0bac29f Convert libraries to use #[plugin_registrar] 2014-06-09 14:29:30 -07:00
bors
732e057815 auto merge of #14667 : aochagavia/rust/pr2, r=huonw 2014-06-06 01:21:54 -07:00
Adolfo Ochagavía
501b904bb7 Change to_str().to_string() to just to_str() 2014-06-06 09:56:59 +02:00
Andrew Gallant
0f73bf32fe Fixes #14185.
This fix suppresses dead_code warnings from code generated by regex! when
the result of regex! is unused. Correct behavior should be a single
unused variable warning.

Regression tests are included for both `let` and `static` bound regex!
values.
2014-06-04 16:59:27 -04:00
klutzy
1ec6de3ecf syntax: Make quasiquoter use absolute paths
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-04 02:00:03 +09:00
klutzy
976c8324e1 syntax: Remove use of pub use globs
`quote_expr!` now injects two more (priv) `use` globs.
This may cause extra unused_imports warning.
2014-06-02 23:21:40 +09:00
Richo Healey
1f1b2e42d7 std: Rename strbuf operations to string
[breaking-change]
2014-05-27 12:59:31 -07:00
Marvin Löbel
b997de529a Change regex! macro to expand to a constexpr, allowing to put it in a static 2014-05-25 22:30:50 +02:00
Richo Healey
553074506e core: rename strbuf::StrBuf to string::String
[breaking-change]
2014-05-24 21:48:10 -07:00
Alex Crichton
2fd4841724 core: Finish stabilizing the mem module.
* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]
2014-05-23 20:55:57 -07:00
bors
a0960a1223 auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonw 2014-05-22 16:56:23 -07:00
Patrick Walton
e878721d70 libcore: Remove all uses of ~str from libcore.
[breaking-change]
2014-05-22 14:42:02 -07:00
Patrick Walton
36195eb91f libstd: Remove ~str from all libstd modules except fmt and str. 2014-05-22 14:42:01 -07:00
Alex Crichton
799ddba8da Change static.rust-lang.org to doc.rust-lang.org
The new documentation site has shorter urls, gzip'd content, and index.html
redirecting functionality.
2014-05-21 19:55:39 -07:00
Patrick Walton
ec5911b2a6 libregex: Remove all uses of ~str from libregex 2014-05-14 18:29:12 -07:00
Brian Anderson
c1da4f875f Add the patch number to version strings. Closes #13289 2014-05-12 19:52:29 -07:00
Patrick Walton
090040bf40 librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except
for `~str`/`~[]`.

Note that `~self` still remains, since I forgot to add support for
`Box<self>` before the snapshot.

How to update your code:

* Instead of `~EXPR`, you should write `box EXPR`.

* Instead of `~TYPE`, you should write `Box<Type>`.

* Instead of `~PATTERN`, you should write `box PATTERN`.

[breaking-change]
2014-05-06 23:12:54 -07:00
bors
b5d6b07370 auto merge of #13879 : huonw/rust/more-re, r=alexcrichton
Commits for details.

This shouldn't change the generated code at all (except for switching to `LitBinary` from an explicit ExprVec of individual ExprLit bytes for `prefix_bytes`).
2014-05-02 07:06:50 -07:00
Huon Wilson
1ad0cba5e6 regex_macros: simplify using AstBuilder & the improved quoting.
char literals now work in a quotation.

There were several instances of duplicated functionality in regex_macros
compared to AstBuilder so refactor those out.
2014-05-02 22:54:55 +10:00
Daniel Micay
7852625b86 remove leftover obsolete string literals 2014-05-01 17:42:57 -04:00
Huon Wilson
33f98ada02 regex: General style tweaks.
For loops are nicer than manual whiles, etc.
2014-04-30 10:35:20 +10:00
Huon Wilson
de14a739ae regex: remove the use of ~[] & some unnecessary ~'s.
The AST doesn't need ~s everywhere, so we can save allocations this way
& the enum isn't particularly large (~4 words) nor are regexes
long (normally), so the space saved in the `Cat` vector is unlikely to
be very much.
2014-04-30 00:55:20 +10:00
Andrew Gallant
b8b7484703 Add a regex crate to the Rust distribution.
Also adds a regex_macros crate, which provides natively compiled
regular expressions with a syntax extension.

Closes #3591.

RFC: 0007-regexps
2014-04-25 00:27:24 -04:00