]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorollup merge of #19038: jayelm/fixed-typos
Jakub Bukaj [Mon, 17 Nov 2014 23:24:08 +0000 (00:24 +0100)]
rollup merge of #19038: jayelm/fixed-typos

Baby steps here...

Fixed some comments in liblog, libregex, librustc, libstd.

9 years agorollup merge of #19029: vberger/stability_function_body
Jakub Bukaj [Mon, 17 Nov 2014 23:24:07 +0000 (00:24 +0100)]
rollup merge of #19029: vberger/stability_function_body

Items defined in the body of a function has no visibility outside it, and thus have no reason to inherit its stability.

Closes #17488

9 years agorollup merge of #19026: alfie/doc-fixes
Jakub Bukaj [Mon, 17 Nov 2014 23:24:06 +0000 (00:24 +0100)]
rollup merge of #19026: alfie/doc-fixes

Updated all the adjacent character literals in the BCNF that cannot have an optional space between them

9 years agorollup merge of #19020: Gankro/better-warn
Jakub Bukaj [Mon, 17 Nov 2014 23:24:05 +0000 (00:24 +0100)]
rollup merge of #19020: Gankro/better-warn

Came up on IRC that this was a bit unhelpful as to what should actually be *done*. I am new to changing compiler messages, please let me know if there's anything else that needs to be done to accomadate this change.

(My build system is still constantly crashing [Is bors contagious?], so this hasn't been formally `check`ed. I figure it's a simple enough change that any consequences [like compile-fail expected messages?] can be eyeballed by someone more experienced.)

9 years agorollup merge of #19018: tomjakubowski/fix-issue-19003
Jakub Bukaj [Mon, 17 Nov 2014 23:24:04 +0000 (00:24 +0100)]
rollup merge of #19018: tomjakubowski/fix-issue-19003

Make struct variant syntax more consistent with struct syntax and fix an
assert in middle::typeck.

Fix #19003

9 years agorollup merge of #19016: gkoz/use_util_copy
Jakub Bukaj [Mon, 17 Nov 2014 23:24:03 +0000 (00:24 +0100)]
rollup merge of #19016: gkoz/use_util_copy

This code is identical to io::util::copy()

9 years agorollup merge of #19015: alex/libcore-typos
Jakub Bukaj [Mon, 17 Nov 2014 23:24:02 +0000 (00:24 +0100)]
rollup merge of #19015: alex/libcore-typos

9 years agorollup merge of #19013: jakub-/issue-18986
Jakub Bukaj [Mon, 17 Nov 2014 23:24:01 +0000 (00:24 +0100)]
rollup merge of #19013: jakub-/issue-18986

Fixes #18986.

9 years agorollup merge of #19008: alex/collections-typos
Jakub Bukaj [Mon, 17 Nov 2014 23:24:00 +0000 (00:24 +0100)]
rollup merge of #19008: alex/collections-typos

9 years agorollup merge of #19000: IvanUkhov/doc-link-dylib
Jakub Bukaj [Mon, 17 Nov 2014 23:23:59 +0000 (00:23 +0100)]
rollup merge of #19000: IvanUkhov/doc-link-dylib

Hello,

`dylib` [seems][1] to be no longer an option for the `kind` key of the `link` attribute.

UPDATE: It should be the other way around: It [seems][1] `dylib` has been lost as a possible variant of the `kind` key of the `link` attribute. See the comment below.

Regards,
Ivan

[1]: https://github.com/rust-lang/rust/blob/8f8753878644b0bfb38d24781edb9ef2028730f2/src/librustc/metadata/creader.rs#L237

9 years agorollup merge of #18951: tbu-/pr_array_cloneshow
Jakub Bukaj [Mon, 17 Nov 2014 23:23:58 +0000 (00:23 +0100)]
rollup merge of #18951: tbu-/pr_array_cloneshow

Due to not being able to parametrize over array sizes, `Clone` is only
implemented for element types that are `Copy`able.

