about summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
2015-01-21syntax: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-47/+26
2015-01-15syntax: add fully qualified UFCS expressions.Eduard Burtescu-3/+15
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-6/+6
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-05rollup merge of #20554: huonw/mut-patternAlex Crichton-1/+1
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05Reserve the keyword 'macro'Keegan McAllister-6/+6
2015-01-05remove TyClosureJorge Aparicio-8/+0
2015-01-05Change `&` pat to only work with &T, and `&mut` with &mut T.Huon Wilson-1/+1
This implements RFC 179 by making the pattern `&<pat>` require matching against a variable of type `&T`, and introducing the pattern `&mut <pat>` which only works with variables of type `&mut T`. The pattern `&mut x` currently parses as `&(mut x)` i.e. a pattern match through a `&T` or a `&mut T` that binds the variable `x` to have type `T` and to be mutable. This should be rewritten as follows, for example, for &mut x in slice.iter() { becomes for &x in slice.iter() { let mut x = x; Due to this, this is a [breaking-change] Closes #20496.
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-1/+1
2015-01-02rollup merge of #20341: nikomatsakis/impl-trait-for-trait-2Alex Crichton-2/+1
Conflicts: src/librustc/middle/traits/mod.rs src/libstd/io/mod.rs src/test/run-pass/builtin-superkinds-self-type.rs
2015-01-02Fix fallout from change, adding explicit `Sized` annotations where necessary.Niko Matsakis-2/+1
2015-01-02Make type in ast::Local optionalSeo Sanghyeon-5/+9
2014-12-30Don't normalize associated types when in region binders, wait until we ↵Niko Matsakis-0/+12
instantiate them. Also fix some assertions and handling of builtin bounds.
2014-12-29rollup merge of #20194: nick29581/dst-syntaxAlex Crichton-6/+7
Part of #19607. r? @nikomatsakis
2014-12-30Remove ExprSlice by hacking the compilerNick Cameron-5/+0
[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-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-26Accept `?Sized` as well as `Sized?`Nick Cameron-6/+7
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-24Add syntax for rangesNick Cameron-0/+4
2014-12-20Add support for multiple region bounds in where clausesJared Roesch-2/+5
2014-12-20Add parser support for generalized where clausesJared Roesch-3/+8
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-19libsyntax: use `#[deriving(Copy)]`Jorge Aparicio-2/+1
2014-12-19Make all predicates higher-ranked, not just trait references.Niko Matsakis-3/+16
2014-12-17rollup merge of #19918: pnkfelix/ast-refactor-make-place-in-exprbox-an-optionAlex Crichton-1/+1
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-16AST refactor: make the place in ExprBox an option.Felix S. Klock II-1/+1
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-15Resolve lifetimes in associated typesSeo Sanghyeon-8/+11
2014-12-14Parse `unsafe impl` but don't do anything particularly interesting with the ↵Niko Matsakis-1/+2
results.
2014-12-14Parse `unsafe trait` but do not do anything with it beyond parsing and ↵Niko Matsakis-1/+1
integrating into rustdoc etc.
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-1/+1
2014-12-14Remove `proc` types/expressions from the parser, compiler, andNiko Matsakis-15/+0
language. Recommend `move||` instead.
2014-12-12Add support for equality constraints on associated typesNick Cameron-2/+16
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+2
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-11-29Replace some verbose match statements with their `if let` equivalent.jfager-5/+2
No semantic changes, no enabling `if let` where it wasn't already enabled.
2014-11-26rollup merge of #19329: steveklabnik/doc_style_cleanup2Alex Crichton-5/+3
2014-11-26/*! -> //!Steve Klabnik-5/+3
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-26Rote changes due to the fact that ast paths no longer carry this extraneous ↵Niko Matsakis-7/+5
bounds.
2014-11-23Remove type parameters from ExprField and ExprTupFieldAdolfo Ochagavía-8/+2
2014-11-20auto merge of #19113 : nikomatsakis/rust/unboxed-boxed-closure-unification, ↵bors-8/+1
r=acrichto Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind). This supercedes PR #19089, which was already reviewed by @pcwalton.
2014-11-19Fixes to the roll-upJakub Bukaj-1/+1
2014-11-19rollup merge of #19073: jakub-/issue-19069Jakub Bukaj-7/+19
Fixes #19069. These were never intended not to be feature-gated but this PR is nonetheless a... [breaking-change]
2014-11-19Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an ↵Niko Matsakis-8/+1
optional unboxed closure kind.
2014-11-19Refactor QPath to take an ast::TraitRefNiko Matsakis-2/+2
2014-11-18Feature gate non-ASCII lifetime identifiersJakub Bukaj-7/+19
Fixes #19069.
2014-11-18Convert TyPolyTraitRef to accept arbitary bounds, so that things likeNiko Matsakis-42/+70
`Box<for<'a> Foo<&'a T> + 'a>` can be accepted. Also cleanup the visitor/fold in general, exposing more callbacks.
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+2
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-7/+13
[breaking-change] This will break any uses of macros that assumed () being a valid literal.
2014-11-07Update parser with `for` syntaxNiko Matsakis-6/+23
2014-11-06Remove the unboxed closure `|:|` notation from types and trait references ↵Niko Matsakis-13/+0
completely.
2014-11-06Support parenthesized paths `Foo(A,B) -> C` that expand to `Foo<(A,B),C>`. ↵Niko Matsakis-5/+17
These paths also bind anonymous regions (or will, once HRTB is fully working). Fixes #18423.
2014-11-03Restructure AST so that the associated type definition carriesNiko Matsakis-1/+2
bounds like any other "type parameter".