Commit Graph

35155 Commits

Author SHA1 Message Date
Steve Klabnik
3c9d8983be Fix up some {ignore} and {notrust}s
These should be properly annotated instead.

Fixes #16219.
2014-12-10 15:14:18 -05:00
bors
c38e73fef5 auto merge of #19705 : brson/rust/fix-install, r=alexcrichton 2014-12-10 20:11:27 +00:00
Steve Klabnik
6780031540 Fix inappropriate ## headings
Fixes #15499.
2014-12-10 13:54:56 -05:00
Steve Klabnik
a9fdd1618b Fix po4a conf file
This line was declared twice, which causes the build of i10n docs to
fail.
2014-12-10 13:33:27 -05:00
Brian Anderson
65bca024a7 Don't try to dist src/README.md which does not exist 2014-12-10 09:47:36 -08:00
Alex Crichton
e8bc621f48 rustc: Fix make install
Move a few docblocks from 'ignore' to something that's not rust (e.g. 'text').

Closes #19678
2014-12-10 09:46:30 -08:00
bors
bc486dc233 auto merge of #19663 : tbu-/rust/pr_fix_vecmap, r=Gankro
- Introduce a named type for the return type of `VecMap::move_iter`
- Rename all type parameters to `V` for "Value".
- Remove unnecessary call to an `Option::unwrap`, use pattern matching instead.
- Remove incorrect `Hash` implementation which took the `VecMap`'s capacity
  into account.

This is a [breaking-change], however whoever used the `Hash` implementation
relied on an incorrect implementation.
2014-12-10 15:22:18 +00:00
Barosl Lee
cfee5b7e88 Fix an ICE when trying to resolve a struct variant
Unlike a tuple variant constructor which can be called as a function, a
struct variant constructor is not a function, so cannot be called.

If the user tries to assign the constructor to a variable, an ICE
occurs, because there is no way to use it later. So we should stop the
constructor from being used like that.

A similar mechanism already exists for a normal struct, as it prohibits
a struct from being resolved. This commit does the same for a struct
variant.

This commit also includes some changes to the existing tests.

Fixes #19452.
2014-12-10 22:45:28 +09:00
Arthur Liao
2f5e170bab Update sample code to use getopts::usage in print_usage 2014-12-10 20:46:33 +08:00
bors
daa2bde2ba auto merge of #19655 : jbranchaud/rust/change-example-to-examples, r=steveklabnik
@steveklabnik I got a start on this.
2014-12-10 12:46:11 +00:00
Tobias Bucher
4a46f5ebde Remove references to traits that no longer exist
This specifically means:
- `Deque`
- `Map`
- `Set`
2014-12-10 12:31:47 +01:00
bors
fddec2d88a auto merge of #19638 : barosl/rust/typeck-tupled-arguments-ice, r=jakub
When a type error occurs, `check_method_argument_types()` tries to provide arguments filled with `ty::mk_err()`. However, if a function takes the parameters as a tuple, the arguments should be converted to a tuple before passing it to `check_argument_types()`.

Fixes #19521.
2014-12-10 09:56:14 +00:00
bors
444a759b84 auto merge of #19628 : jbranchaud/rust/add-string-as-string-doctest, r=steveklabnik 2014-12-10 06:46:16 +00:00
jbranchaud
d946426699 Add doctests for iter_mut and into_iter of BTreeMap.
Add spacing as dictated by standard rust code style.
2014-12-09 22:19:23 -06:00
bors
ab1b1ae719 auto merge of #19648 : mquandalle/rust/patch-1, r=alexcrichton 2014-12-10 03:41:14 +00:00
Barosl Lee
21d12c0297 typeck: Make the supplied parameters to be a tuple
When a type error occurs, check_method_argument_types() tries to provide
arguments filled with ty::mk_err(). However, if a function takes the
parameters as a tuple, the arguments should be converted to a tuple
before being passed to check_argument_types().