9 years agorollup merge of #18921: oli-obk/refactoring/graphviz/id/new/result_instead_of_fail
Jakub Bukaj [Mon, 17 Nov 2014 23:23:57 +0000 (00:23 +0100)]
rollup merge of #18921: oli-obk/refactoring/graphviz/id/new/result_instead_of_fail

creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.

9 years agorollup merge of #18911: canndrew/slice_shift_char
Jakub Bukaj [Mon, 17 Nov 2014 23:23:55 +0000 (00:23 +0100)]
rollup merge of #18911: canndrew/slice_shift_char

`slice_shift_char` splits a `str` into it's leading `char` and the remainder of the `str`. Currently, it returns a `(Option<char>, &str)` such that:

    "bar".slice_shift_char() => (Some('b'), "ar")
    "ar".slice_shift_char()  => (Some('a'), "r")
    "r".slice_shift_char()   => (Some('r'), "")
    "".slice_shift_char()    => (None,      "")

This is a little odd. Either a `str` can be split into both a head and a tail or it cannot. So the return type should be `Option<(char, &str)>`. With the current behaviour, in the case of the empty string, the `str` returned is meaningless - it is always the empty string.

This PR changes `slice_shift_char` so that:

    "bar".slice_shift_char() => Some(('b', "ar"))
    "ar".slice_shift_char()  => Some(('a', "r"))
    "r".slice_shift_char()   => Some(('r', ""))
    "".slice_shift_char()    => None

9 years agorollup merge of #18910: aturon/borrow-traits
Jakub Bukaj [Mon, 17 Nov 2014 23:23:53 +0000 (00:23 +0100)]
rollup merge of #18910: aturon/borrow-traits

Following [the collections reform RFC](https://github.com/rust-lang/rfcs/pull/235), this PR:

* Adds a new `borrow` module to libcore. The module contains traits for borrowing data (`BorrowFrom` and `BorrowFromMut`), generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`).

* Deprecates the `_equiv` family of methods on `HashMap` and `HashSet` by instead generalizing the "normal" methods like `get` and `remove` to use the new `std::borrow` infrastructure.

* Generalizes `TreeMap`, `TreeSet`, `BTreeMap` and `BTreeSet` to use the new `std::borrow` infrastructure for lookups.

[breaking-change]

9 years agorollup merge of #18890: luqmana/tf
Jakub Bukaj [Mon, 17 Nov 2014 23:23:50 +0000 (00:23 +0100)]
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.

9 years agoFix an ICE when using struct patterns with traits
Jakub Bukaj [Sun, 16 Nov 2014 19:55:17 +0000 (20:55 +0100)]
Fix an ICE when using struct patterns with traits

Fixes #18986.

9 years agolibrustc: Whitelist linkage attribute for unused attribute lint since it's processed...
Luqman Aden [Wed, 12 Nov 2014 02:46:45 +0000 (21:46 -0500)]
librustc: Whitelist linkage attribute for unused attribute lint since it's processed during trans.

9 years agoAdd tests.
Luqman Aden [Wed, 12 Nov 2014 02:34:18 +0000 (21:34 -0500)]
Add tests.

9 years agoFix several typos in comments
jmu303 [Mon, 17 Nov 2014 19:41:47 +0000 (14:41 -0500)]
Fix several typos in comments

liblog, libregex, librustc, libstd

9 years agoRemove bogus Duration::span test
Aaron Turon [Mon, 17 Nov 2014 07:49:13 +0000 (23:49 -0800)]
Remove bogus Duration::span test

9 years agoFurther DSTify Index traits
Aaron Turon [Mon, 17 Nov 2014 03:44:19 +0000 (19:44 -0800)]
Further DSTify Index traits

9 years agolibcollections: generalize BTree* to use BorrowFrom
Aaron Turon [Thu, 13 Nov 2014 23:51:08 +0000 (15:51 -0800)]
libcollections: generalize BTree* to use BorrowFrom

Generalizes the BTree-based collections to use the new BorrowFrom
infrastructure for more flexible lookups and removals.

9 years agoFallout from deprecation
Aaron Turon [Wed, 12 Nov 2014 23:51:51 +0000 (15:51 -0800)]
Fallout from deprecation

This commit handles the fallout from deprecating `_with` and `_equiv` methods.

9 years agolibstd: Deprecate _equiv methods
Aaron Turon [Wed, 12 Nov 2014 22:55:51 +0000 (14:55 -0800)]
libstd: Deprecate _equiv methods

This commit deprecates the `_equiv` family of methods on `HashMap` and
`HashSet` by instead generalizing the "normal" methods like `get` and
`remove` to use the new `std::borrow` infrastructure.

[breaking-change]

9 years agolibcollections: use BorrowFrom in TreeSet, Map
Aaron Turon [Wed, 12 Nov 2014 22:55:44 +0000 (14:55 -0800)]
libcollections: use BorrowFrom in TreeSet, Map

This commit generalizes methods like `get` and `remove` for `TreeMap`
and `TreeSet` to use the new `std::borrow` infrastructure.

[breaking-change]

9 years agolibcore: add borrow module
Aaron Turon [Wed, 12 Nov 2014 20:01:26 +0000 (12:01 -0800)]
libcore: add borrow module

Following [the collections reform
RFC](https://github.com/rust-lang/rfcs/pull/235),
this commit adds a new `borrow` module to libcore.

The module contains traits for borrowing data (`BorrowFrom` and
`BorrowFromMut`),
generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`).

