]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #31926 - llogiq:more_post, r=eddyb
bors [Sat, 27 Feb 2016 06:58:28 +0000 (06:58 +0000)]
Auto merge of #31926 - llogiq:more_post, r=eddyb

These `_post` methods are quite helpful to control lint behavior without storing e.g. block node ids. So here are a few more I believe will be helpful.

r? @Manishearth

8 years agoAuto merge of #31914 - bluss:copy-from-slice-everywhere, r=alexcrichton
bors [Sat, 27 Feb 2016 01:15:23 +0000 (01:15 +0000)]
Auto merge of #31914 - bluss:copy-from-slice-everywhere, r=alexcrichton

Use .copy_from_slice() where applicable

.copy_from_slice() does the same job of .clone_from_slice(), but the
former is explicitly for Copy elements and calls `memcpy` directly, and
thus is it efficient without optimization too.

8 years agomore check_*_post methods for LintPasses
llogiq [Fri, 26 Feb 2016 23:21:20 +0000 (00:21 +0100)]
more check_*_post methods for LintPasses

8 years agoAuto merge of #31876 - ollie27:win_fill_bytes, r=brson
bors [Fri, 26 Feb 2016 22:21:59 +0000 (22:21 +0000)]
Auto merge of #31876 - ollie27:win_fill_bytes, r=brson

CryptGenRandom takes a DWORD (u32) for the length so it only supports
writing u32::MAX bytes at a time.

Casting the length from a usize caused truncation meaning the whole
buffer was not always filled.

cc #31841

This is the same as rust-lang-nursery/rand#99. I think it's a good idea to keep the implementations in sync.

r? @alexcrichton

8 years agoAuto merge of #31903 - mitaa:rdoc-ghostly-impls, r=alexcrichton
bors [Fri, 26 Feb 2016 19:25:16 +0000 (19:25 +0000)]
Auto merge of #31903 - mitaa:rdoc-ghostly-impls, r=alexcrichton

fixes #29584

r? @alexcrichton

8 years agoAuto merge of #31858 - alexcrichton:fix-networking-cast, r=brson
bors [Fri, 26 Feb 2016 15:42:44 +0000 (15:42 +0000)]
Auto merge of #31858 - alexcrichton:fix-networking-cast, r=brson

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

8 years agoDon't inline impls from `doc(hidden)` modules
mitaa [Fri, 26 Feb 2016 00:45:24 +0000 (01:45 +0100)]
Don't inline impls from `doc(hidden)` modules

8 years agoUse .copy_from_slice() where applicable
Ulrik Sverdrup [Tue, 23 Feb 2016 18:25:43 +0000 (19:25 +0100)]
Use .copy_from_slice() where applicable

.copy_from_slice() does the same job of .clone_from_slice(), but the
former is explicitly for Copy elements and calls `memcpy` directly, and
thus is it efficient without optimization too.

8 years agoAuto merge of #31846 - alexcrichton:better-disable-jemallc, r=brson
bors [Fri, 26 Feb 2016 13:38:46 +0000 (13:38 +0000)]
Auto merge of #31846 - alexcrichton:better-disable-jemallc, r=brson

The `--disable-jemalloc` configure option has a failure mode where it will
create a distribution that is not compatible with other compilers. For example
the nightly for Linux will assume that it will link to jemalloc by default as
an allocator for executable crates. If, however, a standard library is used
which was built via `./configure --disable-jemalloc` then this will fail
because the jemalloc crate wasn't built.

While this seems somewhat reasonable as a niche situation, the same mechanism is
used for disabling jemalloc for platforms that just don't support it. For
example if the rumprun target is compiled then the sibiling Linux target *also*
doesn't have jemalloc. This is currently a problem for our cross-build nightlies
which build many targets. If rumprun is also built, it will disable jemalloc for
all targets, which isn't desired.

This commit moves the platform-specific disabling of jemalloc as hardcoded logic
into the makefiles that is scoped per-platform. This way when configuring
multiple targets **without the `--disable-jemalloc` option specified** all
targets will get jemalloc as they should.

8 years agoAuto merge of #31911 - Manishearth:rollup, r=Manishearth
bors [Fri, 26 Feb 2016 11:36:35 +0000 (11:36 +0000)]
Auto merge of #31911 - Manishearth:rollup, r=Manishearth

- Successful merges: #31878, #31880, #31883, #31893, #31894, #31896, #31901, #31904
- Failed merges: #31897

