Commit Graph

51074 Commits

Author SHA1 Message Date
bors
f6f050d090 Auto merge of #31873 - Manishearth:rollup, r=Manishearth
- Successful merges: #31677, #31784, #31839, #31842, #31843, #31850, #31863, #31868, #31870
- Failed merges:
2016-02-24 22:58:28 +00:00
Manish Goregaokar
b660ca59ff Rollup merge of #31870 - ivan:filter-explain, r=steveklabnik
As a Rust newbie, I found the book's explanation for why the `filter` closure gets a reference very confusing, and tried to figure out why `filter` is somehow less consumptive than `map` -- but it isn't; that's controlled by `iter`/`into_iter`.  I flailed around for a while until @habnabit explained it to me, and in retrospect it is quite obvious :-)
2016-02-25 04:21:11 +05:30
Manish Goregaokar
a834cd1b70 Rollup merge of #31868 - fhahn:capitalize-Rust, r=steveklabnik 2016-02-25 04:21:11 +05:30
Manish Goregaokar
f28677506c Rollup merge of #31863 - matklad:clarify-reference, r=steveklabnik
Reference implied that use declarations may appear *only* at the top of blocks and modules, but it is not the case, and the following is valid:

```Rust
fn foo() {
    let x = 92;
    use baz::bar;
}
```

r? @steveklabnik
2016-02-25 04:21:11 +05:30
Manish Goregaokar
901eca9e6c Rollup merge of #31850 - GuillaumeGomez:vec-doc, r=steveklabnik
r? @steveklabnik
cc @mbrubeck
2016-02-25 04:21:11 +05:30
Manish Goregaokar
b28debd91c Rollup merge of #31843 - Wafflespeanut:bool_docs, r=steveklabnik
fixes #29332

r? @steveklabnik
2016-02-25 04:21:10 +05:30
Manish Goregaokar
ac02f9c18d Rollup merge of #31842 - dileepbapat:master, r=alexcrichton
I have made changes and built it after that. Please advise,

https://github.com/rust-lang/rust/issues/31820
2016-02-25 04:21:10 +05:30
Manish Goregaokar
2e89dee639 Rollup merge of #31839 - mitaa:rdoc-idx-self, r=alexcrichton
fixes #31598

r? @alexcrichton
2016-02-25 04:21:10 +05:30
Manish Goregaokar
27990edb52 Rollup merge of #31784 - urschrei:chunks_doc, r=steveklabnik
Closes #31773

r? @steveklabnik
2016-02-25 04:21:10 +05:30
Manish Goregaokar
e928297a3b Rollup merge of #31677 - ivan:doc-vtable, r=steveklabnik
I sure hope this fix is right

cc @steveklabnik
2016-02-25 04:21:10 +05:30
Guillaume Gomez
df33fc352d Add more explanation on vec type 2016-02-24 21:47:58 +01:00
Ivan Kozik
7042c8ef8d book: Explain better why the filter closure gets a reference 2016-02-24 20:09:01 +00:00
Simonas Kazlauskas
356bf529ee Fix tests 2016-02-24 22:04:27 +02:00
Simonas Kazlauskas
77be4ecc17 Make list of statements flat
In MIR we previously tried to match `let x in { exprs; let y in { exprs; }}` with our data
structures which is rather unwieldy, espeicially because it requires some sort of recursion or
stack to process, while, a flat list of statements is enough – lets only relinquish their lifetime
at the end of the block (i.e. end of the list).

Also fixes #31853.
2016-02-24 22:04:22 +02:00
Simonas Kazlauskas
fbd8171155 Add some tests for dynamic dropping 2016-02-24 21:05:25 +02:00
Simonas Kazlauskas
ba26efb60c Implement filling drop in MIR
Hopefully the author caught all the cases. For the mir_dynamic_drops_3 test case the ratio of
memsets to other instructions is 12%. On the other hand we actually do not double drop for at least
the test cases provided anymore in MIR.
2016-02-24 21:05:21 +02:00
Alex Crichton
1282833470 rustc: Refactor how unstable flags are handled
This commit adds support for *truly* unstable options in the compiler, as well
as adding warnings for the start of the deprecation path of
unstable-but-not-really options. Specifically, the following behavior is now in
place for handling unstable options:

* As before, an unconditional error is emitted if an unstable option is passed
  and the `-Z unstable-options` flag is not present. Note that passing another
  `-Z` flag does not require passing `-Z unstable-options` as well.
* New flags added to the compiler will be in the `Unstable` category as opposed
  to the `UnstableButNotReally` category which means they will unconditionally
  emit an error when used on stable.
* All current flags are in a category where they will emit warnings when used
  that the option will soon be a hard error.

Also as before, it is intended that `-Z` is akin to `#![feature]` in a crate
where it is required to unlock unstable functionality. A nightly compiler which
is used without any `-Z` flags should only be exercising stable behavior.
2016-02-24 11:01:29 -08:00
Florian Hahn
145190bd2a Capitalize some occurences of Rust in documentation 2016-02-24 19:56:28 +01:00
mitaa
cf76fcf30d Fix source-links for files with absolute-paths
`clean_srcpath` tries to make the source-path relative to `src_root`,
but this didn't work since `src_root` itself wasn't absolute.
2016-02-24 19:43:02 +01:00
mitaa
27ca2507de Allow creation of src-links for device files 2016-02-24 19:41:56 +01:00
Alex Crichton
f3be73c84b std: Cap read/write limits on Windows networking
Similar to #31825 where the read/write limits were capped for files, this
implements similar limits when reading/writing networking types. On Unix this
shouldn't affect anything because the write size is already a `usize`, but on
Windows this will cap the read/write amounts to `i32::max_value`.