9 years agoauto merge of #18973 : sfackler/rust/enum-namespace-pt2, r=pcwalton
bors [Mon, 17 Nov 2014 17:22:06 +0000 (17:22 +0000)]
auto merge of #18973 : sfackler/rust/enum-namespace-pt2, r=pcwalton

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]

9 years agoReturn proper errors with update_err
Gleb Kozyrev [Mon, 17 Nov 2014 17:17:39 +0000 (19:17 +0200)]
Return proper errors with update_err

9 years agoRemove duplicate code by using util::copy()
Gleb Kozyrev [Mon, 17 Nov 2014 00:07:23 +0000 (02:07 +0200)]
Remove duplicate code by using util::copy()

9 years agoDon't inherit stability to items in a function body.
Victor Berger [Mon, 17 Nov 2014 10:37:07 +0000 (11:37 +0100)]
Don't inherit stability to items in a function body.

Items defined in the body of a function has no visibility
outside it, and thus have no reason to be marked with
stability attributes.

Closes #17488

9 years agoBring back the dylib kind of the link attribute
Ivan Ukhov [Mon, 17 Nov 2014 17:00:30 +0000 (18:00 +0100)]
Bring back the dylib kind of the link attribute

9 years agoSwitch to purely namespaced enums
Steven Fackler [Thu, 6 Nov 2014 08:05:53 +0000 (00:05 -0800)]
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]

9 years agoauto merge of #19007 : huonw/rust/more-marker-impls, r=alexcrichton
bors [Mon, 17 Nov 2014 14:22:03 +0000 (14:22 +0000)]
auto merge of #19007 : huonw/rust/more-marker-impls, r=alexcrichton

Useful for #[deriving].

9 years agolibgraphviz: Id::new returns Result<Id, ()> instead of panicking on error
oli-obk [Wed, 12 Nov 2014 15:21:03 +0000 (16:21 +0100)]
libgraphviz: Id::new returns Result<Id, ()> instead of panicking on error

creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.

9 years agoauto merge of #19027 : nick29581/rust/coercions-4, r=alexcrichton
bors [Mon, 17 Nov 2014 11:22:00 +0000 (11:22 +0000)]
auto merge of #19027 : nick29581/rust/coercions-4, r=alexcrichton

The forwards compatible parts of #18645, rebased. Converts implicit coercions from `[T, ..n]` to `&[T]` into explicit references.

9 years agoFix fallout from coercion removal
Nick Cameron [Mon, 17 Nov 2014 08:39:01 +0000 (21:39 +1300)]
Fix fallout from coercion removal

9 years agochange return type of slice_shift_char
Andrew Cann [Mon, 17 Nov 2014 09:35:18 +0000 (17:35 +0800)]
change return type of slice_shift_char

