Vadim Petrochenkov
beda1f88a7
Provide span for visit_struct_def + remove some dead code
2015-10-13 15:19:19 +03:00
Vadim Petrochenkov
877c35e8a2
Remove now redundant NodeId from Variant
2015-10-13 15:19:18 +03:00
Vadim Petrochenkov
ea47c2b6b3
Unify structures and enum variants in AST
2015-10-13 15:19:15 +03:00
Nick Cameron
ba43c228b5
Some cleanup of no longer used AST things
2015-10-09 11:53:42 +13:00
Vadim Petrochenkov
4764d98223
Restore if let
s replaced with for
s
2015-09-29 11:33:25 +03:00
Vadim Petrochenkov
4744d56846
Fill in some missing parts in the default HIR visitor
2015-09-29 00:23:54 +03:00
Vadim Petrochenkov
eedb95101b
Fill in some missing parts in the default AST visitor
...
+ Add helper macro for walking lists (including Options)
2015-09-28 23:06:43 +03:00
Eduard Burtescu
f293ea28b4
Remove the deprecated box(PLACE) syntax.
2015-09-24 18:00:08 +03:00
Vadim Petrochenkov
c3f53d1b12
Resolve prefix in imports with empty braces
2015-09-17 14:13:14 +03:00
Vadim Petrochenkov
357982fae4
Workaround for imports with empty braces
2015-09-17 14:13:13 +03:00
Vadim Petrochenkov
50e42ea9f7
Correctly walk import lists in AST visitors
2015-09-17 14:13:12 +03:00
Ms2ger
2076cddcf2
Rename FnKind variants and stop re-exporting them from the visit module.
...
There is no longer a need for that pattern, since enums are now qualified.
2015-08-26 12:02:58 +02:00
Manish Goregaokar
c03bf18b84
FnFnBlock -> FkClosure
2015-08-16 18:23:58 +05:30
Manish Goregaokar
27db6e1e51
Impl Eq/PartialEq on FnKind, improve docs
2015-08-16 18:14:37 +05:30
Niko Matsakis
8a6118b748
move InlinedItem into librustc, where it belongs
2015-08-14 20:07:55 -04:00
bors
8856927f64
Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton
...
An implementation of [RFC 1219](https://github.com/rust-lang/rfcs/pull/1219 ).
The RFC is not merged yet, but once merged, this could be.
2015-08-10 20:24:06 +00:00
Sean McArthur
cfcd449c4c
rustc: rename multiple imports in a list
2015-08-08 11:54:15 -07:00
Jared Roesch
ad5927870c
Add a macro invocation to the type AST
...
Reapplied the changes from dc64b731d7
to a clean branch of master
2015-08-04 16:05:06 -07:00
Sean Patrick Santos
faf73028c9
Fix issue #23302 , ICE on recursively defined enum variant discriminant.
2015-06-22 20:55:57 -06:00
Joshua Landau
d7f5fa4636
Conver reborrows to .iter() calls where appropriate
2015-06-11 13:56:07 +01:00
Niko Matsakis
df93deab10
Make various fixes:
...
- 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-21 11:47:30 -04:00
Eduard Burtescu
af3795721c
syntax: parse const fn
for free functions and inherent methods.
2015-05-21 11:47:30 -04:00
Sean Patrick Santos
29eb550ee6
Get associated consts working in match patterns.
2015-04-23 21:02:29 -06:00
Sean Patrick Santos
b5499775d6
Structural changes for associated constants
...
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-23 21:02:25 -06:00
Nick Cameron
01678acf50
Expose visibility for fns in syntax::visit
2015-04-14 09:54:58 +12:00
Niko Matsakis
49b76a087b
Fallout in libsyntax
2015-04-01 11:22:39 -04:00
Eduard Burtescu
9da918548d
syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem.
2015-03-11 23:39:16 +02:00
Eduard Burtescu
ce10fa8d12
syntax: rename TypeMethod to MethodSig and use it in MethDecl.
2015-03-11 23:39:16 +02:00
Eduard Burtescu
f98b176314
syntax: gather common fields of impl & trait items into their respective types.
2015-03-11 23:39:16 +02:00
Eduard Burtescu
98491827b9
syntax: move indirection around {Trait,Impl}Item, from within.
2015-03-11 23:39:15 +02:00
Eduard Burtescu
d31b9ebef5
Implement <T>::method
UFCS expression syntax.
2015-02-24 14:16:02 +02:00
Eduard Burtescu
ffb8092ccf
syntax: use a single Path for Trait::Item in QPath.
2015-02-24 14:14:16 +02:00
Eduard Burtescu
004df413aa
syntax: don't use TraitRef in QPath.
2015-02-24 14:14:16 +02:00
Eduard Burtescu
a817c69297
syntax: don't store a secondary NodeId for TyPath.
2015-02-24 14:14:16 +02:00
Flavio Percoco
d38aab397e
Rename DefTrait to DefaultImpl
2015-02-22 02:14:25 +01:00
Flavio Percoco
6a2f16e136
Add support for default trait impls in libsyntax
2015-02-22 02:14:24 +01:00
Jorge Aparicio
17bc7d8d5b
cleanup: replace as[_mut]_slice()
calls with deref coercions
2015-02-05 13:45:01 -05:00
Niko Matsakis
0431134119
Remove the explicit closure kind syntax from the parser and AST;
...
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-02-03 11:56:16 -05:00
Jorge Aparicio
d5d7e6565a
for x in xs.iter()
-> for x in &xs
2015-02-02 13:40:18 -05:00
Eduard Burtescu
7cece8725b
syntax: fix fallout of merging ast::ViewItem into ast::Item.
2015-01-21 16:27:26 +02:00
Eduard Burtescu
2cdc86c180
syntax: add fully qualified UFCS expressions.
2015-01-15 18:51:14 +02:00
Alex Crichton
7975fd9cee
rollup merge of #20482 : kmcallister/macro-reform
...
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-05 19:01:17 -08:00
Alex Crichton
bb5e16b4b8
rollup merge of #20554 : huonw/mut-pattern
...
Conflicts:
src/librustc_typeck/check/_match.rs
2015-01-05 18:38:51 -08:00
Keegan McAllister
c9f0ff3813
Reserve the keyword 'macro'
2015-01-05 18:21:14 -08:00
Jorge Aparicio
714a5b7f5e
remove TyClosure
2015-01-05 17:22:15 -05:00
Huon Wilson
bf6c007760
Change &
pat to only work with &T, and &mut
with &mut T.
...
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-05 16:14:17 +11:00
Flavio Percoco
8b883ab268
Add syntax for negative implementations of traits
...
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-04 23:16:13 +01:00
Jorge Aparicio
351409a622
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
2015-01-03 22:54:18 -05:00
Alex Crichton
4459b1dced
rollup merge of #20341 : nikomatsakis/impl-trait-for-trait-2
...
Conflicts:
src/librustc/middle/traits/mod.rs
src/libstd/io/mod.rs
src/test/run-pass/builtin-superkinds-self-type.rs
2015-01-02 11:13:05 -08:00
Niko Matsakis
1b3734f8ae
Fix fallout from change, adding explicit Sized
annotations where necessary.
2015-01-02 12:06:59 -05:00