about summary refs log tree commit diff
path: root/src/libsyntax/ast_map/blocks.rs
AgeCommit message (Collapse)AuthorLines
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-255/+0
2015-05-21Make various fixes:Niko Matsakis-3/+2
- add feature gate - add basic tests - adjust parser to eliminate conflict between `const fn` and associated constants - allow `const fn` in traits/trait-impls, but forbid later in type check - correct some merge conflicts
2015-05-21rustc: const-qualify `const fn` function and method calls.Eduard Burtescu-14/+22
2015-05-21syntax: parse `const fn` for free functions and inherent methods.Eduard Burtescu-5/+15
2015-04-23Structural changes for associated constantsSean Patrick Santos-2/+1
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-14Expose visibility for fns in syntax::visitNick Cameron-11/+18
2015-04-01Fallout in libsyntaxNiko Matsakis-2/+2
2015-03-28cleanup: Remove unused braces in use statementsRicho Healey-1/+1
2015-03-11syntax: move MethMac to MacImplItem and combine {Provided,Required}Method ↵Eduard Burtescu-12/+16
into MethodTraitItem.
2015-03-11syntax: rename TypeMethod to MethodSig and use it in MethDecl.Eduard Burtescu-1/+1
2015-03-11syntax: gather common fields of impl & trait items into their respective types.Eduard Burtescu-12/+12
2015-03-11syntax: move indirection around {Trait,Impl}Item, from within.Eduard Burtescu-2/+2
2015-02-04remove all kind annotations from closuresJorge Aparicio-3/+3
2015-02-03Remove the explicit closure kind syntax from the parser and AST;Niko Matsakis-1/+1
upgrade the inference based on expected type so that it is able to infer the fn kind in isolation even if the full signature is not available (and we could perhaps do better still in some cases, such as extracting just the types of the arguments but not the return value).
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-2/+2
2014-12-19libsyntax: use `#[deriving(Copy)]`Jorge Aparicio-4/+2
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-4/+4
2014-12-14Remove `proc` types/expressions from the parser, compiler, andNiko Matsakis-4/+2
language. Recommend `move||` instead.
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-7/+8
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+4
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-19Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an ↵Niko Matsakis-3/+3
optional unboxed closure kind.
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-10-29Rename fail! to panic!Steve Klabnik-5/+5
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-0/+3
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-41/+41
2014-08-14librustc: Stop assuming that implementations and traits only containPatrick Walton-7/+11
methods. This paves the way to associated items by introducing an extra level of abstraction ("impl-or-trait item") between traits/implementations and methods. This new abstraction is encoded in the metadata and used throughout the compiler where appropriate. There are no functional changes; this is purely a refactoring.
2014-08-13librustc: Parse, but do not fully turn on, the `ref` keyword forPatrick Walton-1/+1
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-07-15change to new trait style for method field refsJohn Clements-4/+4
Per @pnkfelix 's suggestion, using a trait to make these field accesses more readable (and vastly more similar to the original code. oops fix new ast_map fix
2014-07-15Extend --pretty flowgraph=ID to include dataflow results in output.Felix S. Klock II-0/+218
Use one or more of the following `-Z` flag options to tell the graphviz renderer to include the corresponding dataflow sets (after the iterative constraint propagation reaches a fixed-point solution): * `-Z flowgraph-print-loans` : loans computed via middle::borrowck * `-Z flowgraph-print-moves` : moves computed via middle::borrowck::move_data * `-Z flowgraph-print-assigns` : assignments, via middle::borrowck::move_data * `-Z flowgraph-print-all` : all of the available sets are included. Fix #15016. ---- This also adds a module, `syntax::ast_map::blocks`, that captures a common abstraction shared amongst code blocks and procedure-like things. As part of this, moved `ast_map.rs` to subdir `ast_map/mod.rs`, to follow our directory layout conventions. (incorporated review feedback from huon, acrichto.)