`slice_shift_char` splits a `str` into it's leading `char` and the remainder
of the `str`. Currently, it returns a `(Option<char>, &str)` such that:

    "bar".slice_shift_char() => (Some('b'), "ar")
    "ar".slice_shift_char()  => (Some('a'), "r")
    "r".slice_shift_char()   => (Some('r'), "")
    "".slice_shift_char()    => (None,      "")

This is a little odd. Either a `str` can be split into both a head and a
tail or it cannot. So the return type should be `Option<(char, &str)>`.
With the current behaviour, in the case of the empty string, the `str`
returned is meaningless - it is always the empty string.

This commit changes slice_shift_char so that:

    "bar".slice_shift_char() => Some(('b', "ar"))
    "ar".slice_shift_char()  => Some(('a', "r"))
    "r".slice_shift_char()   => Some(('r', ""))
    "".slice_shift_char()    => None

[breaking-change]

9 years agoauto merge of #18914 : Gankro/rust/cloned, r=aturon
bors [Mon, 17 Nov 2014 09:26:57 +0000 (09:26 +0000)]
auto merge of #18914 : Gankro/rust/cloned, r=aturon

Part of #18424. r? @aturon

[breaking-change]

9 years agoslightly better deprecation message for fn syntax
Alexis Beingessner [Mon, 17 Nov 2014 04:01:37 +0000 (23:01 -0500)]
slightly better deprecation message for fn syntax

9 years agodoc: extend a893397 to make whole document consistent
Alfie John [Mon, 17 Nov 2014 05:15:24 +0000 (05:15 +0000)]
doc: extend a893397 to make whole document consistent

9 years agoDisallow parsing of struct variants with 0 fields
Tom Jakubowski [Mon, 17 Nov 2014 02:13:21 +0000 (18:13 -0800)]
Disallow parsing of struct variants with 0 fields

Make struct variant syntax more consistent with struct syntax and fix an
assert in middle::typeck.

Fix #19003

9 years agoauto merge of #18927 : areski/rust/pr-improve-option-match-readl, r=jakub-
bors [Mon, 17 Nov 2014 02:56:55 +0000 (02:56 +0000)]
auto merge of #18927 : areski/rust/pr-improve-option-match-readl, r=jakub-

**match** are much more easy to read when it's not in 1 single line

9 years agoFixed a few typos in libcore
Alex Gaynor [Mon, 17 Nov 2014 00:51:22 +0000 (16:51 -0800)]
Fixed a few typos in libcore

9 years agoauto merge of #18747 : csherratt/rust/ringbuf-remove-option, r=huonw
bors [Sun, 16 Nov 2014 22:36:50 +0000 (22:36 +0000)]
auto merge of #18747 : csherratt/rust/ringbuf-remove-option, r=huonw

Fix for task in Metabug #18009 (Rebased version of https://github.com/rust-lang/rust/pull/18170)

This changes much of about how RingBuf functions. `lo`, `nelts` are replaced by a more traditional `head` and`tail`. The `Vec<Option<T>>` is replaced by a bare pointer that is managed by the `RingBuf` itself. This also expects the ring buffer to always be size that is a power of 2.

This change also includes a number of new tests to cover the some areas that could be of concern with manual memory management.

The benchmarks have been reworked since the old ones were benchmarking of the Ring buffers growth rather then the actual test.

The unit test suite have been expanded, and exposed some bugs in `fn get()` and `fn get_mut()`

