Jorge Aparicio
39f44c0c20
libsyntax: remove unnecessary as_slice()
calls
2014-12-06 23:53:01 -05:00
Corey Richardson
13befdff91
rollup merge of #19492 : steveklabnik/remove_outdated_comment
...
https://github.com/rust-lang/rust/pull/19472#issuecomment-65370278
/cc @alexcrichton
2014-12-05 10:07:34 -08:00
Corey Richardson
6f173cdba6
rollup merge of #19472 : nick29581/iflet
...
Closes #19469
r?
2014-12-05 10:07:10 -08:00
Nick Cameron
c200ae5a8a
Remove feature gates for if let
, while let
, and tuple indexing
...
Closes #19469
2014-12-03 09:45:08 -08:00
Jorge Aparicio
b32b24d13a
Replace equiv
method calls with ==
operator sugar
2014-12-03 10:41:48 -05:00
Steve Klabnik
861e11ceeb
Remove outdated comment.
...
https://github.com/rust-lang/rust/pull/19472#issuecomment-65370278
2014-12-03 03:29:57 -05:00
jfager
232ffa039d
Replace some verbose match statements with their if let
equivalent.
...
No semantic changes, no enabling `if let` where it wasn't already enabled.
2014-11-29 16:41:21 -05:00
bors
1d81776209
auto merge of #19113 : nikomatsakis/rust/unboxed-boxed-closure-unification, r=acrichto
...
Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind).
This supercedes PR #19089 , which was already reviewed by @pcwalton.
2014-11-20 12:01:44 +00:00
Niko Matsakis
3e2929d362
Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an optional unboxed closure kind.
2014-11-19 13:35:20 -05:00
Jakub Bukaj
bde225e2fa
Feature gate non-ASCII lifetime identifiers
...
Fixes #19069 .
2014-11-18 23:07:14 +01:00
Niko Matsakis
56ba260749
Update test for equivalency to include region binders in object types, add new tests relating to HRTB, consolidate the unboxed_closures
and overloaded_calls
feature gates.
2014-11-18 12:32:38 -05:00
Niko Matsakis
058abcc209
Place parenthetical notation under the unboxed_closure
feature-gate.
...
Consolidate the `unboxed_closure_sugar` and `unboxed_closure` feature gates.
2014-11-18 12:26:04 -05:00
Jakub Bukaj
fcf9fb6157
rollup merge of #18890 : luqmana/tf
...
This is especially useful for declaring a static with external linkage in an executable. There isn't any way to do that currently since we mark everything in an executable as internal by default.
Also, a quick fix to have the no-compiler-rt target option respected when building staticlibs as well.
2014-11-18 00:23:50 +01: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
Steven Fackler
579c65da1b
Un-feature gate struct variants
...
Struct variant field visibility is now inherited. Remove `pub` keywords
from declarations.
Closes #18641
[breaking-change]
2014-11-15 18:15:27 -08:00
Luqman Aden
27ea11eda8
librustc: Allow linkage attribute on any statics, not just foreign statics.
2014-11-11 20:24:17 -05:00
Niko Matsakis
091dc6e98a
Purge the old once_fns
, which are not coming back
2014-11-07 15:51:30 -05:00
Niko Matsakis
d0fa4c6239
Remove the unboxed closure |:|
notation from types and trait references completely.
2014-11-06 06:48:24 -05:00
Alex Crichton
eb793616dc
rollup merge of #18506 : nikomatsakis/assoc-type-bounds
2014-11-03 15:55:58 -08:00
Alex Crichton
59d47a3ca4
rollup merge of #18132 : P1start/more-help
2014-11-03 15:28:54 -08:00
Niko Matsakis
319d778ed3
Restructure AST so that the associated type definition carries
...
bounds like any other "type parameter".
2014-11-03 17:41:00 -05:00
Jakub Bukaj
c77a313570
Mark the struct_inherit
feature as removed
2014-11-02 18:40:30 +01:00
P1start
5bf9ef2122
Convert some notes to help messages
...
Closes #18126 .
2014-11-02 16:12:23 +13:00
bors
c7e0724274
auto merge of #17733 : jgallagher/rust/while-let, r=alexcrichton
...
This is *heavily* based on `if let` (#17634 ) by @jakub- and @kballard
This should close #17687
2014-10-13 19:37:40 +00:00
Jakub Wieczorek
403cd40e6a
Remove virtual
structs from the language
2014-10-11 19:42:26 +02:00
John Gallagher
660cf18070
Move while let
behind while_let
feature gate
2014-10-10 20:30:32 -04:00
Nick Cameron
2d3823441f
Put slicing syntax behind a feature gate.
...
[breaking-change]
If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07 15:49:53 +13:00
bors
9a2286d3a1
auto merge of #16995 : kmcallister/rust/plugin-tutorial, r=alexcrichton
...
@steveklabnik, are you interested in looking this over?
2014-10-03 07:33:26 +00:00
Alex Crichton
7ae802f57b
rollup merge of #17666 : eddyb/take-garbage-out
...
Conflicts:
src/libcollections/lib.rs
src/libcore/lib.rs
src/librustdoc/lib.rs
src/librustrt/lib.rs
src/libserialize/lib.rs
src/libstd/lib.rs
src/test/run-pass/issue-8898.rs
2014-10-02 14:53:18 -07:00
Aaron Turon
7bf56df4c8
Revert "Put slicing syntax behind a feature gate."
...
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02 11:47:51 -07:00
Eduard Burtescu
db55e70c97
syntax: mark the managed_boxes feature as Removed.
2014-10-02 17:02:03 +03:00
Eduard Burtescu
d1a57e479c
syntax: ast: remove TyBox and UnBox.
2014-10-02 16:36:01 +03:00
Nick Cameron
95cfc35607
Put slicing syntax behind a feature gate.
...
[breaking-change]
If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02 13:23:36 +13:00
Keegan McAllister
dfcfd008fa
Update some old references to rust.md
2014-10-01 13:21:52 -07:00
Kevin Ballard
13e00e4a3d
Update based on PR feedback
2014-09-30 18:54:03 +02:00
Kevin Ballard
8a60952100
Move if let
behind a feature gate
2014-09-30 18:54:03 +02:00
Keegan McAllister
fc1b908322
Hide the quote_*! macros when the feature gate is off
...
This makes it easier to experiment with improved quasiquoting as an ordinary
plugin library.
The list of quote macros in feature_gate.rs was already out of sync;
this commit also prevents that problem in the future.
2014-09-26 17:17:14 -07:00
Patrick Walton
e9ad12c0ca
librustc: Forbid private types in public APIs.
...
This breaks code like:
struct Foo {
...
}
pub fn make_foo() -> Foo {
...
}
Change this code to:
pub struct Foo { // note `pub`
...
}
pub fn make_foo() -> Foo {
...
}
The `visible_private_types` lint has been removed, since it is now an
error to attempt to expose a private type in a public API. In its place
a `#[feature(visible_private_types)]` gate has been added.
Closes #16463 .
RFC #48 .
[breaking-change]
2014-09-22 20:05:45 -07:00
Patrick Walton
78a841810e
librustc: Implement associated types behind a feature gate.
...
The implementation essentially desugars during type collection and AST
type conversion time into the parameter scheme we have now. Only fully
qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-17 16:38:57 -07:00
Nick Cameron
74db87b99d
move feature_gate to libsyntax
2014-09-17 16:53:20 +12:00