Fixes #19521.
2014-12-10 12:33:20 +09:00
bors
4c692d3a35 auto merge of #19573 : apasel422/rust/sized_fn_once, r=alexcrichton
- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes `self` by value and can never be implemented by an unsized type.
- Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl, as both `Fn` and `FnMut` are `for Sized?`.
2014-12-10 00:31:13 +00:00
bors
8fbfa66b45 auto merge of #19563 : alexcrichton/rust/issue-19501, r=pnkfelix
One of the causes of #19501 was that the metadata on OSX was getting corrupted.
For any one particular invocation of the compiler the metadata file inside of an
rlib archive would have extra bytes appended to the end of it. These extra bytes
end up confusing rbml and have it run off the end of the array (resulting in the
out of bounds detected).

This commit prepends the length of metadata to the start of the metadata to
ensure that we always slice the precise amount that we want, and it also
un-ignores the test from #19502.

Closes #19501
2014-12-09 21:56:13 +00:00
Alfie John
b9c3b5693a doc: grammar fix 2014-12-09 20:17:40 +00:00
bors
b25e100173 auto merge of #19665 : alexcrichton/rust/rollup, r=alexcrichton 2014-12-09 19:12:02 +00:00
Tobias Bucher
20eaf168c5 Add a proper Hash implementation for VecMap
Also re-add the previously deleted test with an additional test that would have
failed before, when the hash function depended on the capacity.
2014-12-09 20:05:51 +01:00
Alex Crichton
1a61fe4280 Test fixes and rebase conflicts from the rollup 2014-12-09 10:26:04 -08:00
Tobias Bucher
deabeb0276 Rollback accidental documentation changes
These probably happened during the merge of the commit that made `Copy` opt-in.

Also, convert the last occurence of `/**` to `///` in `src/libstd/num/strconv.rs`
2014-12-09 18:50:31 +01:00
Alex Crichton
2457375534 rollup merge of #19653: frewsxcv/rm-reexports
Brief note: This does *not* affect anything in the prelude

Part of #19253

All this does is remove the reexporting of Result and Option from their
respective modules. More core reexports might be removed, but these ones
are the safest to remove since these enums (and their variants) are included in
the prelude.

Depends on https://github.com/rust-lang/rust/pull/19407 which is merged, but might need a new snapshot

