summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2014-12-29Rebase fixes.Huon Wilson-3/+3
I've totally mangled the history with these rebases; sorry, future programmer!
2014-12-29Slash the ast::Stmt type from 104 to 24 bytes.Huon Wilson-6/+6
(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-28Rename TaskRng to ThreadRngSimonas Kazlauskas-1/+1
Since runtime is removed, rust has no tasks anymore and everything is moving from being task-* to thread-*. Let’s rename TaskRng as well! * Rename TaskRng to ThreadRng * Rename task_rng to thread_rng [breaking-change]
2014-12-28auto merge of #20136 : eddyb/rust/format-args, r=alexcrichtonbors-147/+99
We have the technology: no longer do you need to write closures to use `format_args!`. This is a `[breaking-change]`, as it forces you to clean up old hacks - if you had code like this: ```rust format_args!(fmt::format, "{} {} {}", a, b, c) format_args!(|args| { w.write_fmt(args) }, "{} {} {}", x, y, z) ``` change it to this: ```rust fmt::format(format_args!("{} {} {}", a, b, c)) w.write_fmt(format_args!("{} {} {}", x, y, z)) ``` To allow them to be called with `format_args!(...)` directly, several functions were modified to take `fmt::Arguments` by value instead of by reference. Also, `fmt::Arguments` derives `Copy` now in order to preserve all usecases that were previously possible.
2014-12-27syntax: change format_args! to produce fmt::Arguments instead of calling a ↵Eduard Burtescu-66/+29
function with them.
2014-12-27syntax: use std::string::String unqualified in format.Eduard Burtescu-13/+12
2014-12-27syntax: turn the match-call generated by format_args inside-out.Eduard Burtescu-39/+41
2014-12-27syntax: format: put static arrays in their own blocks to avoid needing a ↵Eduard Burtescu-40/+39
wrapper block.
2014-12-27syntax: format: remove unused method_statics field.Eduard Burtescu-15/+4
2014-12-27auto merge of #19916 : SimonSapin/rust/ascii-reform, r=sfacklerbors-0/+3
Implements [RFC 486](https://github.com/rust-lang/rfcs/pull/486). Fixes #19908. * Rename `to_ascii_{lower,upper}` to `to_ascii_{lower,upper}case`, per #14401 * Remove the `Ascii` type and associated traits: `AsciiCast`, `OwnedAsciiCast`, `AsciiStr`, `IntoBytes`, and `IntoString`. * As a replacement, add `.is_ascii()` to `AsciiExt`, and implement `AsciiExt` for `u8` and `char`. [breaking-change]
2014-12-28Fix spans for `use` view statements and their treatment in save-analysisNick Cameron-3/+4
2014-12-27Extend span debuggerSeo Sanghyeon-3/+49
2014-12-26Keep track of the whole error chainFlavio Percoco-2/+5
2014-12-26Changes to RustDocNick Cameron-7/+12
2014-12-26Accept `?Sized` as well as `Sized?`Nick Cameron-70/+125
Includes a bit of refactoring to store `?` unbounds as bounds with a modifier, rather than in their own world, in the AST at least.
2014-12-25Remove Ascii, AsciiCast, OwnedAsciiCast, AsciiStr, IntoBytes, IntoString.Simon Sapin-0/+3
As a replacement, add is_ascii() to AsciiExt, and implement AsciiExt for u8 and char. [breaking-change]
2014-12-25Parse fully-qualified associated types in generics without whitespaceP1start-34/+10
This breaks code that looks like this: let x = foo as bar << 13; Change such code to look like this: let x = (foo as bar) << 13; Closes #17362. [breaking-change]
2014-12-24auto merge of #20117 : lfairy/rust/rename-include-bin, r=alexcrichtonbors-1/+10
According to [RFC 344][], methods that return `&[u8]` should have names ending in `bytes`. Though `include_bin!` is a macro not a method, it seems reasonable to follow the convention anyway. We keep the old name around for now, but trigger a deprecation warning when it is used. [RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md [breaking-change]
2014-12-24Add syntax for rangesNick Cameron-8/+48
2014-12-23Rename include_bin! to include_bytes!Chris Wong-1/+10
According to [RFC 344][], methods that return `&[u8]` should have names ending in `bytes`. Though `include_bin!` is a macro not a method, it seems reasonable to follow the convention anyway. We keep the old name around for now, but trigger a deprecation warning when it is used. [RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md [breaking-change]
2014-12-22rollup merge of #19891: nikomatsakis/unique-fn-types-3Alex Crichton-9/+19
Conflicts: src/libcore/str.rs src/librustc_trans/trans/closure.rs src/librustc_typeck/collect.rs src/libstd/path/posix.rs src/libstd/path/windows.rs
2014-12-22rollup merge of #20056: MrFloya/iter_renameAlex Crichton-13/+13
Conflicts: src/libcollections/bit.rs src/libcore/str.rs
2014-12-22rollup merge of #20141: frewsxcv/rfc438Alex Crichton-1/+1
RFC 248? I think you meant RFC 438. There ain’t an RFC 248, while 438 looks to be what is being referred to: https://github.com/rust-lang/rfcs/blob/master/text/0438-precedence-of-plus.md -------------- Chis Morgan has a pretty important documentation fix in #19385 and he hasn't responded in a while to that pull request so I rebased it for him Closes #19385
2014-12-22rollup merge of #20124: klutzy/pprust-asmAlex Crichton-5/+23
2014-12-22rollup merge of #20033: alexcrichton/deprecate-serialiseAlex Crichton-135/+181
This commit completes the deprecation story for the in-tree serialization library. The compiler will now emit a warning whenever it encounters `deriving(Encodable)` or `deriving(Decodable)`, and the library itself is now marked `#[unstable]` for when feature staging is enabled. All users of serialization can migrate to the `rustc-serialize` crate on crates.io which provides the exact same interface as the libserialize library in-tree. The new deriving modes are named `RustcEncodable` and `RustcDecodable` and require `extern crate "rustc-serialize" as rustc_serialize` at the crate root in order to expand correctly. To migrate all crates, add the following to your `Cargo.toml`: [dependencies] rustc-serialize = "0.1.1" And then add the following to your crate root: extern crate "rustc-serialize" as rustc_serialize; Finally, rename `Encodable` and `Decodable` deriving modes to `RustcEncodable` and `RustcDecodable`. [breaking-change]
2014-12-22RFC 248? I think you meant RFC 438.Chris Morgan-1/+1
There ain’t an RFC 248, while 438 looks to be what is being referred to: https://github.com/rust-lang/rfcs/blob/master/text/0438-precedence-of-plus.md
2014-12-22Fix fallout from changes. In cases where stage0 compiler is needed, weNiko Matsakis-9/+19
cannot use an `as` expression to coerce, so I used a one-off function instead (this is a no-op in stage0, but in stage1+ it triggers coercion from the fn pointer to the fn item type).
2014-12-22Renaming of the Iter types as in RFC #344Florian Wilkens-13/+13
libcore: slice::Items -> slice::Iter, slice::MutItems -> slice::IterMut libcollections: *::Items -> *::Iter, *::MoveItems -> *::IntoIter, *::MutItems -> *::IterMut This is of course a [breaking-change].
2014-12-22serialize: Fully deprecate the libraryAlex Crichton-135/+181
This commit completes the deprecation story for the in-tree serialization library. The compiler will now emit a warning whenever it encounters `deriving(Encodable)` or `deriving(Decodable)`, and the library itself is now marked `#[unstable]` for when feature staging is enabled. All users of serialization can migrate to the `rustc-serialize` crate on crates.io which provides the exact same interface as the libserialize library in-tree. The new deriving modes are named `RustcEncodable` and `RustcDecodable` and require `extern crate "rustc-serialize" as rustc_serialize` at the crate root in order to expand correctly. To migrate all crates, add the following to your `Cargo.toml`: [dependencies] rustc-serialize = "0.1.1" And then add the following to your crate root: extern crate "rustc-serialize" as rustc_serialize; Finally, rename `Encodable` and `Decodable` deriving modes to `RustcEncodable` and `RustcDecodable`. [breaking-change]
2014-12-21Fallout of std::str stabilizationAlex Crichton-492/+481
2014-12-22pprust: Fix asm optionsklutzy-5/+23
2014-12-21rollup merge of #19972: alexcrichton/snapshotsAlex Crichton-60/+0
Conflicts: src/libcollections/string.rs src/libcollections/vec.rs src/snapshots.txt
2014-12-21rollup merge of #20080: seanmonstar/new-show-syntaxAlex Crichton-0/+1
First step of #20013. This will allow (after a snapshot) to change all the debug strings from `{}` to `{:?}`. r? @alexcrichton
2014-12-21rollup merge of #20059: nick29581/self-implAlex Crichton-5/+48
r? @sfackler closes #20000
2014-12-21rollup merge of #20057: nick29581/array-syntaxAlex Crichton-4/+12
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported. Part of #19999 r? @nikomatsakis
2014-12-21rollup merge of #20039: barosl/if-let-friendly-errorAlex Crichton-9/+14
Fixes #19991.
2014-12-21Remove a ton of public reexportsCorey Farwell-2/+2
Remove most of the public reexports mentioned in #19253 These are all leftovers from the enum namespacing transition In particular: * src/libstd/num/strconv.rs * ExponentFormat * SignificantDigits * SignFormat * src/libstd/path/windows.rs * PathPrefix * src/libstd/sys/windows/timer.rs * Req * src/libcollections/str.rs * MaybeOwned * src/libstd/collections/hash/map.rs * Entry * src/libstd/collections/hash/table.rs * BucketState * src/libstd/dynamic_lib.rs * Rtld * src/libstd/io/net/ip.rs * IpAddr * src/libstd/os.rs * MemoryMapKind * MapOption * MapError * src/libstd/sys/common/net.rs * SocketStatus * InAddr * src/libstd/sys/unix/timer.rs * Req [breaking-change]
2014-12-20Add support for multiple region bounds in where clausesJared Roesch-14/+21
2014-12-20Add parser support for generalized where clausesJared Roesch-62/+119
Implement support in the parser for generalized where clauses, as well as the conversion of ast::WherePredicates to ty::Predicate in `collect.rs`.
2014-12-20add {:?} fmt syntaxSean McArthur-0/+1
2014-12-20Allow `Self` in impls.Nick Cameron-5/+48
2014-12-20Fix fallout of removing import_shadowing in tests.Eduard Burtescu-4/+3
2014-12-20Remove feature(import_shadowing) from all crates.Eduard Burtescu-1/+1
2014-12-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-4/+12
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
2014-12-20Drop the Match prefix from the MatchSource variantsBarosl Lee-11/+14
2014-12-20Print a friendly error for the if-let construct without an else blockBarosl Lee-2/+4
Fixes #19991.
2014-12-19auto merge of #19463 : kali/rust/master, r=alexcrichtonbors-2/+1
parse_ty() no longer takes a boolean parameter. quote_ty! implementation has not yet been modified accordingly. As a matter of fact, quote_ty! was not covered by tests. One test (called qquotes) references it, but it has been ignored for nearly one year and now need heavy refactoring. quote_token.rs seemed like a good place to test quote_ty!, many other quote_*! macros were asserted there.
2014-12-19Register new snapshotsAlex Crichton-60/+0
This does not yet start the movement to rustc-serialize. That detail is left to a future PR.
2014-12-19libsyntax: use `#[deriving(Copy)]`Jorge Aparicio-216/+77
2014-12-19ack parser.parse_ty change in quote_ty! (+ test)Mathieu Poumeyrol-2/+1