Cristi Cobzarenco
4b308b44e1
typos: fix a grabbag of typos all over the place
2015-10-08 19:49:31 +01:00
Vadim Petrochenkov
f284cbc7af
Cleanup interfaces of Name, SyntaxContext and Ident
...
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24 23:05:02 +03:00
Jonas Schievink
5e8d39ebfd
Slightly improved macro diagnostics + Indentation fixes
2015-08-15 21:27:52 +02:00
Tim Neumann
c115c51363
improve span of erroneous empty macro invocation
...
The ideas is to use the span of the complete macro invocation if the span of a
macro error is `DUMMY_SP`.
fixes #7970
2015-08-07 16:53:13 +02:00
Oliver Schneider
00a5e66f81
remove get_ident and get_name, make as_str sound
2015-07-28 18:07:20 +02:00
Wesley Wiser
93ddee6cee
Change some instances of .connect() to .join()
2015-07-10 19:40:46 -04:00
Erick Tryzelaar
a4541b02a3
syntax: remove #![feature(box_syntax, box_patterns)]
2015-04-21 10:07:48 -07:00
Piotr Czarnecki
13bc8afa4b
Model lexer: Fix remaining issues
2015-04-21 12:02:12 +02:00
Tamir Duberstein
10f15e72e6
Negative case of len() -> is_empty()
...
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14 20:26:03 -07:00
Tamir Duberstein
29ac04402d
Positive case of len() -> is_empty()
...
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14 20:26:03 -07:00
Phil Dawes
b2bcb7229a
Work towards a non-panicing parser (libsyntax)
...
- Functions in parser.rs return PResult<> rather than panicing
- Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour.
- 'panictry!' macro added as scaffolding while converting panicing functions.
(This does the same as 'unwrap()' but is easier to grep for and turn into try!())
- Leaves panicing wrappers for the following functions so that the
quote_* macros behave the same:
- parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt
2015-04-05 09:52:50 +01:00
Eduard Burtescu
9889aae13e
syntax: use lookahead to distinguish inner and outer attributes, instead of passing the latter around.
2015-03-13 11:36:30 +02:00
bors
68740b4054
Auto merge of #22061 - pczarn:quote_matcher_and_attr, r=kmcallister
...
Fixes #19674
Fixes #17396 (already closed, yeah)
cc @kmcallister , @cmr
2015-03-05 04:32:51 +00:00
Piotr Czarnecki
3541abedeb
Add quasiquote for matchers and attributes
2015-03-04 16:13:37 +01:00
Felix S. Klock II
0d5bcb14ad
Switched to Box::new in many places.
...
Many of the modifications putting in `Box::new` calls also include a
pointer to Issue 22405, which tracks going back to `box <expr>` if
possible in the future.
(Still tried to use `Box<_>` where it sufficed; thus some tests still
have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.)
Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-03-03 21:05:55 +01:00
Niko Matsakis
68e5bb3f2c
Remove remaining uses of []. This time I tried to use deref coercions where possible.
2015-02-20 14:08:14 -05:00
Alex Crichton
d6e939a2df
Round 3 test fixes and conflicts
2015-02-18 16:34:04 -08:00
Alex Crichton
231eeaa35b
rollup merge of #22502 : nikomatsakis/deprecate-bracket-bracket
...
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-18 15:48:40 -08:00
Niko Matsakis
9ea84aeed4
Replace all uses of &foo[] with &foo[..] en masse.
2015-02-18 17:36:03 -05:00
Alex Crichton
5250a82f79
rollup merge of #22497 : nikomatsakis/suffixes
...
Conflicts:
src/librustc_trans/trans/tvec.rs
2015-02-18 14:35:01 -08:00
Niko Matsakis
2b5720a15f
Remove i, is, u, or us suffixes that are not necessary.
2015-02-18 09:09:12 -05:00
Kevin Butler
2f586b9687
Opt for .cloned() over .map(|x| x.clone()) etc.
2015-02-18 00:56:07 +00:00
GuillaumeGomez
7b973ba827
Update to last version, remove "[]" as much as possible
2015-02-06 12:03:46 +01:00
GuillaumeGomez
8b12d3ddf9
Libsyntax has been updated
2015-02-06 11:59:10 +01:00
GuillaumeGomez
d58c0a7597
Replace the get method by the deref one on InternedString
2015-02-06 11:59:10 +01:00
Alex Crichton
7335c7dd63
rollup merge of #21830 : japaric/for-cleanup
...
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 11:01:12 -08:00
Jorge Aparicio
d5f61b4332
for x in xs.iter_mut() -> for x in &mut xs
...
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
2015-02-02 13:40:18 -05:00
Jorge Aparicio
d5d7e6565a
for x in xs.iter() -> for x in &xs
2015-02-02 13:40:18 -05:00
Alfie John
9683745fed
Omit integer suffix when unnecessary
...
See PR # 21378 for context
2015-02-02 04:05:54 +00:00
Jorge Aparicio
efc97a51ff
convert remaining range(a, b) to a..b
2015-01-29 07:49:01 -05:00
Jorge Aparicio
7d661af9c8
for x in range(a, b) -> for x in a..b
...
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29 07:47:37 -05:00
Jorge Aparicio
c300d681bd
range(a, b).foo() -> (a..b).foo()
...
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-29 07:46:44 -05:00
Alexander Korolkov
8a22454731
Rephrase error message on invalid fragment specifiers in macros.
...
Also, print help on valid fragment specifiers.
2015-01-23 18:51:12 +03:00
Paul Collier
3c32cd1be2
libsyntax: 0u -> 0us, 0i -> 0is
2015-01-18 19:43:44 -08:00
Paul Collier
a32249d447
libsyntax: uint types to usize
2015-01-17 23:45:29 +00:00
Jorge Aparicio
517f1cc63c
use slicing sugar
2015-01-07 17:35:56 -05:00
Alex Crichton
0631b466c2
rollup merge of #19430 : pczarn/interp_tt-cleanup
...
Conflicts:
src/libsyntax/parse/parser.rs
2015-01-06 15:38:10 -08:00
Alex Crichton
e3f047c8c5
rollup merge of #20653 : alexcrichton/entry-unstable
...
There's been some debate over the precise form that these APIs should take, and
they've undergone some changes recently, so these APIs are going to be left
unstable for now to be fleshed out during the next release cycle.
2015-01-06 15:29:18 -08:00
Piotr Czarnecki
d85c017f92
Cleanup and followup to PR #17830 : parsing changes
...
Prevents breaking down `$name` tokens into separate `$` and `name`.
Reports unknown macro variables.
Fixes #18775
Fixes #18839
Fixes #15640
2015-01-07 00:24:48 +01:00
Nick Cameron
0c7f7a5fb8
fallout
2015-01-07 12:02:52 +13:00
Nick Cameron
f7ff37e4c5
Replace full slice notation with index calls
2015-01-07 10:46:33 +13:00
Dylan Ede
25eada1574
[breaking change] Revert Entry behaviour to take keys by value.
2015-01-06 11:59:26 -08:00
Ben Foppa
400c3a0ddc
[breaking change] Update entry API as part of RFC 509.
2015-01-04 15:55:54 -05:00
Jorge Aparicio
351409a622
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
2015-01-03 22:54:18 -05:00
Aaron Turon
6abfac083f
Fallout from stabilization
2014-12-30 17:06:08 -08:00
Alex Crichton
082bfde412
Fallout of std::str stabilization
2014-12-21 23:31:42 -08:00
Corey Farwell
98af642f5c
Remove a ton of public reexports
...
Remove most of the public reexports mentioned in #19253
These are all leftovers from the enum namespacing transition
In particular:
* src/libstd/num/strconv.rs
* ExponentFormat
* SignificantDigits
* SignFormat
* src/libstd/path/windows.rs
* PathPrefix
* src/libstd/sys/windows/timer.rs
* Req
* src/libcollections/str.rs
* MaybeOwned
* src/libstd/collections/hash/map.rs
* Entry
* src/libstd/collections/hash/table.rs
* BucketState
* src/libstd/dynamic_lib.rs
* Rtld
* src/libstd/io/net/ip.rs
* IpAddr
* src/libstd/os.rs
* MemoryMapKind
* MapOption
* MapError
* src/libstd/sys/common/net.rs
* SocketStatus
* InAddr
* src/libstd/sys/unix/timer.rs
* Req
[breaking-change]
2014-12-21 09:26:41 -08:00
Niko Matsakis
c4a3be6bd1
Rote changes due to the fact that ast paths no longer carry this extraneous bounds.
2014-11-26 11:42:06 -05:00
Steven Fackler
3dcd215740
Switch to purely namespaced enums
...
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-17 07:35:51 -08:00
Piotr Czarnecki
00676c8ea2
Add ast::SequenceRepetition
2014-11-07 10:21:57 +01:00