about summary refs log tree commit diff
path: root/src/libsyntax/ext/deriving/generic
AgeCommit message (Collapse)AuthorLines
2015-03-11syntax: gather common fields of impl & trait items into their respective types.Eduard Burtescu-26/+20
2015-03-11syntax: move indirection around {Trait,Impl}Item, from within.Eduard Burtescu-7/+7
2015-03-06Add #[allow_internal_unstable] to track stability for macros better.Huon Wilson-1/+2
Unstable items used in a macro expansion will now always trigger stability warnings, *unless* the unstable items are directly inside a macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns unless the span of the unstable item is a subspan of the definition of a macro marked with that attribute. E.g. #[allow_internal_unstable] macro_rules! foo { ($e: expr) => {{ $e; unstable(); // no warning only_called_by_foo!(); }} } macro_rules! only_called_by_foo { () => { unstable() } // warning } foo!(unstable()) // warning The unstable inside `foo` is fine, due to the attribute. But the `unstable` inside `only_called_by_foo` is not, since that macro doesn't have the attribute, and the `unstable` passed into `foo` is also not fine since it isn't contained in the macro itself (that is, even though it is only used directly in the macro). In the process this makes the stability tracking much more precise, e.g. previously `println!("{}", unstable())` got no warning, but now it does. As such, this is a bug fix that may cause [breaking-change]s. The attribute is definitely feature gated, since it explicitly allows side-stepping the feature gating system.
2015-02-24Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakisbors-1/+1
This is one more step towards completing #13231 This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go. The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items. Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well. This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
2015-02-22Add support for default trait impls in libsyntaxFlavio Percoco-1/+1
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-8/+8
where possible.
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-16/+16
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-16/+16
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-5/+5
2015-02-12Made `Self` a keyword.Marvin Löbel-8/+8
It is only allowed in paths now, where it will either work inside a `trait` or `impl` item, or not resolve outside of it. [breaking-change] Closes #22137
2015-02-09Accept quantification of lifetimes outside the self type in where clauses.Nick Cameron-0/+1
Closes #20022
2015-02-06Libsyntax has been updatedGuillaumeGomez-2/+1
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-1/+2
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-1/+1
2015-02-04remove all kind annotations from closuresJorge Aparicio-1/+1
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-2/+2
Conflicts: src/librustc/metadata/filesearch.rs src/librustc_back/target/mod.rs src/libstd/os.rs src/libstd/sys/windows/os.rs src/libsyntax/ext/tt/macro_parser.rs src/libsyntax/print/pprust.rs src/test/compile-fail/issue-2149.rs
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-2/+2
2015-02-02Omit integer suffix when unnecessaryAlfie John-8/+8
See PR # 21378 for context
2015-01-29s/Show/Debug/gJorge Aparicio-1/+1
2015-01-29convert remaining `range(a, b)` to `a..b`Jorge Aparicio-1/+1
2015-01-26Auto merge of #21614 - kvark:typedef, r=huonwbors-1/+23
Fixes #21497 I don't know if this can be tested with built-in tests.
2015-01-25Associated types support for deriving::generic::TraitDefDzmitry Malyshau-1/+23
2015-01-25Add the span of the operator itself to ast::BinOp.Huon Wilson-1/+1
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-1/+1
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21rollup merge of #21340: pshc/libsyntax-no-more-intsAlex Crichton-26/+26
Collaboration with @rylev! I didn't change `int` in the [quasi-quoter](https://github.com/pshc/rust/blob/99ae1a30f3ca28c0f7e431620560d30e44627124/src/libsyntax/ext/quote.rs#L328), because I'm not sure if there will be adverse effects. Addresses #21095.
2015-01-21syntax: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-1/+1
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-8/+8
2015-01-18libsyntax: int => i32 in appropriate placesPaul Collier-15/+15
2015-01-17libsyntax: uint types to usizePaul Collier-3/+3
2015-01-17s/deriving/derives in Comments/DocsEarl St Sauver-3/+3
There are a large number of places that incorrectly refer to deriving in comments, instead of derives. Fixes #20984
2015-01-13Update #[deriving] documentation.Huon Wilson-25/+28
Syntax and a few fixed bugs etc.
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