summary refs log tree commit diff
path: root/src/libsyntax/ext/deriving/generic
AgeCommit message (Collapse)AuthorLines
2015-01-08Store deprecated status of i/u-suffixed literals.Huon Wilson-1/+1
2015-01-07use slicing sugarJorge Aparicio-24/+24
2015-01-06Register new snapshotsAlex Crichton-5/+5
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-06rollup merge of #20609: cmr/memAlex Crichton-1/+1
2015-01-07Replace full slice notation with index callsNick Cameron-23/+23
2015-01-06syntax/rustc: implement isize/usizeCorey Richardson-1/+1
2015-01-05rollup merge of #20554: huonw/mut-patternAlex Crichton-1/+1
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05syntax: remove remaining boxed closuresJorge Aparicio-13/+9
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-0/+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-5/+5
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2015-01-02Accept `derive` instead of `deriving`Nick Cameron-12/+12
[breaking-change] `deriving is still accepted, but gives a deprecation warning
2014-12-31syntax: unbox closures used in let bindingsJorge Aparicio-1/+1
2014-12-26Accept `?Sized` as well as `Sized?`Nick Cameron-8/+10
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-22rollup merge of #20056: MrFloya/iter_renameAlex Crichton-1/+1
Conflicts: src/libcollections/bit.rs src/libcore/str.rs
2014-12-22Renaming of the Iter types as in RFC #344Florian Wilkens-1/+1
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-21Fallout of std::str stabilizationAlex Crichton-23/+23
2014-12-20Add support for multiple region bounds in where clausesJared Roesch-1/+1
2014-12-20Add parser support for generalized where clausesJared Roesch-2/+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-17rollup merge of #19831: luqmana/deriving-whereAlex Crichton-5/+25
Fixes #19358.
2014-12-14Parse `unsafe impl` but don't do anything particularly interesting with the ↵Niko Matsakis-1/+2
results.
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-1/+1
2014-12-14libsyntax: Make deriving also respect where bounds.Luqman Aden-5/+25
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-27/+35
2014-12-12Add support for equality constraints on associated typesNick Cameron-3/+3
2014-11-26rollup merge of #19329: steveklabnik/doc_style_cleanup2Alex Crichton-4/+2
2014-11-26/*! -> //!Steve Klabnik-4/+2
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-3/+3
bounds.
2014-11-19rollup merge of #19090: kmcallister/deriving-non-typeJakub Bukaj-2/+5
Besides being more helpful, this gives us the flexibility to later define a meaning for something like ```rust #[deriving(...)] mod bar { ... } ```
2014-11-18std: Stabilize std::fmtAlex Crichton-1/+1
This commit applies the stabilization of std::fmt as outlined in [RFC 380][rfc]. There are a number of breaking changes as a part of this commit which will need to be handled to migrated old code: * A number of formatting traits have been removed: String, Bool, Char, Unsigned, Signed, and Float. It is recommended to instead use Show wherever possible or to use adaptor structs to implement other methods of formatting. * The format specifier for Boolean has changed from `t` to `b`. * The enum `FormatError` has been renamed to `Error` as well as becoming a unit struct instead of an enum. The `WriteError` variant no longer exists. * The `format_args_method!` macro has been removed with no replacement. Alter code to use the `format_args!` macro instead. * The public fields of a `Formatter` have become read-only with no replacement. Use a new formatting string to alter the formatting flags in combination with the `write!` macro. The fields can be accessed through accessor methods on the `Formatter` structure. Other than these breaking changes, the contents of std::fmt should now also all contain stability markers. Most of them are still #[unstable] or #[experimental] [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0380-stabilize-std-fmt.md [breaking-change] Closes #18904
2014-11-18deriving: error out when used on a non-typeKeegan McAllister-2/+5
Besides being more helpful, this gives us the flexibility to later define a meaning for something like #[deriving(...)] mod bar { ... }
2014-11-17Switch to purely namespaced enumsSteven Fackler-24/+26
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-9/+4
[breaking-change] This will break any uses of macros that assumed () being a valid literal.
2014-11-07Update parser with `for` syntaxNiko Matsakis-2/+2
2014-10-27Preserve struct field pattern shorthand in the prettyprinter.Kevin Mehall-1/+1
Use the `is_shorthand` field introduced by #17813 (ead6c4b) to make the prettyprinter output the shorthand form. Fixes a few places that set `is_shorthand: true` when the pattern is not a PatIdent with the same name as the field.
2014-10-24Add a lint for not using field pattern shorthandsP1start-1/+4
Closes #17792.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-3/+5
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-09-22auto merge of #17339 : treeman/rust/doc-things, r=alexcrichtonbors-156/+129
Also some cleanup to conform to documentation style.
2014-09-18syntax: use an index in CodeMap instead of Gc for ExpnInfo.Eduard Burtescu-2/+1
2014-09-17doc: Remove "see above".Jonas Hietala-4/+3
2014-09-17doc: Backticks and spelling mistakes.Jonas Hietala-13/+13
2014-09-17doc: Cleanup.Jonas Hietala-149/+123
Remove ~~~ for code block specification. Use /// Over /** */ for doc blocks.
2014-09-16Fallout from renamingAaron Turon-9/+9
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-137/+134
2014-08-31auto merge of #16788 : Manishearth/rust/raw-ptr-syntax-ty, r=huonwbors-1/+5
@huonw , r? :) #16781
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-0/+6
2014-08-27Allow *-pointers in PtrTy (fixes #16781)Manish Goregaokar-1/+5
2014-08-16librustc: Forbid external crates, imports, and/or items from beingPatrick Walton-1/+1
declared with the same name in the same scope. This breaks several common patterns. First are unused imports: use foo::bar; use baz::bar; Change this code to the following: use baz::bar; Second, this patch breaks globs that import names that are shadowed by subsequent imports. For example: use foo::*; // including `bar` use baz::bar; Change this code to remove the glob: use foo::{boo, quux}; use baz::bar; Or qualify all uses of `bar`: use foo::{boo, quux}; use baz; ... baz::bar ... Finally, this patch breaks code that, at top level, explicitly imports `std` and doesn't disable the prelude. extern crate std; Because the prelude imports `std` implicitly, there is no need to explicitly import it; just remove such directives. The old behavior can be opted into via the `import_shadowing` feature gate. Use of this feature gate is discouraged. This implements RFC #116. Closes #16464. [breaking-change]
2014-08-14librustc: Implement simple `where` clauses.Patrick Walton-4/+13
These `where` clauses are accepted everywhere generics are currently accepted and desugar during type collection to the type parameter bounds we have today. A new keyword, `where`, has been added. Therefore, this is a breaking change. Change uses of `where` to other identifiers. [breaking-change]