8 years agofixup #31878
Manish Goregaokar [Fri, 26 Feb 2016 11:35:46 +0000 (17:05 +0530)]
fixup #31878

8 years agoRollup merge of #31904 - bluss:writer-formatter-error, r=alexcrichton
Manish Goregaokar [Fri, 26 Feb 2016 09:42:18 +0000 (15:12 +0530)]
Rollup merge of #31904 - bluss:writer-formatter-error, r=alexcrichton

Make sure formatter errors are emitted by the default Write::write_fmt

Previously, if an error was returned from the formatter that did not
originate in an underlying writer error, Write::write_fmt would return
successfully even if the formatting did not complete (was interrupted by
an `fmt::Error` return).

Now we choose to emit an io::Error with kind Other for formatter errors.

Since this may reveal error returns from `write!()` and similar that
previously passed silently, it's a kind of a [breaking-change].

Fixes #31879

8 years agoRollup merge of #31901 - bluss:suggest-use, r=sanxiyn
Manish Goregaokar [Fri, 26 Feb 2016 09:42:18 +0000 (15:12 +0530)]
Rollup merge of #31901 - bluss:suggest-use, r=sanxiyn

suggest: Put the `use` in suggested code inside the quotes

Change import a trait suggestion from:

       help: candidate #1: use `std::io::Write`

to

       help: candidate #1: `use std::io::Write`

so that the code can be copied directly.

Fixes #31864

8 years agoRollup merge of #31896 - tshepang:idiom, r=steveklabnik
Manish Goregaokar [Fri, 26 Feb 2016 09:42:18 +0000 (15:12 +0530)]
Rollup merge of #31896 - tshepang:idiom, r=steveklabnik

8 years agoRollup merge of #31894 - tshepang:more-clear, r=steveklabnik
Manish Goregaokar [Fri, 26 Feb 2016 09:42:17 +0000 (15:12 +0530)]
Rollup merge of #31894 - tshepang:more-clear, r=steveklabnik

8 years agoRollup merge of #31893 - tshepang:comma, r=steveklabnik
Manish Goregaokar [Fri, 26 Feb 2016 09:42:17 +0000 (15:12 +0530)]
Rollup merge of #31893 - tshepang:comma, r=steveklabnik

8 years agoRollup merge of #31883 - birkenfeld:doc-null-escape, r=bluss
Manish Goregaokar [Fri, 26 Feb 2016 09:42:17 +0000 (15:12 +0530)]
Rollup merge of #31883 - birkenfeld:doc-null-escape, r=bluss

It appears in the examples, but is not covered by any of the cases
in the prose description.

8 years agoRollup merge of #31880 - Manishearth:debug, r=alexcrichton
Manish Goregaokar [Fri, 26 Feb 2016 09:42:17 +0000 (15:12 +0530)]
Rollup merge of #31880 - Manishearth:debug, r=alexcrichton

Right this information isn't documented anywhere, sticking it into `make tips`

8 years agoRollup merge of #31878 - frewsxcv:path-cleanup, r=alexcrichton
Manish Goregaokar [Fri, 26 Feb 2016 09:42:17 +0000 (15:12 +0530)]
Rollup merge of #31878 - frewsxcv:path-cleanup, r=alexcrichton

None

8 years agoAuto merge of #31834 - ubsan:copy_from_slice, r=alexcrichton
bors [Fri, 26 Feb 2016 09:16:03 +0000 (09:16 +0000)]
Auto merge of #31834 - ubsan:copy_from_slice, r=alexcrichton

implements rust-lang/rfcs#1419

r? alexcrichton

8 years agoAdd unstable copy_from_slice
Nicholas Mazzuca [Tue, 23 Feb 2016 07:06:53 +0000 (23:06 -0800)]
Add unstable copy_from_slice

8 years agomk: Move disable-jemalloc logic into makefiles
Alex Crichton [Mon, 8 Feb 2016 18:57:41 +0000 (10:57 -0800)]
mk: Move disable-jemalloc logic into makefiles

The `--disable-jemalloc` configure option has a failure mode where it will
create a distribution that is not compatible with other compilers. For example
the nightly for Linux will assume that it will link to jemalloc by default as
an allocator for executable crates. If, however, a standard library is used
which was built via `./configure --disable-jemalloc` then this will fail
because the jemalloc crate wasn't built.

