]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorollup merge of #19888: steveklabnik/gh19861
Alex Crichton [Tue, 6 Jan 2015 02:36:18 +0000 (18:36 -0800)]
rollup merge of #19888: steveklabnik/gh19861

Fixes #19861

/cc @huonw

9 years agorollup merge of #19736: steveklabnik/gh19662
Alex Crichton [Tue, 6 Jan 2015 02:36:17 +0000 (18:36 -0800)]
rollup merge of #19736: steveklabnik/gh19662

Fixes #19662.

9 years agorollup merge of #19235: bjz/reference
Alex Crichton [Tue, 6 Jan 2015 02:36:16 +0000 (18:36 -0800)]
rollup merge of #19235: bjz/reference

cc. @steveklabnik

9 years agoauto merge of #20578 : japaric/rust/no-more-bc, r=nmatsakis
bors [Mon, 5 Jan 2015 23:51:00 +0000 (23:51 +0000)]
auto merge of #20578 : japaric/rust/no-more-bc, r=nmatsakis

This PR removes boxed closures from the language, the closure type syntax (`let f: |int| -> bool = /* ... */`) has been obsoleted. Move all your uses of closures to the new unboxed closure system (i.e. `Fn*` traits).

[breaking-change] patterns

- `lef f = || {}`

This binding used to type check to a boxed closure. Now that boxed closures are gone, you need to annotate the "kind" of the unboxed closure, i.e. you need pick one of these: `|&:| {}`, `|&mut:| {}` or `|:| {}`.

In the (near) future we'll have closure "kind" inference, so the compiler will infer which `Fn*` trait to use based on how the closure is used. Once this inference machinery is in place, we'll be able to remove the kind annotation from most closures.

- `type Alias<'a> = |int|:'a -> bool`

Use a trait object: `type Alias<'a> = Box<FnMut(int) -> bool + 'a>`. Use the `Fn*` trait that makes sense for your use case.

- `fn foo(&self, f: |uint| -> bool)`

In this case you can use either a trait object or an unboxed closure:

``` rust
fn foo(&self, f: F) where F: FnMut(uint) -> bool;
// or
fn foo(&self, f: Box<FnMut(uint) -> bool>);
```

- `struct Struct<'a> { f: |uint|:'a -> bool }`

Again, you can use either a trait object or an unboxed closure:

``` rust
struct Struct<F> where F: FnMut(uint) -> bool { f: F }
// or
struct Struct<'a> { f: Box<FnMut(uint) -> bool + 'a> }
```

- Using `|x, y| f(x, y)` for closure "borrows"

This comes up in recursive functions, consider the following (contrived) example:

``` rust
fn foo(x: uint, f: |uint| -> bool) -> bool {
    //foo(x / 2, f) && f(x)  // can't use this because `f` gets moved away in the `foo` call
    foo(x / 2, |x| f(x)) && f(x)  // instead "borrow" `f` in the `foo` call
}
```

If you attempt to do the same with unboxed closures you'll hit ""error: reached the recursion limit during monomorphization" (see #19596):

``` rust
fn foo<F>(x: uint, mut f: F) -> bool where F: FnMut(uint) -> bool {
    foo(x / 2, |x| f(x)) && f(x)
    //~^ error: reached the recursion limit during monomorphization
}
```

Instead you *should* be able to write this:

``` rust
fn foo<F>(x: uint, mut f: F) -> bool where F: FnMut(uint) -> bool {
    foo(x / 2, &mut f) && f(x)
    //~^ error: the trait `FnMut` is not implemented for the type `&mut F`
}
```

But as you see above `&mut F` doesn't implement the `FnMut` trait. `&mut F` *should* implement the `FnMut` and the above code *should* work, but due to a bug (see #18835) it doesn't (for now).

You can work around the issue by rewriting the function to take `&mut F` instead of `F`:

``` rust
fn foo<F>(x: uint, f: &mut F) -> bool where F: FnMut(uint) -> bool {
    foo(x / 2, f) && (*f)(x)
}
```

This finally works! However writing `foo(0, &mut |x| x == 0)` is unergonomic. So you can use a private helper function to avoid this:

``` rust
// public API function
pub fn foo<F>(x: uint, mut f: F) -> bool where F: FnMut(uint) -> bool {
    foo_(x, &mut f)
}

// private helper function
fn foo_<F>(x: uint, f: &mut F) -> bool where F: FnMut(uint) -> bool {
    foo_(x / 2, f) && (*f)(x)
}
```

