Commit Graph

48094 Commits

Author SHA1 Message Date
Steve Klabnik
d64195f365 Rollup merge of #29715 - defuz:patch-3, r=alexcrichton
r? @steveklabnik

See #27305
2015-11-10 10:51:48 -05:00
Steve Klabnik
a39daf95f3 Rollup merge of #29708 - Ryman:pathdoc, r=steveklabnik
r? @steveklabnik
2015-11-10 10:51:48 -05:00
Steve Klabnik
0d04a51517 Rollup merge of #29688 - stepancheg:vec-outdated, r=nikomatsakis
Since commit 46068c9da, call to `reserve()` on empty vec allocates
exactly requested capacity, so unroll of first iteration may help only
with branch prediction.
2015-11-10 10:51:47 -05:00
Steve Klabnik
fb2ae896bb Rollup merge of #29420 - efindlay:master, r=steveklabnik
r? @steveklabnik
2015-11-10 10:51:47 -05:00
bors
05b66b8a1c Auto merge of #29705 - Ryman:mismatched_typaram_counts, r=alexcrichton
…type-params for methods
2015-11-10 15:48:00 +00:00
Toby Scrace
5e68056b13 Add examples to methods on integer types 2015-11-10 13:19:52 +00:00
bors
e9aa32ac72 Auto merge of #29697 - dotdash:mir_trans_switchint, r=nikomatsakis 2015-11-10 13:17:15 +00:00
Seo Sanghyeon
dfc314d19b Use lifetime elision 2015-11-10 20:42:00 +09:00
bors
4afa9d9003 Auto merge of #29699 - tamird:valgrind-supp, r=alexcrichton
Quite a bit of cruft in the valgrind suppressions. I started from a clean slate and found a few unique failures; this commit also moves the tests "fixed" by these suppressions into run-pass-valgrind.
2015-11-10 11:34:13 +00:00
Seo Sanghyeon
791003ad3c Use deref coercions 2015-11-10 20:16:28 +09:00
Vadim Petrochenkov
41ccd44f76 Use exhaustive matching 2015-11-10 12:51:56 +03:00
Manish Goregaokar
0c327a7859 Fix help text for flowgraph debug options 2015-11-10 14:49:36 +05:30
bors
4b23a0962d Auto merge of #29647 - goyox86:goyox86/rustfmting-librustc_frontII, r=nrc
Hi Rustaceans!

This is the second take  on running latest rustfmt on librustc_front!

This is the same in https://github.com/rust-lang/rust/pull/29075 but cleaned. All fixups have been applied.