## Benchmark
**Before:**
```
test ring_buf::tests::bench_grow_1025                      ... bench:      8919 ns/iter (+/- 87)
test ring_buf::tests::bench_iter_1000                      ... bench:       924 ns/iter (+/- 28)
test ring_buf::tests::bench_mut_iter_1000                  ... bench:       918 ns/iter (+/- 6)
test ring_buf::tests::bench_new                            ... bench:        15 ns/iter (+/- 0)
test ring_buf::tests::bench_pop_100                        ... bench:       294 ns/iter (+/- 9)
test ring_buf::tests::bench_pop_front_100                  ... bench:       948 ns/iter (+/- 32)
test ring_buf::tests::bench_push_back_100                  ... bench:       291 ns/iter (+/- 16)
test ring_buf::tests::bench_push_front_100                 ... bench:       311 ns/iter (+/- 27
```
**After:**
```
test ring_buf::tests::bench_grow_1025                      ... bench:      2209 ns/iter (+/- 169)
test ring_buf::tests::bench_iter_1000                      ... bench:       534 ns/iter (+/- 27)
test ring_buf::tests::bench_mut_iter_1000                  ... bench:       515 ns/iter (+/- 28)
test ring_buf::tests::bench_new                            ... bench:        11 ns/iter (+/- 0)
test ring_buf::tests::bench_pop_100                        ... bench:       170 ns/iter (+/- 5)
test ring_buf::tests::bench_pop_front_100                  ... bench:       171 ns/iter (+/- 11)
test ring_buf::tests::bench_push_back_100                  ... bench:       172 ns/iter (+/- 13)
test ring_buf::tests::bench_push_front_100                 ... bench:       158 ns/iter (+/- 12)

```

9 years agoImplement more basic traits for the marker types.
Huon Wilson [Sun, 16 Nov 2014 13:00:22 +0000 (00:00 +1100)]
Implement more basic traits for the marker types.

9 years agoauto merge of #18995 : alfie/rust/comment-docs, r=aturon
bors [Sun, 16 Nov 2014 20:32:12 +0000 (20:32 +0000)]
auto merge of #18995 : alfie/rust/comment-docs, r=aturon

Start comment is a string literal while end comment is made up of two character literals. This change is to make them consistent.

9 years agoauto merge of #18994 : sfackler/rust/struct-variants-pt2, r=jakub-
bors [Sun, 16 Nov 2014 18:27:10 +0000 (18:27 +0000)]
auto merge of #18994 : sfackler/rust/struct-variants-pt2, r=jakub-

Struct variant field visibility is now inherited. Remove `pub` keywords
from declarations.

Closes #18641

[breaking-change]

r? @alexcrichton

9 years agoFixed several typos in libcollections
Alex Gaynor [Sun, 16 Nov 2014 16:28:13 +0000 (08:28 -0800)]
Fixed several typos in libcollections

9 years agofallout from deprecating find_copy and get_copy
Alexis Beingessner [Fri, 7 Nov 2014 19:35:18 +0000 (14:35 -0500)]
fallout from deprecating find_copy and get_copy

9 years agoDeprecate hashmap's find_copy and get_copy in favour of cloned and clone
Alexis Beingessner [Fri, 7 Nov 2014 19:06:18 +0000 (14:06 -0500)]
Deprecate hashmap's find_copy and get_copy in favour of cloned and clone

9 years agoimplement cloned for Option
Alexis Beingessner [Fri, 7 Nov 2014 19:05:50 +0000 (14:05 -0500)]
implement cloned for Option

9 years agoauto merge of #18752 : jakub-/rust/remove-unit, r=eddyb
bors [Sun, 16 Nov 2014 14:27:08 +0000 (14:27 +0000)]
auto merge of #18752 : jakub-/rust/remove-unit, r=eddyb

Closes https://github.com/rust-lang/rust/issues/18614.

9 years agoUpdate the reference
Jakub Bukaj [Sun, 9 Nov 2014 15:19:16 +0000 (16:19 +0100)]
Update the reference

9 years agoUpdate tests accordingly
Jakub Bukaj [Sun, 9 Nov 2014 15:14:48 +0000 (16:14 +0100)]
Update tests accordingly

9 years agoComplete the removal of ty_nil, ast::LitNil, ast::TyBot and ast::TyUniq
Jakub Bukaj [Sun, 9 Nov 2014 15:14:15 +0000 (16:14 +0100)]
Complete the removal of ty_nil, ast::LitNil, ast::TyBot and ast::TyUniq

[breaking-change]

This will break any uses of macros that assumed () being a valid literal.