Closes #14798

---

There is more cleanup to do: like renaming functions/types from `unboxed_closure` to just `closure`, removing more dead code, simplify functions which now have unused arguments, update the documentation, etc. But that can be done in another PR.

r? @nikomatsakis @aturon (You probably want to focus on the deleted/modified tests.)
cc @eddyb

9 years agoremove more stage0 stuff
Jorge Aparicio [Mon, 5 Jan 2015 21:19:15 +0000 (16:19 -0500)]
remove more stage0 stuff

9 years agounignore and fix doctests in guide and reference
Jorge Aparicio [Mon, 5 Jan 2015 21:02:28 +0000 (16:02 -0500)]
unignore and fix doctests in guide and reference

9 years agofix tests
Jorge Aparicio [Mon, 5 Jan 2015 21:02:07 +0000 (16:02 -0500)]
fix tests

9 years agoreplace `f.call_mut(a, b, ..)` with `f(a, b, ..)`
Jorge Aparicio [Mon, 5 Jan 2015 19:07:10 +0000 (14:07 -0500)]
replace `f.call_mut(a, b, ..)` with `f(a, b, ..)`

9 years agoCorrectly "detuple" arguments when creating trait object shims for a trait method...
Niko Matsakis [Mon, 5 Jan 2015 18:53:39 +0000 (13:53 -0500)]
Correctly "detuple" arguments when creating trait object shims for a trait method with rust-call ABI.

9 years agoFix ICE caused by forgotten bcx
Niko Matsakis [Mon, 5 Jan 2015 16:06:20 +0000 (11:06 -0500)]
Fix ICE caused by forgotten bcx

9 years agoaddress Niko's comments
Jorge Aparicio [Mon, 5 Jan 2015 17:07:49 +0000 (12:07 -0500)]
address Niko's comments

9 years agoignore boxed closure doctests in the guide/reference
Jorge Aparicio [Mon, 5 Jan 2015 13:25:55 +0000 (08:25 -0500)]
ignore boxed closure doctests in the guide/reference

9 years agofix benchmarks
Jorge Aparicio [Mon, 5 Jan 2015 13:23:55 +0000 (08:23 -0500)]
fix benchmarks

9 years agofix debuginfo tests
Jorge Aparicio [Mon, 5 Jan 2015 13:23:17 +0000 (08:23 -0500)]
fix debuginfo tests

9 years agofix pretty tests
Jorge Aparicio [Mon, 5 Jan 2015 13:22:04 +0000 (08:22 -0500)]
fix pretty tests

9 years agofix run-make test
Jorge Aparicio [Mon, 5 Jan 2015 04:33:35 +0000 (23:33 -0500)]
fix run-make test

9 years agofix cfail tests
Jorge Aparicio [Sat, 3 Jan 2015 15:45:00 +0000 (10:45 -0500)]
fix cfail tests

9 years agofix rpass tests
Jorge Aparicio [Fri, 2 Jan 2015 22:32:54 +0000 (17:32 -0500)]
fix rpass tests

9 years agotypeck: remove dead code
Jorge Aparicio [Sun, 4 Jan 2015 15:53:03 +0000 (10:53 -0500)]
typeck: remove dead code

9 years agotrans: remove dead code
Jorge Aparicio [Sun, 4 Jan 2015 15:50:24 +0000 (10:50 -0500)]
trans: remove dead code

9 years agorustc: remove dead code
Jorge Aparicio [Sun, 4 Jan 2015 15:42:51 +0000 (10:42 -0500)]
rustc: remove dead code

9 years agosyntax: remove dead code
Jorge Aparicio [Sun, 4 Jan 2015 15:42:11 +0000 (10:42 -0500)]
syntax: remove dead code

9 years agotypeck: there are only unboxed closures now
Jorge Aparicio [Sun, 4 Jan 2015 15:39:03 +0000 (10:39 -0500)]
typeck: there are only unboxed closures now

9 years agosyntax: make the closure type `f: |uint| -> bool` syntax obsolete
Jorge Aparicio [Thu, 1 Jan 2015 22:21:25 +0000 (17:21 -0500)]
syntax: make the closure type `f: |uint| -> bool` syntax obsolete

9 years agotrans: remove Closure
Jorge Aparicio [Mon, 5 Jan 2015 00:27:20 +0000 (19:27 -0500)]
trans: remove Closure