//cc @nrc
2015-11-10 08:38:52 +00:00
bors
6aee7c5d2c Auto merge of #29546 - alexcrichton:new-libc, r=brson
This commit replaces the in-tree liblibc with the [external clone](https://github.com/rust-lang-nursery/libc) which has no evolved beyond the in-tree version in light of its [recent redesign](https://github.com/rust-lang/rfcs/pull/1291).

The primary changes here are:

* `src/liblibc/lib.rs` was deleted
* `src/liblibc` is now a submodule pointing at the external repository
* `src/libstd/sys/unix/{c.rs,sync.rs}` were both deleted having all bindings folded into the external liblibc.
* Many ad-hoc `extern` blocks in the standard library were removed in favor of bindings now being in the external liblibc.
* Many functions/types were added to `src/libstd/sys/windows/c.rs`, and the scattered definitions throughout the standard library were consolidated here.

At the API level this commit is **not a breaking change**, although it is only very lightly tested on the *BSD variants and is probably going to break almost all of their builds! Follow-up commits to liblibc should in theory be all that's necessary to get the build working on the *BSDs again.
2015-11-10 06:56:30 +00:00
Alex Crichton
3d28b8b98e std: Migrate to the new libc
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself
* Update all references to use `libc` as a result.
* Update all references to the new flat namespace.
* Moves all windows bindings into sys::c
2015-11-09 22:55:50 -08:00
Seo Sanghyeon
0b3394a4d5 Suggest mut for mutability errors 2015-11-10 13:05:28 +09:00
Alex Crichton
c8a29c2092 libc: Replace liblibc with crates.io libc 2015-11-09 17:36:13 -08:00
Steve Klabnik
abb9c9008f Some cleanup on after #29684
* wrap to 80 cols
* small grammar fix, missing 'the'
2015-11-10 01:39:23 +01:00
Guillaume Gomez
cd94222da2 Add E0321 error explanation 2015-11-10 00:43:20 +01:00
Jose Narvaez
cbd2ef8185 Rustfmting librustc_front (again). 2015-11-09 21:55:51 +00:00
Brian Anderson
7793829877 Redo the README intro again 2015-11-09 13:32:30 -08:00
Vadim Petrochenkov
649fc3895c Use enum ParsePub instead of bool in field parsing + typo 2015-11-09 22:34:15 +03:00
Vadim Petrochenkov
2a01e263bc Improve error message 2015-11-09 22:16:30 +03:00
Alex Crichton
5d55533f93 syntax: Use let _ in #[derive(Debug)]
This should help avoid triggering the unused_results lint which can frequently
be turned on.

Closes #29710
2015-11-09 10:42:58 -08:00
Vadim Petrochenkov
ef6850643e rustc_privacy: Fix bugs in SanePrivacyVisitor 2015-11-09 21:15:53 +03:00
Alex Crichton
f16e7b4a41 std: Fix endianness in Ord for IP addresses
The comparison of IP addresses should happen not always in network endianness
but rather in the host endianness format, so be sure to convert to that before
comparing addresses.

There are still locations where the endianness will factor into visible
properties, such as the hash, but these are not important to be independent of
the endianness in play (as hash values are pretty undefined anyway.

Closes #29691
2015-11-09 09:11:16 -08:00
Aaron Turon
dacab06b4a Tag feature gates with issues
This commit adds issue numbers to the vast majority of active feature
gates. The few that are left without issues are rustc/runtime-internal
features that are essentially private APIs.

Closes #28244
2015-11-09 09:09:25 -08:00
Björn Steinbrink
b0d7338d6d [MIR trans] Add support for SwitchInt 2015-11-09 16:54:58 +01:00
Ivan Ivaschenko
c618c5f36a Doc: Fix broken link on for-loop.html 2015-11-09 17:49:30 +02:00
Vadim Petrochenkov
e6b14aab05 syntax: Merge parsing code for structures and variants 2015-11-09 18:43:32 +03:00
bors
2968dfa285 Auto merge of #29713 - apasel422:executable, r=dotdash 2015-11-09 15:04:24 +00:00
Andrew Paseltiner
269b59fe69 Remove executable permission from .rs files 2015-11-09 09:28:51 -05:00
bors
00aa3cbecc Auto merge of #29695 - dtrebbien:remove-mention-of-struct_variant-feature, r=sanxiyn
The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124

§6.1.6 Enumerations shows an example of a struct-like enum variant.
2015-11-09 11:14:26 +00:00
bors
36f211b353 Auto merge of #29682 - Ryman:dead_spam, r=sanxiyn
This standardises the current behavior to match `enum` variants, hopefully leading to less warning spam for users!

For example the code below will have 2 warnings (for `Foo` and `Bar`) rather than 7:
```rust
enum Foo {
    A,
    B { a: String, b: isize },
    C
}

struct Bar {
    a: i32,
    b: String,
    c: ()
}

fn main() {
    println!("Hi")
}
```
http://is.gd/zAztKW
2015-11-09 08:28:35 +00:00
Kevin Butler
621e259b78 libstd: add example for PathBuf::push 2015-11-09 03:42:22 +00:00
Kevin Butler
8bad031190 librustc_typeck: give more information when supplied wrong number of type-params for methods 2015-11-09 01:01:51 +00:00
bors
5b4986fa57 Auto merge of #29684 - stepancheg:size-hint, r=Gankro
* `size_hint()` cannot be relied upon to perform memory unsafe operations

Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-08 22:01:44 +00:00
bors
9eb099daa4 Auto merge of #29686 - jrburke:docs-error-handling-search-case, r=BurntSushi
In src/doc/trpl/error-handling.md, in this section:

It mentions three steps, to "convert this to proper error handling", the last one being:

3. Handle the error in main.

However, it is not shown. This pull request adds a code example showing how `main`'s call to `search` should use case analysis. I am still very much new to learning Rust, so this may not be idiomatic. Happy to make changes with guidance.
2015-11-08 20:20:16 +00:00
bors
e543815c85 Auto merge of #29690 - tbu-:pr_doc_env_home_dir, r=Manishearth 2015-11-08 18:37:18 +00:00
Tamir Duberstein
269a811192 valgrind: update suppressions and move interesting tests 2015-11-08 13:36:36 -05:00
Tamir Duberstein
c21ffc27b1 print the unexpected character 2015-11-08 13:36:36 -05:00
Stepan Koltsov
f6f99ce7a3 Explain that size_hint cannot be trusted
Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-08 21:27:12 +03:00
jrburke
0dd2c1c07d doc: error-handling.md: main case analysis for search 2015-11-08 09:53:21 -08:00
Daniel Trebbien
9f7afd060b reference: Remove struct_variant from Compiler Features
The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124

§6.1.6 Enumerations shows an example of a struct-like enum variant.
2015-11-08 11:27:40 -05:00
bors
f5633df913 Auto merge of #29692 - jwworth:pull-request/fix-typo, r=apasel422
Fixes the double word 'be'.
2015-11-08 15:56:03 +00:00
Jake Worth
8a41d1292f Fix double word 'be' 2015-11-08 09:39:01 -06:00
Tobias Bucher
e5100a5802 Spell out the fallback of std::env::home_dir on POSIX 2015-11-08 15:34:16 +00:00
Stepan Koltsov
e3433e3b51 Fix outdated comment in Vec::from_iter
Since commit 46068c9da, call to `reserve()` on empty vec allocates
exactly requested capacity, so unroll of first iteration may help only
with branch prediction.
2015-11-08 17:17:02 +03:00
Tamir Duberstein
008f9d5822 jemalloc: pass --enable-valgrind when valgrind is enabled 2015-11-08 08:10:29 -05:00
Tamir Duberstein
08efcee858 jemalloc: quarantine is fixed 2015-11-08 08:10:29 -05:00