9 years agoTry to remove ty_nil, some kind of error in exhaustiveness checking
Niko Matsakis [Tue, 4 Nov 2014 12:57:21 +0000 (07:57 -0500)]
Try to remove ty_nil, some kind of error in exhaustiveness checking

9 years agoauto merge of #18978 : jakub-/rust/roll-up, r=cmr
bors [Sun, 16 Nov 2014 11:27:35 +0000 (11:27 +0000)]
auto merge of #18978 : jakub-/rust/roll-up, r=cmr

9 years agoFix doctests
Jakub Bukaj [Sun, 16 Nov 2014 11:22:40 +0000 (12:22 +0100)]
Fix doctests

9 years agoFix warnings
Jakub Bukaj [Sun, 16 Nov 2014 09:37:31 +0000 (10:37 +0100)]
Fix warnings

9 years agorollup merge of #18990: alfie/master
Jakub Bukaj [Sun, 16 Nov 2014 09:22:43 +0000 (10:22 +0100)]
rollup merge of #18990: alfie/master

9 years agorollup merge of #18989: alex/fix-typos
Jakub Bukaj [Sun, 16 Nov 2014 09:22:35 +0000 (10:22 +0100)]
rollup merge of #18989: alex/fix-typos

9 years agorollup merge of #18985: alexcrichton/issue-18900
Jakub Bukaj [Sun, 16 Nov 2014 09:22:28 +0000 (10:22 +0100)]
rollup merge of #18985: alexcrichton/issue-18900

9 years agorollup merge of #18979: inrustwetrust/codegen-options-parsing
Jakub Bukaj [Sun, 16 Nov 2014 09:22:00 +0000 (10:22 +0100)]
rollup merge of #18979: inrustwetrust/codegen-options-parsing

9 years agorollup merge of #18976: bjz/rfc369-numerics
Jakub Bukaj [Sun, 16 Nov 2014 09:21:42 +0000 (10:21 +0100)]
rollup merge of #18976: bjz/rfc369-numerics

9 years agorollup merge of #18970: aturon/fixup-stable
Jakub Bukaj [Sun, 16 Nov 2014 09:21:33 +0000 (10:21 +0100)]
rollup merge of #18970: aturon/fixup-stable

9 years agorollup merge of #18965: cmr/master
Jakub Bukaj [Sun, 16 Nov 2014 09:21:18 +0000 (10:21 +0100)]
rollup merge of #18965: cmr/master

9 years agorollup merge of #18964: coyotebush/rustdoc-print
Jakub Bukaj [Sun, 16 Nov 2014 09:21:11 +0000 (10:21 +0100)]
rollup merge of #18964: coyotebush/rustdoc-print

9 years agorollup merge of #18960: stepancheg/cell-default
Jakub Bukaj [Sun, 16 Nov 2014 09:21:01 +0000 (10:21 +0100)]
rollup merge of #18960: stepancheg/cell-default

9 years agorollup merge of #18949: tomjakubowski/tojson-str
Jakub Bukaj [Sun, 16 Nov 2014 09:20:35 +0000 (10:20 +0100)]
rollup merge of #18949: tomjakubowski/tojson-str

9 years agorollup merge of #18948: barosl/doc-encodable-fix
Jakub Bukaj [Sun, 16 Nov 2014 09:20:28 +0000 (10:20 +0100)]
rollup merge of #18948: barosl/doc-encodable-fix

9 years agorollup merge of #18942: jbcrail/tree-set-docs
Jakub Bukaj [Sun, 16 Nov 2014 09:20:10 +0000 (10:20 +0100)]
rollup merge of #18942: jbcrail/tree-set-docs

9 years agorollup merge of #18941: reem/better-task-pool
Jakub Bukaj [Sun, 16 Nov 2014 09:20:03 +0000 (10:20 +0100)]
rollup merge of #18941: reem/better-task-pool

9 years agorollup merge of #18935: jmesmon/cody/no-vendor-triplle
Jakub Bukaj [Sun, 16 Nov 2014 09:19:47 +0000 (10:19 +0100)]
rollup merge of #18935: jmesmon/cody/no-vendor-triplle