9 years agoremove mk_closure
Jorge Aparicio [Sun, 4 Jan 2015 14:55:16 +0000 (09:55 -0500)]
remove mk_closure

9 years agoremove AdjustAddEnv
Jorge Aparicio [Sun, 4 Jan 2015 14:53:08 +0000 (09:53 -0500)]
remove AdjustAddEnv

9 years agoremove TyClosure
Jorge Aparicio [Sun, 4 Jan 2015 14:51:37 +0000 (09:51 -0500)]
remove TyClosure

9 years agoremove ty_closure
Jorge Aparicio [Sun, 4 Jan 2015 14:50:17 +0000 (09:50 -0500)]
remove ty_closure

9 years agocoretest: remove/ignore tests
Jorge Aparicio [Mon, 5 Jan 2015 04:34:23 +0000 (23:34 -0500)]
coretest: remove/ignore tests

9 years agocompiletest: remove boxed closures
Jorge Aparicio [Mon, 5 Jan 2015 03:05:29 +0000 (22:05 -0500)]
compiletest: remove boxed closures

9 years agodriver: remove unboxed closures
Jorge Aparicio [Mon, 5 Jan 2015 01:36:57 +0000 (20:36 -0500)]
driver: remove unboxed closures

9 years agotrans: remove remaining boxed closures
Jorge Aparicio [Sun, 4 Jan 2015 22:23:01 +0000 (17:23 -0500)]
trans: remove remaining boxed closures

9 years agotypeck: remove remaining boxed closures
Jorge Aparicio [Sun, 4 Jan 2015 22:22:50 +0000 (17:22 -0500)]
typeck: remove remaining boxed closures

9 years agorustc: remove remaining boxed closures
Jorge Aparicio [Sun, 4 Jan 2015 21:10:27 +0000 (16:10 -0500)]
rustc: remove remaining boxed closures

9 years agoEncodeInlinedItem: convert to "unboxed" closures
Jorge Aparicio [Sun, 4 Jan 2015 14:13:48 +0000 (09:13 -0500)]
EncodeInlinedItem: convert to "unboxed" closures

9 years agoDecodeInlinedItem: convert to "unboxed" closures
Jorge Aparicio [Sun, 4 Jan 2015 14:07:13 +0000 (09:07 -0500)]
DecodeInlinedItem: convert to "unboxed" closures

9 years agoconv_did: convert to "unboxed" closure
Jorge Aparicio [Sat, 3 Jan 2015 22:28:38 +0000 (17:28 -0500)]
conv_did: convert to "unboxed" closure

9 years agosyntax: remove remaining boxed closures
Jorge Aparicio [Thu, 1 Jan 2015 23:32:49 +0000 (18:32 -0500)]
syntax: remove remaining boxed closures

9 years agostd: remove remaining boxed closures
Jorge Aparicio [Thu, 1 Jan 2015 23:07:31 +0000 (18:07 -0500)]
std: remove remaining boxed closures

9 years agoregister snapshot
Jorge Aparicio [Mon, 5 Jan 2015 13:34:44 +0000 (08:34 -0500)]
register snapshot

9 years agoauto merge of #20572 : nikomatsakis/rust/assoc-supertrait-stuff, r=brson
bors [Mon, 5 Jan 2015 20:02:14 +0000 (20:02 +0000)]
auto merge of #20572 : nikomatsakis/rust/assoc-supertrait-stuff, r=brson

The first few commits in the PR are just general refactoring. I was intending them for some other code I didn't get around to writing yet, but might as well land them now.

cc @japaric

Fixes #19541

9 years agoAdd lifetime elision information to the ownership guide.
Steve Klabnik [Thu, 11 Dec 2014 16:37:20 +0000 (11:37 -0500)]
Add lifetime elision information to the ownership guide.

Fixes #19662.

9 years agoauto merge of #20514 : alexcrichton/rust/serialize-associated-type, r=aturon
bors [Mon, 5 Jan 2015 14:51:03 +0000 (14:51 +0000)]
auto merge of #20514 : alexcrichton/rust/serialize-associated-type, r=aturon

This commit moves the libserialize crate (and will force the hand of the
rustc-serialize crate) to not require the `old_orphan_check` feature gate as
well as using associated types wherever possible. Concretely, the following
changes were made:

* The error type of `Encoder` and `Decoder` is now an associated type, meaning
  that these traits have no type parameters.

