about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2015-01-29Auto merge of #21677 - japaric:no-range, r=alexcrichtonbors-151/+156
Note: Do not merge until we get a newer snapshot that includes #21374 There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672). r? @alexcrichton
2015-01-29bring back `#[derive(Show)]` with a deprecation warningJorge Aparicio-0/+8
2015-01-29s/Show/Debug/gJorge Aparicio-128/+128
2015-01-29register snaphotsJorge Aparicio-2/+0
2015-01-29remove unused importsJorge Aparicio-1/+0
2015-01-29convert remaining `range(a, b)` to `a..b`Jorge Aparicio-4/+4
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-15/+15
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-1/+1
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-29Rollup merge of 21662 - oli-obk:hashmap_enum_json, r=alexcrichtonManish Goregaokar-1/+1
2015-01-29Rollup merge of 21681 - japaric:no-warn, r=alexcrichtonManish Goregaokar-5/+1
2015-01-29Rollup merge of #21626 - Ms2ger:various-cleanup, r=eddybManish Goregaokar-31/+11
2015-01-28Auto merge of #21019 - nikomatsakis:issue-20871-ret-as-assoc-type, r=nrcbors-3/+12
Fixes https://github.com/rust-lang/rust/issues/20871 r? @aturon (at least until we decide definitively if this is a good idea)
2015-01-28Move return type an associated type of the `Fn*` traits. Mostly this ↵Niko Matsakis-3/+12
involves tweaking things in the compiler that assumed two input types to assume two ouputs; we also have to teach `project.rs` to project `Output` from the unboxed closure and fn traits.
2015-01-28Remove unnecessary to_string() call.Ms2ger-1/+1
2015-01-28Remove a custom variant of iter::Cloned.Ms2ger-16/+3
2015-01-28Simplify the implementation of segments_name_eq.Ms2ger-14/+7
2015-01-28Auto merge of #21158 - alkor:issue-21131, r=nick29581bors-6/+10
Closes #21131
2015-01-27fix #[cfg(test)] warningsJorge Aparicio-5/+1
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-60/+61
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-26Make '-A warnings' apply to all warnings, including feature gate warningsBrian Anderson-7/+15
2015-01-26std: Rename Writer::write to Writer::write_allAlex Crichton-3/+3
In preparation for upcoming changes to the `Writer` trait (soon to be called `Write`) this commit renames the current `write` method to `write_all` to match the semantics of the upcoming `write_all` method. The `write` method will be repurposed to return a `usize` indicating how much data was written which differs from the current `write` semantics. In order to head off as much unintended breakage as possible, the method is being deprecated now in favor of a new name. [breaking-change]
2015-01-26Fallout of io => old_ioAlex Crichton-50/+50
2015-01-26Merge remote-tracking branch 'rust-lang/master'Brian Anderson-159/+106
Conflicts: src/librustc/lint/builtin.rs src/librustc/lint/context.rs
2015-01-26Auto merge of #21617 - alexcrichton:less-quotes, r=nikomatsakisbors-7/+8
This ends up propagating all the way out to the output of dep-info which then makes Cargo think that files are not existent (it thinks the files have quotes in their name) when they in fact do.
2015-01-26Auto merge of #21614 - kvark:typedef, r=huonwbors-16/+55
Fixes #21497 I don't know if this can be tested with built-in tests.
2015-01-26falloutOliver Schneider-1/+1
2015-01-26Auto merge of #21605 - huonw:omg-muscle-memory, r=eddybbors-0/+10
I'm beginning to suspect it's impossible to avoid accidentally writing `#[deriving]` at least once in every program, and it results in non-intuitive error messages: "Foo doesn't have any method in scope `clone`" despite there being a `#[deriv...(Clone)]` attribute! Also, lots of documentation around the internet uses `#[deriving]` so providing this guidance is very helpful (lots of people ask in #rust about this error).
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-23/+30
Conflicts: src/libcore/cmp.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/result.rs src/libcore/str/mod.rs src/librustc/lint/builtin.rs src/librustc/lint/context.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/poison.rs
2015-01-26Adjust most comments and messages to not use "unboxed".Eduard Burtescu-1/+1
2015-01-26Remove every mention of "onceness".Eduard Burtescu-16/+0
2015-01-26Remove dead code related to old closures.Eduard Burtescu-94/+11
2015-01-26Remove "unboxed" attribute in code referring to new closures.Eduard Burtescu-32/+29
2015-01-25Auto merge of #21582 - FlaPer87:rollup, r=brsonbors-0/+2
- Successful merges: #21108, #21445, #21498, #21504, #21532, #21535, #21539, #21540, #21541, #21550, #21560, #21573, #21579 - Failed merges:
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-1422/+1028
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-24syntax: Don't put quotes around filenames in codemapAlex Crichton-7/+8
This ends up propagating all the way out to the output of dep-info which then makes Cargo think that files are not existent (it thinks the files have quotes in their name) when they in fact do.
2015-01-25Associated types support for deriving::generic::TraitDefDzmitry Malyshau-16/+55
2015-01-25Tell the compiler to tell us that `deriving` is dead.Huon Wilson-0/+10
I'm beginning to suspect it's impossible to avoid accidentally writing `#[deriving]` at least once in every program, and it results in non-intuitive error messages: "Foo doesn't have any method in scope `clone`" despite there being a `#[deriv...(Clone)]` attribute! Also, lots of documentation around the internet uses `#[deriving]` so providing this guidance is very helpful (lots of people ask in #rust about this error). Fixes #21166.
2015-01-24Auto merge of #21079 - huonw:chained-cmp-tweaks, r=pnkfelixbors-23/+28
First commit is mindless groundwork for the second one, to make the spans (arguably) nicer. ### before ``` require-parens-for-chained-comparison.rs:14:20: 14:22 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:14 false == false == false; ^~ require-parens-for-chained-comparison.rs:17:16: 17:17 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:17 false == 0 < 2; ^ require-parens-for-chained-comparison.rs:20:8: 20:9 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:20 f<X>(); ^ require-parens-for-chained-comparison.rs:20:8: 20:9 help: Use ::< instead of < if you meant to specify type arguments. require-parens-for-chained-comparison.rs:20 f<X>(); ^ ``` ### after ``` require-parens-for-chained-comparison.rs:14:11: 14:22 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:14 false == false == false; ^~~~~~~~~~~ require-parens-for-chained-comparison.rs:17:11: 17:17 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:17 false == 0 < 2; ^~~~~~ require-parens-for-chained-comparison.rs:20:6: 20:9 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:20 f<X>(); ^~~ require-parens-for-chained-comparison.rs:20:6: 20:9 help: use `::<...>` instead of `<...>` if you meant to specify type arguments require-parens-for-chained-comparison.rs:20 f<X>(); ^~~ ```
2015-01-25Tweak chained comparison errors.Huon Wilson-3/+4
Lower case and give a more precise span: from operator to operator, not just the last one.
2015-01-25Add the span of the operator itself to ast::BinOp.Huon Wilson-20/+24
2015-01-24Auto merge of #21542 - vadimcn:fix-exported-macro-paths, r=alexcrichtonbors-1/+10
... so that `super::foo` gets serialized as `super:: foo`, rather than `super :: foo`.
2015-01-24Rollup merge of #21504 - blackbeam:has_test_signature_fix, r=alexcrichtonFlavio Percoco Premoli-0/+2
Fix for `error: functions used as tests must have signature fn() -> ()` and `error: functions used as benches must have signature `fn(&mut Bencher) -> ()` in case of explicit return type declaration.
2015-01-23Fix tidy.Vadim Chugunov-1/+1
2015-01-23Deprecated attributes don't take 'feature' names and are paired with ↵Brian Anderson-28/+78
stable/unstable Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
2015-01-23Set unstable feature names appropriatelyBrian Anderson-2/+11
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-23Rephrase error message on invalid fragment specifiers in macros.Alexander Korolkov-6/+10
Also, print help on valid fragment specifiers.
2015-01-22Suppress space after idents with "ModName" style in serialization of ↵Vadim Chugunov-1/+10
exported macros. Fixes issue #20701
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+9
2015-01-22Make test harness use unstable APIs without allow(unstable)Brian Anderson-15/+79
2015-01-22Fix some grammar inconsistencies for the '..' range notation.Daniel Grunwald-19/+38
Grammar changes: * allow 'for _ in 1..i {}' (fixes #20241) * allow 'for _ in 1.. {}' as infinite loop * prevent use of range notation in contexts where only operators of high precedence are expected (fixes #20811) Parser code cleanup: * remove RESTRICTION_NO_DOTS * make AS_PREC const and follow naming convention * make min_prec inclusive