9 years agorollup merge of #18933: IanConnolly/doc-fake-rust
Jakub Bukaj [Sun, 16 Nov 2014 09:19:22 +0000 (10:19 +0100)]
rollup merge of #18933: IanConnolly/doc-fake-rust

9 years agoauto merge of #18788 : ricky26/rust/master, r=aturon
bors [Sun, 16 Nov 2014 04:37:36 +0000 (04:37 +0000)]
auto merge of #18788 : ricky26/rust/master, r=aturon

This moves chars() and lines() out of Buffer and into separate traits (CharsBuffer and LinesBuffer respectively) - this matches the pattern used for bytes() on Reader (with BytesReader).

(I came across this when I wanted a trait object of a Buffer, so that I could use read_line(); rustc errors about std::io::Buffer not being object-safe.)

[breaking-change]
Any uses of Buffer::lines() will need to use the new trait std::io::LinesBuffer.
The same is true for Buffer::chars() with std::io::CharsBuffer.

9 years agodoc: make end comment consistent with start comment
Alfie John [Sun, 16 Nov 2014 04:12:43 +0000 (04:12 +0000)]
doc: make end comment consistent with start comment

9 years agoUn-feature gate struct variants
Steven Fackler [Sun, 16 Nov 2014 01:57:54 +0000 (17:57 -0800)]
Un-feature gate struct variants

Struct variant field visibility is now inherited. Remove `pub` keywords
from declarations.

Closes #18641

[breaking-change]

9 years agoMove ToString to collections::string
Brendan Zabarauskas [Sun, 16 Nov 2014 01:38:03 +0000 (12:38 +1100)]
Move ToString to collections::string

This also impls `FormatWriter` for `Vec<u8>`

9 years agoMove IntoString to collections::string
Brendan Zabarauskas [Sat, 15 Nov 2014 12:57:54 +0000 (23:57 +1100)]
Move IntoString to collections::string

9 years agoRename IntoStr to IntoString
Brendan Zabarauskas [Sat, 15 Nov 2014 11:09:26 +0000 (22:09 +1100)]
Rename IntoStr to IntoString

For consistancy with ToString

9 years agoRemove use of deprecated function
Brendan Zabarauskas [Sat, 15 Nov 2014 08:44:22 +0000 (19:44 +1100)]
Remove use of deprecated function

9 years agoRemove core::num::strconv
Brendan Zabarauskas [Sat, 15 Nov 2014 06:02:38 +0000 (17:02 +1100)]
Remove core::num::strconv

9 years agoMove FromStr to core::str
Brendan Zabarauskas [Sat, 15 Nov 2014 04:52:00 +0000 (15:52 +1100)]
Move FromStr to core::str

9 years agodoc: small grammar fix
Alfie John [Sat, 15 Nov 2014 23:17:36 +0000 (23:17 +0000)]
doc: small grammar fix

9 years agoFixed several typos
Alex Gaynor [Sat, 15 Nov 2014 23:00:47 +0000 (15:00 -0800)]
Fixed several typos

9 years agostd: Fix a flaky test on OSX 10.10
Alex Crichton [Sat, 15 Nov 2014 19:23:40 +0000 (11:23 -0800)]
std: Fix a flaky test on OSX 10.10

This test was somewhat sketchy already with a `loop` around `write`, so this
just adds some explicit synchronization to only call `write` once and guarantee
that the error happens.

Closes #18900

9 years agoUpdate ring_buf.rs from fallout of #18827.
Colin Sherratt [Fri, 14 Nov 2014 09:21:44 +0000 (04:21 -0500)]
Update ring_buf.rs from fallout of #18827.

9 years agoSlightly improved rustc error messages for invalid -C arguments
inrustwetrust [Sat, 15 Nov 2014 13:51:22 +0000 (14:51 +0100)]
Slightly improved rustc error messages for invalid -C arguments

9 years agoauto merge of #18924 : cakebaker/rust/fix_list, r=steveklabnik
bors [Sat, 15 Nov 2014 13:22:24 +0000 (13:22 +0000)]
auto merge of #18924 : cakebaker/rust/fix_list, r=steveklabnik