cc #31841
2016-02-24 09:17:07 -08:00
Aleksey Kladov
397ab315e7 reference: clarify use declaration location 2016-02-24 19:13:31 +03:00
bors
0ef8d42605 Auto merge of #31832 - mmatyas:update_libc_16f1c19, r=alexcrichton
This fixes the `aarch64-linux-android` build (#31595).
2016-02-24 13:32:24 +00:00
Jeffrey Seyfried
2942cf7b0a Improve unused import detection 2016-02-24 13:13:46 +00:00
Jeffrey Seyfried
7ad7065c35 Uncapitalize note messages 2016-02-24 13:12:13 +00:00
bors
360a165ed3 Auto merge of #31828 - frewsxcv:sepseq-associated-function, r=alexcrichton
None
2016-02-24 11:29:31 +00:00
tormol
d34c6eeed4 Use a character that requires two u16s in the examples for char.encode_utf16() 2016-02-24 08:39:53 +01:00
bors
df91cb9af6 Auto merge of #31782 - pitdicker:clean_out_windows_c, r=alexcrichton
I am not entirely sure I have got everything right, but if it compiles it is ok probably...
I tested it with msvc x86_64 and gnu.

Somehow a lot of `EXCEPTION-*` constants are dead code when running test, no idea why.
I have put `#![cfg_attr(test, allow(dead_code))]` at the top for this.
2016-02-24 07:21:44 +00:00
Jeffrey Seyfried
197326d17b Resolve: include normal modules in the ribs 2016-02-24 06:31:55 +00:00
bors
304c790fc2 Auto merge of #31778 - aturon:snapshot, r=alexcrichton
r? @alexcrichton
2016-02-24 04:42:09 +00:00
bors
a4574bd4a5 Auto merge of #31855 - alexcrichton:fix-tidy, r=nikomatsakis
The MinGW-based Python implementations would automatically do this, but if we
want to use Python from the official downloads our usage of `/` instead of `\`
can wreak havoc. In a few select locations just use `os.path.normpath` do do the
conversions properly for us.
2016-02-24 01:55:45 +00:00
Alex Crichton
622ec5d8d0 mk: Tweak tidy script to work on Windows python
The MinGW-based Python implementations would automatically do this, but if we
want to use Python from the official downloads our usage of `/` instead of `\`
can wreak havoc. In a few select locations just use `os.path.normpath` do do the
conversions properly for us.
2016-02-23 17:52:26 -08:00
Jeffrey Seyfried
5172745da7 Warn instead of error when using an inaccessable extern crate 2016-02-24 01:34:39 +00:00
Jeffrey Seyfried
f8d6dcf46e Warn when reexporting a private extern crate 2016-02-24 01:34:20 +00:00
Jeffrey Seyfried
3358fb11da Fix the visibility of extern crate declarations and stop warning on pub extern crate 2016-02-24 01:34:14 +00:00
mitaa
f5df7e0865 Show associated types in inherent impls 2016-02-23 21:47:18 +01:00
mitaa
b38a856e38 Don't show associated consts from trait impls 2016-02-23 21:47:13 +01:00
bors
281f9d868f Auto merge of #30614 - arcnmx:cstr-bytes, r=alexcrichton
I'm a bit iffy on the return type, but `Result` would also be a bit weird... The two error cases are `Unterminated` and `InteriorNul(usize)`.

I considered `from_chars(&[c_char])` but this meshes better with `as_bytes_with_nul()` and Rust code in general.

Should there also be a corresponding unsafe `from_bytes_unchecked` variant?
2016-02-23 20:08:54 +00:00
Ravi Shankar
eb97c26d3b Updated the primitive docs for bool 2016-02-24 01:15:28 +05:30
bors
43ddfbdfb2 Auto merge of #31751 - gkoz:os_str_path_cmp, r=aturon 2016-02-23 17:21:18 +00:00
arcnmx
71f29cd837 CStr::from_bytes_with_nul tests 2016-02-23 11:52:19 -05:00
dileepb
fbfe70e6ab #31820 - Utilize if..let instead of single match branch 2016-02-23 21:21:51 +05:30
Aaron Turon
a92ee0f664 Register new snapshots 2016-02-23 07:31:16 -08:00
arcnmx
9414c4ea18 Link cstr from_bytes to tracking issue 2016-02-23 10:12:39 -05:00
bors
0de3cace0a Auto merge of #31825 - ollie27:win_lfs, r=alexcrichton
`ReadFile` and `WriteFile` take a DWORD (u32) for the length argument
which was erroneously cast from a usize causing truncation. This meant
methods like `write_all` and `read_exact` would unexpectedly fail if
given a buffer 4 GiB or larger.

We can instead just ask for `u32::MAX` bytes if the given buffer is too
big.
2016-02-23 14:09:35 +00:00
mitaa
9d3bce38b4 Don't record self parameter for static methods 2016-02-23 12:17:12 +01:00
bors
6ffd7cd166 Auto merge of #31447 - nagisa:mir-cfgsimplify-bitvec, r=nikomatsakis
BitVector is more space efficient.
2016-02-23 11:12:08 +00:00
Simonas Kazlauskas
b92e2437f5 [MIR] Change SimplifyCfg pass to use bitvec
BitVector is much more space efficient.
2016-02-23 11:43:52 +02:00
bors
32633167f9 Auto merge of #31822 - petrochenkov:derive, r=alexcrichton
Fixes https://github.com/rust-lang/rust/issues/29548
2016-02-23 08:07:03 +00:00
arcnmx
16f218b600 Rename CStr::from_bytes to from_bytes_with_nul 2016-02-23 01:37:53 -05:00