* The `Encoder` and `Decoder` type parameters on the `Encodable` and `Decodable`
  traits have moved to the corresponding method of the trait. This movement
  alleviates the dependency on `old_orphan_check` but implies that
  implementations can no longer be specialized for the type of encoder/decoder
  being implemented.

Due to the trait definitions changing, this is a:

[breaking-change]

9 years agoImprove test to include a projection, per @huonw's suggestion.
Niko Matsakis [Mon, 5 Jan 2015 14:14:03 +0000 (09:14 -0500)]
Improve test to include a projection, per @huonw's suggestion.

9 years agoMake supertrait references work in object types too.
Niko Matsakis [Mon, 5 Jan 2015 11:08:03 +0000 (06:08 -0500)]
Make supertrait references work in object types too.

9 years agoMinor code formatting cleanups.
Niko Matsakis [Mon, 5 Jan 2015 10:37:11 +0000 (05:37 -0500)]
Minor code formatting cleanups.

9 years agoPermit bindings of (and references to) associated types defined in supertraits.
Niko Matsakis [Mon, 5 Jan 2015 10:36:41 +0000 (05:36 -0500)]
Permit bindings of (and references to) associated types defined in supertraits.

9 years agoIntroduce a CollectCtxt and impl AstConv on *that*. Also make all fns
Niko Matsakis [Mon, 5 Jan 2015 09:24:00 +0000 (04:24 -0500)]
Introduce a CollectCtxt and impl AstConv on *that*. Also make all fns
in collect private except the public entry point.

9 years agoStop writing code that is (unnecessarily) generic over any AstConv in collect,
Niko Matsakis [Sun, 4 Jan 2015 11:37:49 +0000 (06:37 -0500)]
Stop writing code that is (unnecessarily) generic over any AstConv in collect,
just hard-code the ccx.

9 years agoConvert astconv and friends to use object types, not generics. No need to compile
Niko Matsakis [Sun, 4 Jan 2015 11:10:34 +0000 (06:10 -0500)]
Convert astconv and friends to use object types, not generics. No need to compile
all that stuff twice. Also, code reads so much nicer.

9 years agoauto merge of #20451 : brson/rust/installer, r=alexcrichton
bors [Mon, 5 Jan 2015 11:10:57 +0000 (11:10 +0000)]
auto merge of #20451 : brson/rust/installer, r=alexcrichton

This fixes a mostly harmless syntax error in the install script.

9 years agoserialize: Use assoc types + less old_orphan_check
Alex Crichton [Sun, 4 Jan 2015 06:24:50 +0000 (22:24 -0800)]
serialize: Use assoc types + less old_orphan_check

This commit moves the libserialize crate (and will force the hand of the
rustc-serialize crate) to not require the `old_orphan_check` feature gate as
well as using associated types wherever possible. Concretely, the following
changes were made:

* The error type of `Encoder` and `Decoder` is now an associated type, meaning
  that these traits have no type parameters.

* The `Encoder` and `Decoder` type parameters on the `Encodable` and `Decodable`
  traits have moved to the corresponding method of the trait. This movement
  alleviates the dependency on `old_orphan_check` but implies that
  implementations can no longer be specialized for the type of encoder/decoder
  being implemented.

Due to the trait definitions changing, this is a:

[breaking-change]

9 years agoauto merge of #20395 : huonw/rust/char-stab-2, r=aturon
bors [Mon, 5 Jan 2015 06:45:39 +0000 (06:45 +0000)]
auto merge of #20395 : huonw/rust/char-stab-2, r=aturon

cc #19260