While this seems somewhat reasonable as a niche situation, the same mechanism is
used for disabling jemalloc for platforms that just don't support it. For
example if the rumprun target is compiled then the sibiling Linux target *also*
doesn't have jemalloc. This is currently a problem for our cross-build nightlies
which build many targets. If rumprun is also built, it will disable jemalloc for
all targets, which isn't desired.

This commit moves the platform-specific disabling of jemalloc as hardcoded logic
into the makefiles that is scoped per-platform. This way when configuring
multiple targets **without the `--disable-jemalloc` option specified** all
targets will get jemalloc as they should.

8 years agoAuto merge of #31857 - jseyfried:fix_scoping, r=nikomatsakis
bors [Fri, 26 Feb 2016 04:38:28 +0000 (04:38 +0000)]
Auto merge of #31857 - jseyfried:fix_scoping, r=nikomatsakis

This fixes a bug (#31845) introduced in #31105 in which lexical scopes contain items from all anonymous module ancestors, even if the path to the anonymous module includes a normal module:
```rust
fn f() {
    fn g() {}
    mod foo {
        fn h() {
           g(); // This erroneously resolves on nightly
        }
    }
}
```

This is a [breaking-change] on nightly but not on stable or beta.
r? @nikomatsakis

8 years agoMake sure formatter errors are emitted by the default Write::write_fmt
Ulrik Sverdrup [Fri, 26 Feb 2016 01:53:47 +0000 (02:53 +0100)]
Make sure formatter errors are emitted by the default Write::write_fmt

Previously, if an error was returned from the formatter that did not
originate in an underlying writer error, Write::write_fmt would return
successfully even if the formatting did not complete (was interrupted by
an `fmt::Error` return).

Now we choose to emit an io::Error with kind Other for formatter errors.

Since this may reveal error returns from `write!()` and similar that
previously passed silently, it's a kind of a [breaking-change].

8 years agoAuto merge of #31749 - nikomatsakis:compiletest-subdir, r=alexcrichton
bors [Fri, 26 Feb 2016 00:53:38 +0000 (00:53 +0000)]
Auto merge of #31749 - nikomatsakis:compiletest-subdir, r=alexcrichton

You can now group tests into directories like `run-pass/borrowck` or `compile-fail/borrowck`. By default, all `.rs` files within any directory are considered tests: to ignore some directory, create a placeholder file called `compiletest-ignore-dir` (I had to do this for several existing directories).

r? @alexcrichton
cc @brson

8 years agosuggest: Put the `use` in suggested code inside the quotes
Ulrik Sverdrup [Fri, 26 Feb 2016 00:23:07 +0000 (01:23 +0100)]
suggest: Put the `use` in suggested code inside the quotes

Change import a trait suggestion from:

   help: candidate #1: use `std::io::Write`

to

   help: candidate #1: `use std::io::Write`

so that the code can be copied directly.

8 years agodoc: follow the idiom of adding a trailing comma
Tshepang Lekhonkhobe [Thu, 25 Feb 2016 21:19:47 +0000 (23:19 +0200)]
doc: follow the idiom of adding a trailing comma

8 years agodoc: that explanation was a mess
Tshepang Lekhonkhobe [Thu, 25 Feb 2016 21:14:20 +0000 (23:14 +0200)]
doc: that explanation was a mess

8 years agodoc: add missing comma
Tshepang Lekhonkhobe [Thu, 25 Feb 2016 20:52:02 +0000 (22:52 +0200)]
doc: add missing comma

8 years agoAuto merge of #30856 - mneumann:thread_local_extern, r=alexcrichton
bors [Thu, 25 Feb 2016 20:37:38 +0000 (20:37 +0000)]
Auto merge of #30856 - mneumann:thread_local_extern, r=alexcrichton

This will correctly add the thread_local attribute to the external static variable ```errno```:

```rust
extern {
     #[thread_local]
     static errno: c_int;
}
```

Before this commit, the thread_local attribute is ignored. Fixes #30795.

Thanks @alexcrichton for pointing out the solution.

8 years agoadd comment and stop creating directories in runtest
Niko Matsakis [Thu, 25 Feb 2016 19:41:52 +0000 (14:41 -0500)]
add comment and stop creating directories in runtest

8 years agocreate the required directories while gathering tests rather than during
Niko Matsakis [Thu, 25 Feb 2016 17:52:39 +0000 (12:52 -0500)]
create the required directories while gathering tests rather than during
parallel execution

8 years agoAuto merge of #31882 - Manishearth:rollup, r=Manishearth
bors [Thu, 25 Feb 2016 09:38:51 +0000 (09:38 +0000)]
Auto merge of #31882 - Manishearth:rollup, r=Manishearth

- Successful merges: #31362, #31793, #31800, #31809, #31818, #31827, #31831, #31835, #31837, #31846
- Failed merges:

8 years agoRollup merge of #31837 - mitaa:rdoc-inherent-assoc, r=alexcrichton
Manish Goregaokar [Thu, 25 Feb 2016 06:11:02 +0000 (11:41 +0530)]
Rollup merge of #31837 - mitaa:rdoc-inherent-assoc, r=alexcrichton

This effectively only records associated items from either inherent impls or trait definitions in the search-index.

fixes #31808

r? @alexcrichton

8 years agoRollup merge of #31835 - mitaa:rdoc-global-src, r=alexcrichton
Manish Goregaokar [Thu, 25 Feb 2016 06:11:02 +0000 (11:41 +0530)]
Rollup merge of #31835 - mitaa:rdoc-global-src, r=alexcrichton

fixes #26995

r? @alexcrichton

8 years agoRollup merge of #31831 - tormol:master, r=alexcrichton
Manish Goregaokar [Thu, 25 Feb 2016 06:11:02 +0000 (11:41 +0530)]
Rollup merge of #31831 - tormol:master, r=alexcrichton

The "A buffer that's too small" example was calling encode_utf**8**().

8 years agoRollup merge of #31827 - teoryn:patch-1, r=brson
Manish Goregaokar [Thu, 25 Feb 2016 06:11:02 +0000 (11:41 +0530)]
Rollup merge of #31827 - teoryn:patch-1, r=brson

8 years agoRollup merge of #31818 - GuillaumeGomez:error_display, r=brson
Manish Goregaokar [Thu, 25 Feb 2016 06:11:02 +0000 (11:41 +0530)]
Rollup merge of #31818 - GuillaumeGomez:error_display, r=brson

Fixes #31788

8 years agotranslate backslashes to forward slashes in the expected strings
Niko Matsakis [Wed, 24 Feb 2016 21:20:21 +0000 (16:20 -0500)]
translate backslashes to forward slashes in the expected strings

8 years agoDocument the null-char/null-byte escape in the reference
Georg Brandl [Thu, 25 Feb 2016 07:30:42 +0000 (08:30 +0100)]
Document the null-char/null-byte escape in the reference

It appears in the examples, but is not covered by any of the cases
in the prose description.

8 years agoRollup merge of #31800 - alexcrichton:armv6-plz, r=brson
Manish Goregaokar [Thu, 25 Feb 2016 06:11:01 +0000 (11:41 +0530)]
Rollup merge of #31800 - alexcrichton:armv6-plz, r=brson

Right now the compiler's we're using actually default to armv7/thumb2 I believe,
so this should help push them back to what the arm-unknown-linux-* targets are
for. This at least matches that clang does for the `arm-unknown-linux-gnueabihf`
target which is to map it to an armv6 architecture.

Closes #31787

8 years agoRollup merge of #31793 - alexcrichton:add-real-option-gating, r=nikomatsakis
Manish Goregaokar [Thu, 25 Feb 2016 06:11:01 +0000 (11:41 +0530)]
Rollup merge of #31793 - alexcrichton:add-real-option-gating, r=nikomatsakis

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.

8 years agoRollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakis
Manish Goregaokar [Thu, 25 Feb 2016 06:11:01 +0000 (11:41 +0530)]
Rollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakis

This PR changes the visibility of extern crate declarations to match that of items (fixes #26775).
To avoid breakage, the PR makes it a `public_in_private` lint to reexport a private extern crate, and it adds the lint `inaccessible_extern_crate` for uses of an inaccessible extern crate.

The lints can be avoided by making the appropriate `extern crate` declaration public.

8 years agomention debug-assertions
Manish Goregaokar [Thu, 25 Feb 2016 04:51:32 +0000 (10:21 +0530)]
mention debug-assertions

8 years agoPrefer 'match' pattern guard over conditional within body.
Corey Farwell [Thu, 25 Feb 2016 03:50:23 +0000 (22:50 -0500)]
Prefer 'match' pattern guard over conditional within body.

8 years agoPrefer `slice::get` over length check with indexing.
Corey Farwell [Thu, 25 Feb 2016 03:34:23 +0000 (22:34 -0500)]
Prefer `slice::get` over length check with indexing.

8 years agorand: Fix filling buffers 4 GiB or larger with OsRng::fill_bytes on Windows
Oliver Middleton [Thu, 25 Feb 2016 01:35:41 +0000 (01:35 +0000)]
rand: Fix filling buffers 4 GiB or larger with OsRng::fill_bytes on Windows

CryptGenRandom takes a DWORD (u32) for the length so it only supports
writing u32::MAX bytes at a time.

Casting the length from a usize caused truncation meaning the whole
buffer was not always filled.

8 years agoMove the borrowck run-pass/compile-fail tests into their own directories
Niko Matsakis [Thu, 18 Feb 2016 10:21:15 +0000 (05:21 -0500)]
Move the borrowck run-pass/compile-fail tests into their own directories
as a test.

8 years agoAdd compiletest-ignore-dir to existing subdirectories.
Niko Matsakis [Thu, 18 Feb 2016 10:20:52 +0000 (05:20 -0500)]
Add compiletest-ignore-dir to existing subdirectories.

8 years agoRecurse to find test files in any subdirectory of the base path. If a
Niko Matsakis [Thu, 18 Feb 2016 10:20:16 +0000 (05:20 -0500)]
Recurse to find test files in any subdirectory of the base path.  If a
subdirectory contains `compiletest-ignore-dir`, then ignore it.

8 years agoGeneralize from passing around a single path to the test file to passing
Niko Matsakis [Thu, 18 Feb 2016 10:19:19 +0000 (05:19 -0500)]
Generalize from passing around a single path to the test file to passing
around a set of paths called `TestPaths`

This commit is not quite standalone; it basically contains all the
borrowing plumbing bits, the interesting stuff comes in the next commit.

8 years agoAuto merge of #31873 - Manishearth:rollup, r=Manishearth
bors [Wed, 24 Feb 2016 22:58:28 +0000 (22:58 +0000)]
Auto merge of #31873 - Manishearth:rollup, r=Manishearth

- Successful merges: #31677, #31784, #31839, #31842, #31843, #31850, #31863, #31868, #31870
- Failed merges:

8 years agoRollup merge of #31870 - ivan:filter-explain, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:11 +0000 (04:21 +0530)]
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 :-)

8 years agoRollup merge of #31868 - fhahn:capitalize-Rust, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:11 +0000 (04:21 +0530)]
Rollup merge of #31868 - fhahn:capitalize-Rust, r=steveklabnik

8 years agoRollup merge of #31863 - matklad:clarify-reference, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:11 +0000 (04:21 +0530)]
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

8 years agoRollup merge of #31850 - GuillaumeGomez:vec-doc, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:11 +0000 (04:21 +0530)]
Rollup merge of #31850 - GuillaumeGomez:vec-doc, r=steveklabnik

r? @steveklabnik
cc @mbrubeck

8 years agoRollup merge of #31843 - Wafflespeanut:bool_docs, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:10 +0000 (04:21 +0530)]
Rollup merge of #31843 - Wafflespeanut:bool_docs, r=steveklabnik

fixes #29332

r? @steveklabnik

8 years agoRollup merge of #31842 - dileepbapat:master, r=alexcrichton
Manish Goregaokar [Wed, 24 Feb 2016 22:51:10 +0000 (04:21 +0530)]
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

8 years agoRollup merge of #31839 - mitaa:rdoc-idx-self, r=alexcrichton
Manish Goregaokar [Wed, 24 Feb 2016 22:51:10 +0000 (04:21 +0530)]
Rollup merge of #31839 - mitaa:rdoc-idx-self, r=alexcrichton

fixes #31598

r? @alexcrichton

8 years agoRollup merge of #31784 - urschrei:chunks_doc, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:10 +0000 (04:21 +0530)]
Rollup merge of #31784 - urschrei:chunks_doc, r=steveklabnik

Closes #31773

r? @steveklabnik

8 years agoRollup merge of #31677 - ivan:doc-vtable, r=steveklabnik
Manish Goregaokar [Wed, 24 Feb 2016 22:51:10 +0000 (04:21 +0530)]
Rollup merge of #31677 - ivan:doc-vtable, r=steveklabnik

I sure hope this fix is right

cc @steveklabnik

8 years agoAdd more explanation on vec type
Guillaume Gomez [Sun, 21 Feb 2016 02:00:50 +0000 (03:00 +0100)]
Add more explanation on vec type

8 years agobook: Explain better why the filter closure gets a reference
Ivan Kozik [Wed, 24 Feb 2016 20:00:58 +0000 (20:00 +0000)]
book: Explain better why the filter closure gets a reference

8 years agorustc: Refactor how unstable flags are handled
Alex Crichton [Sat, 20 Feb 2016 06:03:54 +0000 (22:03 -0800)]
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.

8 years agoCapitalize some occurences of Rust in documentation
Florian Hahn [Wed, 24 Feb 2016 18:55:49 +0000 (19:55 +0100)]
Capitalize some occurences of Rust in documentation

8 years agoFix source-links for files with absolute-paths
mitaa [Tue, 23 Feb 2016 06:52:43 +0000 (07:52 +0100)]
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.

8 years agoAllow creation of src-links for device files
mitaa [Wed, 24 Feb 2016 18:40:16 +0000 (19:40 +0100)]
Allow creation of src-links for device files

8 years agostd: Cap read/write limits on Windows networking
Alex Crichton [Wed, 24 Feb 2016 07:22:58 +0000 (23:22 -0800)]
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

8 years agoreference: clarify use declaration location
Aleksey Kladov [Wed, 24 Feb 2016 16:13:31 +0000 (19:13 +0300)]
reference: clarify use declaration location

8 years agoAuto merge of #31832 - mmatyas:update_libc_16f1c19, r=alexcrichton
bors [Wed, 24 Feb 2016 13:32:24 +0000 (13:32 +0000)]
Auto merge of #31832 - mmatyas:update_libc_16f1c19, r=alexcrichton

This fixes the `aarch64-linux-android` build (#31595).

8 years agoImprove unused import detection
Jeffrey Seyfried [Wed, 24 Feb 2016 08:46:25 +0000 (08:46 +0000)]
Improve unused import detection

8 years agoUncapitalize note messages
Jeffrey Seyfried [Wed, 24 Feb 2016 08:47:45 +0000 (08:47 +0000)]
Uncapitalize note messages

8 years agoAuto merge of #31828 - frewsxcv:sepseq-associated-function, r=alexcrichton
bors [Wed, 24 Feb 2016 11:29:31 +0000 (11:29 +0000)]
Auto merge of #31828 - frewsxcv:sepseq-associated-function, r=alexcrichton

None

8 years agoUse a character that requires two `u16`s in the examples for `char.encode_utf16()`
tormol [Wed, 24 Feb 2016 05:27:00 +0000 (06:27 +0100)]
Use a character that requires two `u16`s in the examples for `char.encode_utf16()`

8 years agoAuto merge of #31782 - pitdicker:clean_out_windows_c, r=alexcrichton
bors [Wed, 24 Feb 2016 07:21:44 +0000 (07:21 +0000)]
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.

8 years agoResolve: include normal modules in the ribs
Jeffrey Seyfried [Wed, 24 Feb 2016 04:48:31 +0000 (04:48 +0000)]
Resolve: include normal modules in the ribs

8 years agoAuto merge of #31778 - aturon:snapshot, r=alexcrichton
bors [Wed, 24 Feb 2016 04:42:09 +0000 (04:42 +0000)]
Auto merge of #31778 - aturon:snapshot, r=alexcrichton

r? @alexcrichton

8 years agoAuto merge of #31855 - alexcrichton:fix-tidy, r=nikomatsakis
bors [Wed, 24 Feb 2016 01:55:45 +0000 (01:55 +0000)]
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.

8 years agomk: Tweak tidy script to work on Windows python
Alex Crichton [Wed, 24 Feb 2016 01:42:50 +0000 (17:42 -0800)]
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.

8 years agoWarn instead of error when using an inaccessable extern crate
Jeffrey Seyfried [Fri, 12 Feb 2016 06:42:44 +0000 (06:42 +0000)]
Warn instead of error when using an inaccessable extern crate

8 years agoWarn when reexporting a private extern crate
Jeffrey Seyfried [Tue, 2 Feb 2016 09:39:59 +0000 (09:39 +0000)]
Warn when reexporting a private extern crate

8 years agoFix the visibility of extern crate declarations and stop warning on pub extern crate
Jeffrey Seyfried [Tue, 2 Feb 2016 20:21:24 +0000 (20:21 +0000)]
Fix the visibility of extern crate declarations and stop warning on pub extern crate

8 years agoShow associated types in inherent impls
mitaa [Tue, 23 Feb 2016 09:24:53 +0000 (10:24 +0100)]
Show associated types in inherent impls

8 years agoDon't show associated consts from trait impls
mitaa [Tue, 23 Feb 2016 08:52:44 +0000 (09:52 +0100)]
Don't show associated consts from trait impls

8 years agoAuto merge of #30614 - arcnmx:cstr-bytes, r=alexcrichton
bors [Tue, 23 Feb 2016 20:08:54 +0000 (20:08 +0000)]
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?

8 years agoUpdated the primitive docs for bool
Ravi Shankar [Tue, 23 Feb 2016 13:35:35 +0000 (19:05 +0530)]
Updated the primitive docs for bool

8 years agoAuto merge of #31751 - gkoz:os_str_path_cmp, r=aturon
bors [Tue, 23 Feb 2016 17:21:18 +0000 (17:21 +0000)]
Auto merge of #31751 - gkoz:os_str_path_cmp, r=aturon

8 years agoCStr::from_bytes_with_nul tests
arcnmx [Tue, 23 Feb 2016 06:37:21 +0000 (01:37 -0500)]
CStr::from_bytes_with_nul tests

8 years ago#31820 - Utilize `if..let` instead of single `match` branch
dileepb [Tue, 23 Feb 2016 15:48:07 +0000 (21:18 +0530)]
#31820 - Utilize `if..let` instead of single `match` branch

8 years agoRegister new snapshots
Aaron Turon [Sat, 20 Feb 2016 00:08:36 +0000 (16:08 -0800)]
Register new snapshots

8 years agoLink cstr from_bytes to tracking issue
arcnmx [Tue, 23 Feb 2016 06:36:50 +0000 (01:36 -0500)]
Link cstr from_bytes to tracking issue

8 years agoAuto merge of #31825 - ollie27:win_lfs, r=alexcrichton
bors [Tue, 23 Feb 2016 14:09:35 +0000 (14:09 +0000)]
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.

8 years agoDon't record self parameter for static methods
mitaa [Tue, 23 Feb 2016 11:04:27 +0000 (12:04 +0100)]
Don't record self parameter for static methods

8 years agoAuto merge of #31447 - nagisa:mir-cfgsimplify-bitvec, r=nikomatsakis
bors [Tue, 23 Feb 2016 11:12:08 +0000 (11:12 +0000)]
Auto merge of #31447 - nagisa:mir-cfgsimplify-bitvec, r=nikomatsakis

BitVector is more space efficient.

8 years ago[MIR] Change SimplifyCfg pass to use bitvec
Simonas Kazlauskas [Sun, 31 Jan 2016 17:17:15 +0000 (19:17 +0200)]
[MIR] Change SimplifyCfg pass to use bitvec

BitVector is much more space efficient.

8 years agoAuto merge of #31822 - petrochenkov:derive, r=alexcrichton
bors [Tue, 23 Feb 2016 08:07:03 +0000 (08:07 +0000)]
Auto merge of #31822 - petrochenkov:derive, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/29548

8 years agoRename CStr::from_bytes to from_bytes_with_nul
arcnmx [Mon, 25 Jan 2016 00:51:19 +0000 (19:51 -0500)]
Rename CStr::from_bytes to from_bytes_with_nul

8 years agoCStr::from_bytes
arcnmx [Tue, 29 Dec 2015 18:41:43 +0000 (13:41 -0500)]
CStr::from_bytes

8 years agoAuto merge of #31814 - petevine:master, r=alexcrichton
bors [Tue, 23 Feb 2016 05:17:08 +0000 (05:17 +0000)]
Auto merge of #31814 - petevine:master, r=alexcrichton

The `vfp2` option was a leftover from `armv6` compatibility features of the original armhf target.
Gcc defaults to `vfp3`on `armv7` hard-float linux systems so we should make it the default for rustc too.

8 years agoCorrect char.encode_utf16() documentation
tormol [Tue, 23 Feb 2016 04:55:49 +0000 (05:55 +0100)]
Correct char.encode_utf16() documentation

The "A buffer that's too small" example was calling encode_utf8().