about summary refs log tree commit diff
path: root/src/libsyntax/ext/build.rs
AgeCommit message (Collapse)AuthorLines
2015-01-21syntax: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-41/+36
2015-01-18libsyntax: int types -> isizePaul Collier-2/+2
2015-01-17libsyntax: rename functions from uint to usizePaul Collier-5/+5
2015-01-17libsyntax: uint types to usizePaul Collier-4/+4
2015-01-08Store deprecated status of i/u-suffixed literals.Huon Wilson-2/+3
2015-01-07use slicing sugarJorge Aparicio-2/+1
2015-01-06rollup merge of #20609: cmr/memAlex Crichton-2/+2
2015-01-07Replace full slice notation with index callsNick Cameron-1/+1
2015-01-06syntax/rustc: implement isize/usizeCorey Richardson-2/+2
2015-01-02Make type in ast::Local optionalSeo Sanghyeon-2/+2
2014-12-26Accept `?Sized` as well as `Sized?`Nick Cameron-4/+1
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-21Fallout of std::str stabilizationAlex Crichton-2/+1
2014-12-20Drop the Match prefix from the MatchSource variantsBarosl Lee-1/+1
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-1/+1
2014-12-12Add support for equality constraints on associated typesNick Cameron-5/+9
2014-12-05Utilize fewer reexportsCorey Farwell-0/+8
In regards to: https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729 This commit: * Changes the #deriving code so that it generates code that utilizes fewer reexports (in particur Option::* and Result::*), which is necessary to remove those reexports in the future * Changes other areas of the codebase so that fewer reexports are utilized
2014-11-26Rote changes due to the fact that ast paths no longer carry this extraneous ↵Niko Matsakis-8/+15
bounds.
2014-11-23Remove type parameters from ExprField and ExprTupFieldAdolfo Ochagavía-2/+2
2014-11-19Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an ↵Niko Matsakis-2/+2
optional unboxed closure kind.
2014-11-16Complete the removal of ty_nil, ast::LitNil, ast::TyBot and ast::TyUniqJakub Bukaj-18/+3
[breaking-change] This will break any uses of macros that assumed () being a valid literal.
2014-11-07Update parser with `for` syntaxNiko Matsakis-4/+11
2014-11-06Support parenthesized paths `Foo(A,B) -> C` that expand to `Foo<(A,B),C>`. ↵Niko Matsakis-4/+5
These paths also bind anonymous regions (or will, once HRTB is fully working). Fixes #18423.
2014-10-24Add a lint for not using field pattern shorthandsP1start-2/+2
Closes #17792.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-1/+1
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-10Desugar `while let` into `loop { match { ... } }`John Gallagher-0/+8
2014-10-09rustc: Add `const` globals to the languageAlex Crichton-0/+16
This change is an implementation of [RFC 69][rfc] which adds a third kind of global to the language, `const`. This global is most similar to what the old `static` was, and if you're unsure about what to use then you should use a `const`. The semantics of these three kinds of globals are: * A `const` does not represent a memory location, but only a value. Constants are translated as rvalues, which means that their values are directly inlined at usage location (similar to a #define in C/C++). Constant values are, well, constant, and can not be modified. Any "modification" is actually a modification to a local value on the stack rather than the actual constant itself. Almost all values are allowed inside constants, whether they have interior mutability or not. There are a few minor restrictions listed in the RFC, but they should in general not come up too often. * A `static` now always represents a memory location (unconditionally). Any references to the same `static` are actually a reference to the same memory location. Only values whose types ascribe to `Sync` are allowed in a `static`. This restriction is in place because many threads may access a `static` concurrently. Lifting this restriction (and allowing unsafe access) is a future extension not implemented at this time. * A `static mut` continues to always represent a memory location. All references to a `static mut` continue to be `unsafe`. This is a large breaking change, and many programs will need to be updated accordingly. A summary of the breaking changes is: * Statics may no longer be used in patterns. Statics now always represent a memory location, which can sometimes be modified. To fix code, repurpose the matched-on-`static` to a `const`. static FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } change this code to: const FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } * Statics may no longer refer to other statics by value. Due to statics being able to change at runtime, allowing them to reference one another could possibly lead to confusing semantics. If you are in this situation, use a constant initializer instead. Note, however, that statics may reference other statics by address, however. * Statics may no longer be used in constant expressions, such as array lengths. This is due to the same restrictions as listed above. Use a `const` instead. [breaking-change] [rfc]: https://github.com/rust-lang/rfcs/pull/246
2014-10-02syntax: ast: remove TyBox and UnBox.Eduard Burtescu-5/+0
2014-09-30Produce a better error for irrefutable `if let` patternsKevin Ballard-1/+1
Modify ast::ExprMatch to include a new value of type ast::MatchSource, making it easy to tell whether the match was written literally or produced via desugaring. This allows us to customize error messages appropriately.
2014-09-22librustc: Parse and resolve higher-rank lifetimes in traits.Patrick Walton-1/+2
They will ICE during typechecking if used, because they depend on trait reform. This is part of unboxed closures.
2014-09-18syntax: use an index in CodeMap instead of Gc for ExpnInfo.Eduard Burtescu-2/+2
2014-09-16Fallout from renamingAaron Turon-2/+2
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-291/+236
2014-09-10Implement tuple and tuple struct indexingP1start-0/+12
This allows code to access the fields of tuples and tuple structs: let x = (1i, 2i); assert_eq!(x.1, 2); struct Point(int, int); let origin = Point(0, 0); assert_eq!(origin.0, 0); assert_eq!(origin.1, 0);
2014-08-27Allow *-pointers in PtrTy (fixes #16781)Manish Goregaokar-0/+11
2014-08-26DST coercions and DST structsNick Cameron-10/+1
[breaking-change] 1. The internal layout for traits has changed from (vtable, data) to (data, vtable). If you were relying on this in unsafe transmutes, you might get some very weird and apparently unrelated errors. You should not be doing this! Prefer not to do this at all, but if you must, you should use raw::TraitObject rather than hardcoding rustc's internal representation into your code. 2. The minimal type of reference-to-vec-literals (e.g., `&[1, 2, 3]`) is now a fixed size vec (e.g., `&[int, ..3]`) where it used to be an unsized vec (e.g., `&[int]`). If you want the unszied type, you must explicitly give the type (e.g., `let x: &[_] = &[1, 2, 3]`). Note in particular where multiple blocks must have the same type (e.g., if and else clauses, vec elements), the compiler will not coerce to the unsized type without a hint. E.g., `[&[1], &[1, 2]]` used to be a valid expression of type '[&[int]]'. It no longer type checks since the first element now has type `&[int, ..1]` and the second has type &[int, ..2]` which are incompatible. 3. The type of blocks (including functions) must be coercible to the expected type (used to be a subtype). Mostly this makes things more flexible and not less (in particular, in the case of coercing function bodies to the return type). However, in some rare cases, this is less flexible. TBH, I'm not exactly sure of the exact effects. I think the change causes us to resolve inferred type variables slightly earlier which might make us slightly more restrictive. Possibly it only affects blocks with unreachable code. E.g., `if ... { fail!(); "Hello" }` used to type check, it no longer does. The fix is to add a semicolon after the string.
2014-08-13librustc: Parse, but do not fully turn on, the `ref` keyword forPatrick Walton-2/+2
by-reference upvars. This partially implements RFC 38. A snapshot will be needed to turn this on, because stage0 cannot yet parse the keyword. Part of #12381.
2014-08-07Temporary bootstrapping hack: introduce syntax for r egion bounds like `'b:'a`,Niko Matsakis-0/+16
meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
2014-08-06AST refactoring: merge PatWild and PatWildMulti into one variant with a flag.Felix S. Klock II-1/+1
2014-08-05Fixes missing overflow lint for i64 #14269Falco Hirschenberger-3/+3
The `type_overflow` lint, doesn't catch the overflow for `i64` because the overflow happens earlier in the parse phase when the `u64` as biggest possible int gets casted to `i64` , without checking the for overflows. We can't lint in the parse phase, so a refactoring of the `LitInt` type was necessary. The types `LitInt`, `LitUint` and `LitIntUnsuffixed` where merged to one type `LitInt` which stores it's value as `u64`. An additional parameter was added which indicate the signedness of the type and the sign of the value.
2014-07-31rustrt: Make begin_unwind take a single file/line pointerBrian Anderson-5/+8
Smaller text size.
2014-07-29syntax: add some more extension helper methodsErick Tryzelaar-0/+52
2014-07-20Implement new mod import sugarJakub Wieczorek-1/+1
Implements RFC #168.
2014-07-11Add scaffolding for assigning alpha-numeric codes to rustc diagnosticsJakub Wieczorek-0/+6
2014-07-08Change DST syntax: type -> Sized?Nick Cameron-4/+4
closes #13367 [breaking-change] Use `Sized?` to indicate a dynamically sized type parameter or trait (used to be `type`). E.g., ``` trait Tr for Sized? {} fn foo<Sized? X: Share>(x: X) {} ```
2014-07-03Simplify PatIdent to contain an Ident rather than a PathJohn Clements-2/+1
Rationale: for what appear to be historical reasons only, the PatIdent contains a Path rather than an Ident. This means that there are many places in the code where an ident is artificially promoted to a path, and---much more problematically--- a bunch of elements from a path are simply thrown away, which seems like an invitation to some really nasty bugs. This commit replaces the Path in a PatIdent with a SpannedIdent, which just contains an ident and a span.
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-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-1/+1
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-13librustc: Fix the issue with labels shadowing variable names by makingPatrick Walton-2/+29
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-11syntax: Move the AST from @T to Gc<T>Alex Crichton-195/+223
2014-06-08Remove the dead code identified by the new lintJakub Wieczorek-12/+3