[breaking-change]
2014-12-09 09:25:14 -08:00
Alex Crichton
b4b1bb0a4e rollup merge of #19642: aaronweiss74/master
This was discussed in [#rust-internals](
https://botbot.me/mozilla/rust-internals/2014-12-08/?msg=27077624&page=5). It's a small change.
2014-12-09 09:25:12 -08:00
Alex Crichton
4b34f3c3ad rollup merge of #19626: bluss/string-extend-str
Strings iterate to both char and &str, so it is natural it can also be extended or collected from an iterator of &str.

Apart from the trait implementations, `Extend<char>` is updated to use the iterator size hint, and the test added tests both the char and the &str versions of Extend and FromIterator.
2014-12-09 09:25:10 -08:00
Alex Crichton
1cbb07507e rollup merge of #19623: rustyrazorblade/patch-1
Docs said from_utf8 accepts a vector when it actually accepts an array of bytes.
2014-12-09 09:25:09 -08:00
Alex Crichton
21e5efb43c rollup merge of #19622: steveklabnik/fix_ringbuf_doc
https://botbot.me/mozilla/rust/2014-12-07/?msg=27003846&page=20
2014-12-09 09:25:08 -08:00
Alex Crichton
4a49912cfe rollup merge of #19620: retep998/memorymap 2014-12-09 09:25:07 -08:00
Alex Crichton
a2e9c99a66 rollup merge of #19616: steveklabnik/gh19556
Closes #19556.
2014-12-09 09:25:06 -08:00
Alex Crichton
e6d8190b0c rollup merge of #19615: steveklabnik/gh19595
Fixes #19595.
2014-12-09 09:25:05 -08:00
Alex Crichton
fb587f1f9b rollup merge of #19614: steveklabnik/gh19599
Fixes #19599
2014-12-09 09:25:04 -08:00
Alex Crichton
ae805da487 rollup merge of #19608: jbranchaud/add-missing-semicolon-in-intro 2014-12-09 09:24:53 -08:00
Alex Crichton
c56344ba31 rollup merge of #19604: vadimcn/gcc-less
- Support gcc-less installation on Windows.  To do so in unattended mode run:`<intaller>.exe /TYPE=compact /SILENT`.
- Do not require admin privileges to install.

cc #19519
2014-12-09 09:24:52 -08:00
Alex Crichton
2a244ce7f4 rollup merge of #19598: japaric/ord
cc #18755

r? @alexcrichton
cc @bjz
2014-12-09 09:24:51 -08:00
Alex Crichton
d0ad3c7f93 rollup merge of #19594: Arcterus/master
It is useful to have configurable newlines in base64 as the standard
leaves that for the implementation to decide.  GNU `base64` apparently
uses LF, which meant in `uutils` we had to manually convert the CRLF to
LF.  This made the program very slow for large inputs.

[breaking-change]
2014-12-09 09:24:50 -08:00
Alex Crichton
ae60f9c592 rollup merge of #19592: jbranchaud/add-btreemap-iter-doctest
I'm interested in including doctests for `BTreeMap`'s `iter_mut` and `into_iter` methods in this PR as well, but I am not sure of the best way to demonstrate/test what they do for the doctests.
2014-12-09 09:24:48 -08:00
Alex Crichton
63ef9e980f rollup merge of #19589: huonw/unboxed-closure-elision
This means that `Fn(&A) -> (&B, &C)` is equivalent to `for<'a> Fn(&'a A)
-> (&'a B, &'a C)` similar to the lifetime elision of lower-case `fn` in
types and declarations.

Closes #18992.
2014-12-09 09:24:47 -08:00
Alex Crichton
356193be0e rollup merge of #19588: nodakai/libstd-fix-zombie-children-finder
Reported as a part of rust-lang/rust#19120

The logic of rust-lang/rust@74fb798a20 was
flawed because when a CI tool run the test parallely with other tasks,
they all belong to a single session family and the test may pick up
irrelevant zombie processes before they are reaped by the CI tool
depending on timing.
2014-12-09 09:24:46 -08:00
Alex Crichton
26c24221e4 rollup merge of #19587: huonw/closure-feature-gate
detect UFCS drop and allow UFCS methods to have explicit type parameters.

Work towards #18875.

Since code could previously call the methods & implement the traits
manually, this is a

[breaking-change]

Closes #19586. Closes #19375.
2014-12-09 09:24:44 -08:00
Alex Crichton
60f97fc44a rollup merge of #19585: mdinger/guide_typo
@steveklabnik r?
2014-12-09 09:24:43 -08:00
Alex Crichton
6a652cfd1d rollup merge of #19584: CaptainHayashi/patch-1
Substitutes 'lifetime' for 'liftime' in a few places.

Apologies if this has already been noticed/PRQed!  I did try to do due diligence, though 😀
2014-12-09 09:24:42 -08:00
Alex Crichton
2593070d57 rollup merge of #19581: luqmana/duc
Fixes #19575.
2014-12-09 09:24:41 -08:00
Alex Crichton
39b57115fb rollup merge of #19577: aidancully/master
pthread_key_create can be 0.
addresses issue #19567.
2014-12-09 09:24:39 -08:00
Alex Crichton
a09632f7cb rollup merge of #19576: nhoss2/master
There was a link to a non existing guide
2014-12-09 09:24:38 -08:00
Tobias Bucher
67ae3a49e4 Clean up libcollections::VecMap
- Introduce a named type for the return type of `VecMap::move_iter`
- Rename all type parameters to `V` for "Value".
- Remove unnecessary call to an `Option::unwrap`, use pattern matching instead.
- Remove incorrect `Hash` implementation which took the `VecMap`'s capacity
  into account.

This is a [breaking-change], however whoever used the `Hash` implementation
relied on an incorrect implementation.
2014-12-09 18:20:20 +01:00
jbranchaud
de3fcee2dc Add a doctest for the std::string::as_string method.
Change Example to Examples.

Add a doctest that better demonstrates the utility of as_string.

Update the doctest example to use String instead of &String.
2014-12-09 11:11:50 -06:00
Maxime Quandalle
c93d47d395 Delete the outdated source layout README 2014-12-09 16:53:22 +01:00
Arcterus
a119ad83c7 serialize: base64: remove some .as_bytes() from the tests 2014-12-09 07:40:21 -08:00
Arcterus
a943a7a4e5 serialize: base64: improve newline handling speed 2014-12-09 07:40:21 -08:00