about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2015-01-03auto merge of #20154 : P1start/rust/qualified-assoc-type-generics, ↵bors-34/+10
r=nikomatsakis This modifies `Parser::eat_lt` to always split up `<<`s, instead of doing so only when a lifetime name followed or the `force` parameter (now removed) was `true`. This is because `Foo<<TYPE` is now a valid start to a type, whereas previously only `Foo<<LIFETIME` was valid. This is a [breaking-change]. Change code that looks like this: ```rust let x = foo as bar << 13; ``` to use parentheses, like this: ```rust let x = (foo as bar) << 13; ``` Closes #17362.
2015-01-02rollup merge of #20410: japaric/assoc-typesAlex Crichton-1/+3
Conflicts: src/liballoc/lib.rs src/libcollections/lib.rs src/libcollections/slice.rs src/libcore/ops.rs src/libcore/prelude.rs src/libcore/ptr.rs src/librustc/middle/traits/project.rs src/libstd/c_str.rs src/libstd/io/mem.rs src/libstd/io/mod.rs src/libstd/lib.rs src/libstd/path/posix.rs src/libstd/path/windows.rs src/libstd/prelude.rs src/libstd/rt/exclusive.rs src/libsyntax/lib.rs src/test/compile-fail/issue-18566.rs src/test/run-pass/deref-mut-on-ref.rs src/test/run-pass/deref-on-ref.rs src/test/run-pass/dst-deref-mut.rs src/test/run-pass/dst-deref.rs src/test/run-pass/fixup-deref-mut.rs src/test/run-pass/issue-13264.rs src/test/run-pass/overloaded-autoderef-indexing.rs
2015-01-02Merge remote-tracking branch 'origin/master' into rollupAlex Crichton-0/+4
Conflicts: src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
2015-01-02rollup merge of #20425: sanxiyn/opt-local-tyAlex Crichton-6/+2
This avoids having ast::Ty nodes which have no counterpart in the source.
2015-01-02core: use assoc types in `Deref[Mut]`Jorge Aparicio-1/+3
2015-01-02std: Stabilize the prelude moduleAlex Crichton-2/+6
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2015-01-02Make type in ast::Local optionalSeo Sanghyeon-6/+2
2015-01-02Accept `self` in place of `mod` in use itemsNick Cameron-0/+4
[breaking-change] `mod` is still accepted, but gives a deprecated warning
2015-01-02Fallout - change array syntax to use `;`Nick Cameron-2/+2
2015-01-02Accept ranges with only a maximum value: `..expr`Nick Cameron-4/+11
2015-01-02Disallow [_, ..n] syntax for fixed length arrays and repeating array ↵Nick Cameron-15/+2
constructors Closes #19999 [breaking-change] Use [_; n] instead.
2014-12-31syntax: unbox closures used in let bindingsJorge Aparicio-5/+5
2014-12-29rollup merge of #20266: nick29581/dxr-useAlex Crichton-3/+4
r? @huonw
2014-12-29rollup merge of #20264: nagisa/threadrngAlex Crichton-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! This is a breaking change. If a breaking change for consistency is not desired, feel free to close.
2014-12-29rollup merge of #20194: nick29581/dst-syntaxAlex Crichton-21/+74
Part of #19607. r? @nikomatsakis
2014-12-30Remove ExprSlice by hacking the compilerNick Cameron-4/+11
[breaking-change] The `mut` in slices is now redundant. Mutability is 'inferred' from position. This means that if mutability is only obvious from the type, you will need to use explicit calls to the slicing methods.
2014-12-30Add hypothetical support for ranges with only an upper boundNick Cameron-1/+1
Note that this doesn't add the surface syntax.
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-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-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-28Fix spans for `use` view statements and their treatment in save-analysisNick Cameron-3/+4
2014-12-26Accept `?Sized` as well as `Sized?`Nick Cameron-21/+74
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-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-24Add syntax for rangesNick Cameron-8/+32
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 #20033: alexcrichton/deprecate-serialiseAlex Crichton-6/+6
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-22serialize: Fully deprecate the libraryAlex Crichton-6/+6
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-132/+135
2014-12-21rollup merge of #20057: nick29581/array-syntaxAlex Crichton-1/+10
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-2/+2
Fixes #19991.
2014-12-20Add support for multiple region bounds in where clausesJared Roesch-4/+3
2014-12-20Add parser support for generalized where clausesJared Roesch-49/+72
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-20Fix fallout of removing import_shadowing in tests.Eduard Burtescu-4/+3
2014-12-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-1/+10
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-2/+2
2014-12-19libsyntax: use `#[deriving(Copy)]`Jorge Aparicio-23/+8
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-44/+109
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-16AST refactor: make the place in ExprBox an option.Felix S. Klock II-1/+4
This is to allow us to migrate away from UnUniq in a followup commit, and thus unify the code paths related to all forms of `box`.
2014-12-15Remove all shadowed lifetimes.Niko Matsakis-2/+2
2014-12-15auto merge of #19742 : vhbit/rust/copy-for-bitflags, r=alexcrichtonbors-1/+0
2014-12-14Parse `unsafe impl` but don't do anything particularly interesting with the ↵Niko Matsakis-3/+19
results.
2014-12-14Parse `unsafe trait` but do not do anything with it beyond parsing and ↵Niko Matsakis-3/+21
integrating into rustdoc etc.
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-30/+20
2014-12-14Remove `proc` types/expressions from the parser, compiler, andNiko Matsakis-32/+29
language. Recommend `move||` instead.
2014-12-13libsyntax: use tuple indexingJorge Aparicio-10/+10
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-60/+80
2014-12-13Add `Copy` to bitflags-generated structuresValerii Hiora-1/+0
2014-12-12Add support for equality constraints on associated typesNick Cameron-42/+135
2014-12-11Register new snapshotsAlex Crichton-10/+4