9 years agoauto merge of #18922 : japaric/rust/for, r=jakub-
bors [Sat, 15 Nov 2014 11:37:21 +0000 (11:37 +0000)]
auto merge of #18922 : japaric/rust/for, r=jakub-

r? @alexcrichton

9 years agoauto merge of #18901 : steveklabnik/rust/quickfix, r=alexcrichton
bors [Sat, 15 Nov 2014 07:12:27 +0000 (07:12 +0000)]
auto merge of #18901 : steveklabnik/rust/quickfix, r=alexcrichton

Small copy/paste error from the crates guide.

9 years agorustdoc: tweak stability summary counting
Aaron Turon [Sat, 15 Nov 2014 04:54:27 +0000 (20:54 -0800)]
rustdoc: tweak stability summary counting

This commit slightly tweaks the counting of impl blocks and structs for
the stability summary (so that the block itself isn't counted for
inherent impls, and the fields aren't counted for structs).

9 years agolibs: fix #[stable] inheritance fallout
Aaron Turon [Sat, 15 Nov 2014 04:39:41 +0000 (20:39 -0800)]
libs: fix #[stable] inheritance fallout

A recent change turned off inheritance for the #[stable] by default, but
failed to catch all the cases where this was being used in std. This
patch fixes that problem.

9 years agolibrustc: use type parameters less vigorously when giving the IR type names
Corey Richardson [Sat, 15 Nov 2014 00:26:25 +0000 (19:26 -0500)]
librustc: use type parameters less vigorously when giving the IR type names

9 years agoHide interactive elements when printing rustdoc
Corey Ford [Fri, 14 Nov 2014 19:44:40 +0000 (11:44 -0800)]
Hide interactive elements when printing rustdoc

Hide the search form and expand/collapse buttons, since they aren't useful when printed.

9 years agoauto merge of #18894 : ArtemGr/rust/patch-1, r=pnkfelix
bors [Fri, 14 Nov 2014 23:37:27 +0000 (23:37 +0000)]
auto merge of #18894 : ArtemGr/rust/patch-1, r=pnkfelix

A typo about Results being panics crawled in. Fixing it.

9 years agoimpl Default for Cell and RefCell
Stepan Koltsov [Fri, 14 Nov 2014 19:22:42 +0000 (22:22 +0300)]
impl Default for Cell and RefCell

It is necessary to have #[deriving(Default)] for struct containing
cells like Cell<u32>.

9 years agoauto merge of #18880 : barosl/rust/doc-fail-to-panic, r=alexcrichton
bors [Fri, 14 Nov 2014 18:17:28 +0000 (18:17 +0000)]
auto merge of #18880 : barosl/rust/doc-fail-to-panic, r=alexcrichton

I found some occurrences of "failure" and "fails" in the documentation. I changed them to "panics" if it means a task panic. Otherwise I left it as is, or changed it to "errors" to clearly distinguish them.

Also, I made a minor fix that is breaking the layout of a module page. "Example" is shown in an irrelevant place from the following page: http://doc.rust-lang.org/std/os/index.html

9 years agoauto merge of #18893 : bkoropoff/rust/issue-18883, r=alexcrichton
bors [Fri, 14 Nov 2014 15:22:28 +0000 (15:22 +0000)]
auto merge of #18893 : bkoropoff/rust/issue-18883, r=alexcrichton

This was a simple case of substitutions being applied inconsistently.  I haven't investigated why type parameters are actually showing up in the closure type here, but trans needs to handle them correctly in any case.

9 years agoImprove examples for syntax::ext::deriving::encodable
Barosl Lee [Fri, 14 Nov 2014 08:14:44 +0000 (17:14 +0900)]
Improve examples for syntax::ext::deriving::encodable

The examples in the documentation for syntax::ext::deriving::encodable
are outdated, and do not work. To fix this, the following changes are
applied:

- emit_field() -> emit_struct_field()
- read_field() -> read_struct_field()
- Use Result to report errors
- Add the mut keyword to Encoder/Decoder
- Prefer Encodable::encode() to emit_uint