The casing transformations are left unstable (it is highly likely to be better to adopt the proper non-1-to-1 case mappings, per #20333) as are `is_xid_*`.

I've got a little todo list in the last commit of things I thought about/was told about that I haven't yet handled (I'd also like some feedback).

9 years agoauto merge of #20285 : FlaPer87/rust/oibit-send-and-friends, r=nikomatsakis
bors [Mon, 5 Jan 2015 04:20:46 +0000 (04:20 +0000)]
auto merge of #20285 : FlaPer87/rust/oibit-send-and-friends, r=nikomatsakis

This commit introduces the syntax for negative implementations of traits
as shown below:

`impl !Trait for Type {}`

cc #13231
Part of RFC rust-lang/rfcs#127

r? @nikomatsakis

9 years agochar: small tweak since `is_some` > equivalent `match`.
Huon Wilson [Sat, 3 Jan 2015 14:19:03 +0000 (01:19 +1100)]
char: small tweak since `is_some` > equivalent `match`.

9 years agoApply explicit stabilities to unicode parts of CharExt.
Huon Wilson [Tue, 30 Dec 2014 03:14:01 +0000 (14:14 +1100)]
Apply explicit stabilities to unicode parts of CharExt.

9 years agoMerge `UnicodeChar` and `CharExt`.
Huon Wilson [Tue, 30 Dec 2014 02:58:31 +0000 (13:58 +1100)]
Merge `UnicodeChar` and `CharExt`.

This "reexports" all the functionality of `core::char::CharExt` as
methods on `unicode::u_char::UnicodeChar` (renamed to `CharExt`).

Imports may need to be updated (one now just imports
`unicode::CharExt`, or `std::char::CharExt` rather than two traits from
either), so this is a

[breaking-change]

9 years agoRename `core::char::Char` to `CharExt` to match prelude guidelines.
Huon Wilson [Tue, 30 Dec 2014 02:53:20 +0000 (13:53 +1100)]
Rename `core::char::Char` to `CharExt` to match prelude guidelines.

Imports may need to be updated so this is a

[breaking-change]

9 years agoMark the contents of `char` stable.
Huon Wilson [Tue, 30 Dec 2014 02:36:24 +0000 (13:36 +1100)]
Mark the contents of `char` stable.

9 years agoSwitch encode_utf* to by-value self.
Huon Wilson [Tue, 30 Dec 2014 02:34:06 +0000 (13:34 +1100)]
Switch encode_utf* to by-value self.

9 years agoRemove deprecated functionality from `char`.
Huon Wilson [Tue, 30 Dec 2014 01:04:12 +0000 (12:04 +1100)]
Remove deprecated functionality from `char`.

9 years agoauto merge of #20163 : bfops/rust/master, r=Gankro
bors [Mon, 5 Jan 2015 00:26:28 +0000 (00:26 +0000)]
auto merge of #20163 : bfops/rust/master, r=Gankro

TODOs:
  - ~~Entry is still `<'a, K, V>` instead of `<'a, O, V>`~~
  - ~~BTreeMap is still outstanding~~.
  - ~~Transform appropriate things into `.entry(...).get().or_else(|e| ...)`~~

Things that make me frowny face:
  - I'm not happy about the fact that this `clone`s the key even when it's already owned.
  - With small keys (e.g. `int`s), taking a reference seems wasteful.

r? @Gankro
cc: @cgaebel

9 years agoPut negative trait implemtations behind a feature gate
Flavio Percoco [Mon, 29 Dec 2014 12:52:43 +0000 (13:52 +0100)]
Put negative trait implemtations behind a feature gate

9 years agoAdd syntax for negative implementations of traits
Flavio Percoco [Sun, 28 Dec 2014 22:33:18 +0000 (23:33 +0100)]
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

9 years agoMerge pull request #20520 from nhowell/patch-1
bors [Sun, 4 Jan 2015 21:36:41 +0000 (21:36 +0000)]
Merge pull request #20520 from nhowell/patch-1

doc: Add missing `$`s in the Installing Rust guide

Reviewed-by: steveklabnik, steveklabnik
9 years agoMerge pull request #20515 from tshepang/modernise-ping-pong-benchmark
bors [Sun, 4 Jan 2015 21:36:41 +0000 (21:36 +0000)]
Merge pull request #20515 from tshepang/modernise-ping-pong-benchmark

bench: remove warnings from rt-messaging-ping-pong.rs

Reviewed-by: alexcrichton
9 years agoMerge pull request #20512 from bjz/rustdoc
bors [Sun, 4 Jan 2015 21:36:40 +0000 (21:36 +0000)]
Merge pull request #20512 from bjz/rustdoc

Allow rustdoc to accept vector pattern arguments

Reviewed-by: alexcrichton, alexcrichton
9 years agoMerge pull request #20510 from tshepang/patch-6
bors [Sun, 4 Jan 2015 21:36:40 +0000 (21:36 +0000)]
Merge pull request #20510 from tshepang/patch-6

doc: remove incomplete sentence

Reviewed-by: steveklabnik, steveklabnik
9 years agoMerge pull request #20505 from estsauver/doc_20504
bors [Sun, 4 Jan 2015 21:36:39 +0000 (21:36 +0000)]
Merge pull request #20505 from estsauver/doc_20504

Update guide index to point to the task page

Reviewed-by: alexcrichton
9 years agoMerge pull request #20500 from globin/fix/range-sugar
bors [Sun, 4 Jan 2015 21:36:39 +0000 (21:36 +0000)]
Merge pull request #20500 from globin/fix/range-sugar

Fix range sugar

Reviewed-by: nick29581
9 years agoMerge pull request #20495 from brson/cargo
bors [Sun, 4 Jan 2015 21:36:38 +0000 (21:36 +0000)]
Merge pull request #20495 from brson/cargo

Update guide for Cargo installation

Reviewed-by: steveklabnik
9 years agoMerge pull request #20487 from trapp/doc-namespace-typo
bors [Sun, 4 Jan 2015 21:36:38 +0000 (21:36 +0000)]
Merge pull request #20487 from trapp/doc-namespace-typo

Fix typo in documentation.

Reviewed-by: alexcrichton
9 years agoMerge pull request #20485 from ipetkov/man-fix
bors [Sun, 4 Jan 2015 21:36:37 +0000 (21:36 +0000)]
Merge pull request #20485 from ipetkov/man-fix

Man page/--help dialog fix

Reviewed-by: alexcrichton
9 years agoMerge pull request #20464 from ranma42/improve-make-hash
bors [Sun, 4 Jan 2015 21:36:36 +0000 (21:36 +0000)]
Merge pull request #20464 from ranma42/improve-make-hash

Improve `make_hash` function

Reviewed-by: Gankro, Gankro
9 years agoMerge pull request #20457 from frewsxcv/rm-reexports
bors [Sun, 4 Jan 2015 21:36:36 +0000 (21:36 +0000)]
Merge pull request #20457 from frewsxcv/rm-reexports

Remove graphviz::LabelText::* public reexport

Reviewed-by: cmr
9 years agoMerge pull request #20452 from brson/rustup
bors [Sun, 4 Jan 2015 21:36:35 +0000 (21:36 +0000)]
Merge pull request #20452 from brson/rustup

Move rustup to the combined installer

Reviewed-by: brson
9 years agoMerge pull request #20449 from brson/contributing
bors [Sun, 4 Jan 2015 21:36:35 +0000 (21:36 +0000)]
Merge pull request #20449 from brson/contributing

Put links to discuss.rust-lang.org and #rust-internals in CONTRIBUTING.m...

Reviewed-by: cmr
9 years agoMerge pull request #20442 from csouth3/vim-syntax
bors [Sun, 4 Jan 2015 21:36:34 +0000 (21:36 +0000)]
Merge pull request #20442 from csouth3/vim-syntax

Fix vim syntax highlighting for `derive`

Reviewed-by: alexcrichton
9 years agoMerge pull request #20428 from tbu-/pr_guide_int_to_i32_2nd_take
bors [Sun, 4 Jan 2015 21:36:34 +0000 (21:36 +0000)]
Merge pull request #20428 from tbu-/pr_guide_int_to_i32_2nd_take

Make all integers in the guide `i32`, implicitely

Reviewed-by: steveklabnik
9 years agoMerge pull request #19963 from tshepang/patch-3
bors [Sun, 4 Jan 2015 21:36:33 +0000 (21:36 +0000)]
Merge pull request #19963 from tshepang/patch-3

doc: mailing list is deprecated

Reviewed-by: brson
9 years agoMerge pull request #20295 from eddyb/poly-const
bors [Sun, 4 Jan 2015 21:36:33 +0000 (21:36 +0000)]
Merge pull request #20295 from eddyb/poly-const

Allow paths in constants to refer to polymorphic items.

Reviewed-by: nikomatsakis
9 years ago[breaking change] Update entry API as part of RFC 509.
Ben Foppa [Sun, 4 Jan 2015 19:07:32 +0000 (14:07 -0500)]
[breaking change] Update entry API as part of RFC 509.

9 years agoauto merge of #20527 : nikomatsakis/rust/japaric-boxed-uc-ice-fix, r=aturon
bors [Sun, 4 Jan 2015 19:06:46 +0000 (19:06 +0000)]
auto merge of #20527 : nikomatsakis/rust/japaric-boxed-uc-ice-fix, r=aturon

This fixes an ICE that japaric was encountering in the wf checker.

r? @aturon

9 years agoConvert the TODO into a FIXME.
Niko Matsakis [Sun, 4 Jan 2015 17:00:13 +0000 (12:00 -0500)]
Convert the TODO into a FIXME.

9 years agoFix ICE in WF checker when we encounter bound regions in object types.
Niko Matsakis [Sun, 4 Jan 2015 11:07:36 +0000 (06:07 -0500)]
Fix ICE in WF checker when we encounter bound regions in object types.

9 years agorustc: allow paths in constants to refer to polymorphic items.
Eduard Burtescu [Sun, 4 Jan 2015 16:47:58 +0000 (18:47 +0200)]
rustc: allow paths in constants to refer to polymorphic items.

9 years agoauto merge of #20443 : nikomatsakis/rust/autoderef-overloaded-calls, r=pcwalton
bors [Sun, 4 Jan 2015 16:36:41 +0000 (16:36 +0000)]
auto merge of #20443 : nikomatsakis/rust/autoderef-overloaded-calls, r=pcwalton

Use autoderef for call notation. This is consistent in that we now autoderef all postfix operators (`.`, `[]`, and `()`). It also means you can call closures without writing `(*f)()`. Note that this is rebased atop the rollup, so only the final commit is relevant.

r? @pcwalton

9 years agorustc: check_const: avoid recursing into a block's tail expression twice.
Eduard Burtescu [Sat, 27 Dec 2014 21:54:53 +0000 (23:54 +0200)]
rustc: check_const: avoid recursing into a block's tail expression twice.

9 years agorustc: check_const: cleanup/simplify the code.
Eduard Burtescu [Sun, 4 Jan 2015 15:58:56 +0000 (17:58 +0200)]
rustc: check_const: cleanup/simplify the code.

9 years agorustc: check_const: remove ~str support in patterns.
Eduard Burtescu [Sun, 7 Dec 2014 03:55:37 +0000 (05:55 +0200)]
rustc: check_const: remove ~str support in patterns.

9 years agodoc: Add missing `$`s in the Installing Rust guide
Nick Howell [Sun, 4 Jan 2015 15:23:00 +0000 (10:23 -0500)]
doc: Add missing `$`s in the Installing Rust guide

9 years agoauto merge of #20437 : ranma42/rust/fix-make-install, r=alexcrichton
bors [Sun, 4 Jan 2015 14:21:08 +0000 (14:21 +0000)]
auto merge of #20437 : ranma42/rust/fix-make-install, r=alexcrichton

After 8b3c67690c4747b9fadfef407e6261524fb03f8a the `make install`
command fails if docs are not disabled through CFG_DISABLE_DOCS,
because now the `install` target uses
../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh

Instead of explicitly depending on
dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz, the `prepare_[un]install`
targets now depend on `dist-tar-bins`, which packages the appropriate
dist archives depending on the configuration.

9 years agofix range sugar
Robin Gloster [Sun, 4 Jan 2015 02:40:50 +0000 (03:40 +0100)]
fix range sugar

9 years agoauto merge of #20393 : japaric/rust/impl-any, r=aturon
bors [Sun, 4 Jan 2015 11:01:04 +0000 (11:01 +0000)]
auto merge of #20393 : japaric/rust/impl-any, r=aturon

Needs a snapshot that contains PR #20385

r? @aturon

9 years agobench: remove warnings from rt-messaging-ping-pong.rs
Tshepang Lekhonkhobe [Sun, 4 Jan 2015 09:45:22 +0000 (11:45 +0200)]
bench: remove warnings from rt-messaging-ping-pong.rs

9 years agoauto merge of #20462 : alexcrichton/rust/remove-deprecated, r=aturon
bors [Sun, 4 Jan 2015 07:51:06 +0000 (07:51 +0000)]
auto merge of #20462 : alexcrichton/rust/remove-deprecated, r=aturon

This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.

9 years agoRemove deprecated functionality
Alex Crichton [Fri, 2 Jan 2015 07:53:35 +0000 (23:53 -0800)]
Remove deprecated functionality

This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.

9 years agoAllow rustdoc to accept vector pattern arguments
Brendan Zabarauskas [Sun, 4 Jan 2015 06:52:08 +0000 (17:52 +1100)]
Allow rustdoc to accept vector pattern arguments

9 years agodoc: remove incomplete sentence
Tshepang Lekhonkhobe [Sun, 4 Jan 2015 06:44:31 +0000 (08:44 +0200)]
doc: remove incomplete sentence