Commit Graph

48335 Commits

Author SHA1 Message Date
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
Ryan Scheel (Havvy)
13b7b07075 Add rustc UX guidelines.
See https://github.com/rust-lang/rfcs/pull/1246 for discussion.
2015-11-08 13:23:18 +00: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
Tamir Duberstein
31ed7185a1 whitespace 2015-11-08 08:10:29 -05:00
bors
01fc81f249 Auto merge of #29683 - apasel422:typos, r=steveklabnik
r? @steveklabnik
2015-11-08 05:31:21 +00:00
bors
4648d2b0f7 Auto merge of #29681 - vadimcn:fix-dist, r=alexcrichton
Resolves  #29672.   This happened because rust runtime startup objects, rsbegin.o and rsend.o, were not included in the target libraries package for -windows-gnu.

r? @alexcrichton
2015-11-08 02:34:24 +00:00
Andrew Paseltiner
e807b1f5ab Remove duplicate words from docs 2015-11-07 21:28:13 -05:00
Kevin Butler
c0a3538315 librustc: dont warn for inside of items when the parent is dead 2015-11-08 02:04:34 +00:00
Eric Findlay
dda7a3c2a1 Fixed "foo()" in try! example, r=steveklabnik 2015-11-08 11:00:03 +09:00
Vadim Chugunov
9f9afe5769 Make sure rsbegin.o and rsend.o get packaged with target lib artifacts.
Also, unified libc startup objects finding logic with that of the `-musl` target, since conceptually they were doing the same thing.
2015-11-07 17:56:55 -08:00
Eric Findlay
46b30ccd89 Added foo() to rustdoc example, r=steveklabnik
Fixes #29234
2015-11-08 10:05:20 +09:00
bors
bfdc358910 Auto merge of #29674 - inrustwetrust:flag_alignment, r=alexcrichton
The `enable-nonzeroing-move-hints` flag name was too long and caused misalignment of the help text.
Now calculating the needed padding dynamically from the available flags instead.
2015-11-07 23:45:14 +00:00
bors
43b5d5e0de Auto merge of #29678 - jwworth:pull-request/fix-typo, r=apasel422
Fixes the typo 'is is'.
2015-11-07 18:49:42 +00:00
Jake Worth
ac19178078 Fix typo 2015-11-07 12:27:58 -06:00
Ulrik Sverdrup
0f5e30d160 sort: Guard the fast path by length check
The right part must not be empty.
2015-11-07 18:09:20 +01:00
Ulrik Sverdrup
35fd1bab5e sort: Fast path for already sorted data
When merging two sorted blocks `left` and `right` if the last element in
`left` is <= the first in `right`, the blocks are already sorted.

Add this as an additional fast path by simply copying the whole left
block into the output and advancing the left pointer. The right block is
then treated the same way by the already present logic in the merge
loop.

Reduces runtime of .sort() to less than 50% of the previous, if the data
was already perfectly sorted. Sorted data with a few swaps are also
sorted quicker than before. The overhead of one comparison per merge
seems to be negligible.
2015-11-07 17:45:14 +01:00
bors
86069e45fe Auto merge of #29671 - ollie27:patch-1, r=bluss 2015-11-07 13:31:10 +00:00
inrustwetrust
61bb652ada Fixed text alignment for output of "rustc -Z help" 2015-11-07 14:13:30 +01:00
Oliver Middleton
4f6eb1e93a Update list of array implementations in src/libstd/primitive_docs.rs 2015-11-07 12:01:11 +00:00
bors
d34daf38e8 Auto merge of #29662 - rust-lang:brson-patch-2, r=steveklabnik
r? @steveklabnik
2015-11-07 06:18:39 +00:00
Brian Anderson
0d0cb3bb62 Direct security bugs to the security policy. 2015-11-06 21:56:40 -08:00
bors
bb9b5f5ede Auto merge of #29666 - Manishearth:rollup, r=Manishearth
- Successful merges: #29617, #29622, #29656, #29659, #29660
- Failed merges:
2015-11-07 02:26:45 +00:00
Manish Goregaokar
d9dd67d908 Rollup merge of #29660 - steveklabnik:gh28461, r=brson
Fixes #28461
2015-11-07 06:44:46 +05:30
Manish Goregaokar
e42dbc26de Rollup merge of #29659 - angelsl:crt-rebase, r=alexcrichton
cc: @vadimcn @vhbit

r? @alexcrichton
2015-11-07 06:44:46 +05:30