]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agorustbuild: Remove extra rustc flags
Alex Crichton [Thu, 25 Feb 2016 07:51:36 +0000 (23:51 -0800)]
rustbuild: Remove extra rustc flags

These should all no longer be necessary as they've been folded into the
compiler.

8 years agorustbuild: Add steps for linking a sysroot
Alex Crichton [Thu, 25 Feb 2016 07:50:32 +0000 (23:50 -0800)]
rustbuild: Add steps for linking a sysroot

When cross compiling for a new host, we can't actually run the host compiler to
generate its own libs. In theory, however, all stage2 compilers (for any host)
will produce the same libraries, so we just require the build compiler to
produce the necessary host libraries and then we link those into place.

8 years agorustbuild: Document what steps are
Alex Crichton [Thu, 25 Feb 2016 05:12:42 +0000 (21:12 -0800)]
rustbuild: Document what steps are

8 years agorustbuild: Compile with the build compiler
Alex Crichton [Thu, 25 Feb 2016 03:04:35 +0000 (19:04 -0800)]
rustbuild: Compile with the build compiler

This switches the defaults to ensure that everything is built with the build
compiler rather than the host compiler itself (which we're not guaranteed to be
able to run)

8 years agorustbuild: Move assembling rustc to its own step
Alex Crichton [Thu, 25 Feb 2016 03:03:48 +0000 (19:03 -0800)]
rustbuild: Move assembling rustc to its own step

Right now it's implicitly done as part of building the compiler, but this was
intended to be a standalone step to ensure we tracked what built what.

8 years agorustbuild: Fix a copy/paste error
Alex Crichton [Thu, 25 Feb 2016 01:13:23 +0000 (17:13 -0800)]
rustbuild: Fix a copy/paste error

Fixes `--step librustc`

8 years agorustbuild: Enable cross-compiling LLVM
Alex Crichton [Thu, 25 Feb 2016 01:09:17 +0000 (17:09 -0800)]
rustbuild: Enable cross-compiling LLVM

Currently all multi-host builds assume the the build platform can run the
`llvm-config` binary generated for each host platform we're creating a compiler
for. Unfortunately this assumption isn't always true when cross compiling, so we
need to handle this case.

This commit alters the build script of `rustc_llvm` to understand when it's
running an `llvm-config` which is different than the platform we're targeting for.

8 years agorustbuild: Fix compiler-rt build on gnueabihf
Alex Crichton [Wed, 24 Feb 2016 22:31:18 +0000 (14:31 -0800)]
rustbuild: Fix compiler-rt build on gnueabihf

Needs a different target to get built and also we apparently need to appease the
C++ compiler somehow.

8 years agorustbuild: Sync changes to Cargo.lock
Alex Crichton [Wed, 24 Feb 2016 22:17:21 +0000 (14:17 -0800)]
rustbuild: Sync changes to Cargo.lock

8 years agorustbuild: Only pass RUSTC_FLAGS to target compiles
Alex Crichton [Wed, 24 Feb 2016 22:16:54 +0000 (14:16 -0800)]
rustbuild: Only pass RUSTC_FLAGS to target compiles

These flags aren't applicable to build scripts, and may actuall wreak havoc.

8 years agorustbuild: Enable bootstrapping new hosts
Alex Crichton [Wed, 24 Feb 2016 07:00:48 +0000 (23:00 -0800)]
rustbuild: Enable bootstrapping new hosts

This commit fixes a longstanding issue with the makefiles where all host
platforms bootstrap themselves. This commit alters the build logic for the
bootstrap to instead only bootstrap the build triple, and all other compilers
are compiled from that one compiler.

The benefit of this change is that we can cross-compile compilers which cannot
run on the build platform. For example our builders could start creating
`arm-unknown-linux-gnueabihf` compilers.

This reduces the amount of bootstrapping we do, reducing the amount of test
coverage, but overall it should largely just end in faster build times for
multi-host compiles as well as enabling a feature which can't be done today.

cc #5258

8 years agoFix windows
Steven Fackler [Sun, 28 Feb 2016 05:05:32 +0000 (21:05 -0800)]
Fix windows

Also back out keepalive support for TCP since the API is perhaps not
actually what we want. You can't read the interval on Windows, and
we should probably separate the functionality of turning keepalive on
and overriding the interval.

8 years agoAdd UDP functionality from net2
Steven Fackler [Sat, 27 Feb 2016 23:02:48 +0000 (15:02 -0800)]
Add UDP functionality from net2

8 years agoAdd TCP functionality from net2
Steven Fackler [Sat, 27 Feb 2016 22:15:19 +0000 (14:15 -0800)]
Add TCP functionality from net2

8 years agoAdd some tests
Vadim Petrochenkov [Sun, 28 Feb 2016 11:50:58 +0000 (14:50 +0300)]
Add some tests

8 years agodoc: "ref" not needed in the example
Tshepang Lekhonkhobe [Thu, 25 Feb 2016 21:21:55 +0000 (23:21 +0200)]
doc: "ref" not needed in the example

Also, `path` seems better than `p`

8 years agoAuto merge of #31902 - mitaa:rdoc-shorter, r=alexcrichton
bors [Sun, 28 Feb 2016 07:27:12 +0000 (07:27 +0000)]
Auto merge of #31902 - mitaa:rdoc-shorter, r=alexcrichton

fixes #31899

r? @alexcrichton

8 years agoAuto merge of #31942 - bluss:iter-desugar, r=steveklabnik
bors [Sat, 27 Feb 2016 22:33:29 +0000 (22:33 +0000)]
Auto merge of #31942 - bluss:iter-desugar, r=steveklabnik

Make for loop desugaring for iterators more precise

The UFCS call IntoIterator::into_iter() is used by the for loop.

8 years agoAuto merge of #31931 - Luke-Nukem:master, r=steveklabnik
bors [Sat, 27 Feb 2016 20:26:59 +0000 (20:26 +0000)]
Auto merge of #31931 - Luke-Nukem:master, r=steveklabnik

 Refinement of paragraph referenced by [this issue](https://github.com/rust-lang/rust/issues/31927).

The paragraph in question had been adjusted already, but I've made some further clarifications which should help with readability and not leave the reader any `dangling pointers`.

8 years agoAuto merge of #31915 - nagisa:mir-unpretty-fix, r=arielb1
bors [Sat, 27 Feb 2016 18:12:23 +0000 (18:12 +0000)]
Auto merge of #31915 - nagisa:mir-unpretty-fix, r=arielb1

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

8 years agoMake for loop desugaring for iterators more precise
Ulrik Sverdrup [Sat, 27 Feb 2016 16:32:20 +0000 (17:32 +0100)]
Make for loop desugaring for iterators more precise

The UFCS call IntoIterator::into_iter() is used by the for loop.

8 years agoAuto merge of #31940 - teoryn:patch-2, r=steveklabnik
bors [Sat, 27 Feb 2016 15:06:19 +0000 (15:06 +0000)]
Auto merge of #31940 - teoryn:patch-2, r=steveklabnik

See http://www.ietf.org/rfc/rfc2119.txt

8 years agoResolve ambiguous documentation
Kevin Stock [Sat, 27 Feb 2016 13:26:42 +0000 (08:26 -0500)]
Resolve ambiguous documentation

See http://www.ietf.org/rfc/rfc2119.txt

8 years agoReformat Part of 1.7 Release Notes
Pascal Hertleif [Sat, 27 Feb 2016 11:19:08 +0000 (12:19 +0100)]
Reformat Part of 1.7 Release Notes

- Use unordered nested list for stabilised APIs to improve readability
- Add link to `u32::checked_neg`
- Remove trailing back tick from BTreeMap line

8 years agoAdd test
Simonas Kazlauskas [Fri, 26 Feb 2016 16:24:04 +0000 (18:24 +0200)]
Add test

8 years agoFix MIR unpretty on failure conditions
Simonas Kazlauskas [Fri, 26 Feb 2016 16:20:47 +0000 (18:20 +0200)]
Fix MIR unpretty on failure conditions

8 years agoAuto merge of #31932 - Manishearth:rollup, r=Manishearth
bors [Sat, 27 Feb 2016 08:59:57 +0000 (08:59 +0000)]
Auto merge of #31932 - Manishearth:rollup, r=Manishearth

- Successful merges: #31909, #31918, #31922, #31926, #31928, #31929, #31930
- Failed merges:

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 agoCorrect plain-summary-line
mitaa [Fri, 26 Feb 2016 16:39:37 +0000 (17:39 +0100)]
Correct plain-summary-line

For plaintext we don't actually need to render the Markdown before
shortening the string. (and this may have led to wrong output)

8 years agoClearly separate code blocks from other blocks
mitaa [Fri, 26 Feb 2016 16:19:35 +0000 (17:19 +0100)]
Clearly separate code blocks from other blocks

For summary descriptions we need the first paragraph (adjacent lines
until a blank line) - but the rendered markdown of a code block did not
leave a blank line in the html and was thus included in the summary line.

8 years agoRollup merge of #31930 - miqid:doc, r=steveklabnik
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31930 - miqid:doc, r=steveklabnik

Hello.

I've added links for items inside of some stable methods for consistency with existing ones that already have them. Also includes minor formatting fixes.

r? @steveklabnik

8 years agoRollup merge of #31929 - dotdash:less_rallocx, r=alexcrichton
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31929 - dotdash:less_rallocx, r=alexcrichton

When foldings Substs, we map over VecPerParamSpace instances using
EnumeratedItems which does not provide an accurate size_hint()
in its Iterator implementation. This leads to quite a large number or
reallocations. Providing a suitable size_hint() implementation reduces
the time spent in item-bodies checking quite a bit.

```
crate  | before | after | ~change
-------|-------------------------
core   |  7.28s | 5.44s |   -25%
std    |  2.07s | 1.88s |  -9.2%
syntax |  8.86s | 8.30s |  -6.3%
```

8 years agoRollup merge of #31926 - llogiq:more_post, r=eddyb
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup 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 agoRollup merge of #31922 - Amanieu:relnotes17, r=brson
Manish Goregaokar [Sat, 27 Feb 2016 02:34:54 +0000 (08:04 +0530)]
Rollup merge of #31922 - Amanieu:relnotes17, r=brson

8 years agoRollup merge of #31918 - GuillaumeGomez:patch-3, r=steveklabnik
Manish Goregaokar [Sat, 27 Feb 2016 02:34:53 +0000 (08:04 +0530)]
Rollup merge of #31918 - GuillaumeGomez:patch-3, r=steveklabnik

r? @steveklabnik

Fixes #29334

8 years agoRollup merge of #31909 - benaryorg:patch-2, r=Manishearth
Manish Goregaokar [Sat, 27 Feb 2016 02:34:53 +0000 (08:04 +0530)]
Rollup merge of #31909 - benaryorg:patch-2, r=Manishearth

`continue` expression's description mentioned `break` instead of `continue`

8 years agoRefinement of paragraph referenced by [this
Luke Jones [Sat, 27 Feb 2016 01:41:38 +0000 (14:41 +1300)]
Refinement of paragraph referenced by [this
issue](https://github.com/rust-lang/rust/issues/31927)

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 agoImprove formatting of the primitive str documentation
Michael Huynh [Sat, 27 Feb 2016 00:25:31 +0000 (08:25 +0800)]
Improve formatting of the primitive str documentation

Adds extra documentation links for library types and methods to be
consistent with similar items already linked. Also includes minor
formatting fixes.

8 years agoAvoid excessive reallocations during item-bodies checking
Björn Steinbrink [Fri, 26 Feb 2016 23:53:33 +0000 (00:53 +0100)]
Avoid excessive reallocations during item-bodies checking

When foldings Substs, we map over VecPerParamSpace instances using
EnumeratedItems which does not provide an accurate size_hint()
in its Iterator implementation. This leads to quite a large number or
reallocations. Providing a suitable size_hint() implementation reduces
the time spent in item-bodies checking quite a bit.

```
crate  | before | after | ~change
-------|-------------------------
core   |  7.28s | 5.44s |   -25%
std    |  2.07s | 1.88s |  -9.2%
syntax |  8.86s | 8.30s |  -6.3%
```

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 agoFix typo in release notes
Amanieu d'Antras [Fri, 26 Feb 2016 21:21:02 +0000 (21:21 +0000)]
Fix typo in release notes

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 agoSome drive-by improvements to SanePrivacyVisitor
Vadim Petrochenkov [Fri, 26 Feb 2016 19:06:39 +0000 (22:06 +0300)]
Some drive-by improvements to SanePrivacyVisitor

Check that variant fields are not marked public by syntax extensions

8 years agoPermit `pub` items in blocks
Vadim Petrochenkov [Fri, 26 Feb 2016 18:20:56 +0000 (21:20 +0300)]
Permit `pub` items in blocks

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 agoNits and cleanups
Simonas Kazlauskas [Fri, 26 Feb 2016 12:12:28 +0000 (14:12 +0200)]
Nits and cleanups

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 agodocumentation fix
Katze [Fri, 26 Feb 2016 08:45:32 +0000 (09:45 +0100)]
documentation fix

`continue` expression's description mentioned `break` instead of `continue`

Signed-off-by: benaryorg <binary@benary.org>
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 agoUse `box` syntax in `vec!` macro
Andrew Paseltiner [Sat, 20 Feb 2016 22:47:51 +0000 (17:47 -0500)]
Use `box` syntax in `vec!` macro

Closes #28950.

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 agoAdd tests
Jeffrey Seyfried [Tue, 23 Feb 2016 00:22:52 +0000 (00:22 +0000)]
Add tests

8 years agoFix breakage in rustc_metadata
Jeffrey Seyfried [Tue, 23 Feb 2016 01:17:01 +0000 (01:17 +0000)]
Fix breakage in rustc_metadata

8 years agoFix fallout in tests
Jeffrey Seyfried [Mon, 22 Feb 2016 22:33:38 +0000 (22:33 +0000)]
Fix fallout in tests

8 years agoPrivacy check paths in resolve and typeck
Jeffrey Seyfried [Thu, 25 Feb 2016 04:40:46 +0000 (04:40 +0000)]
Privacy check paths in resolve and typeck

8 years agoRefactor Module's field extern_crate_did: Option<DefId> to extern_crate_id: Option...
Jeffrey Seyfried [Thu, 25 Feb 2016 05:23:50 +0000 (05:23 +0000)]
Refactor Module's field extern_crate_did: Option<DefId> to extern_crate_id: Option<NodeId>

8 years agoRemove `LastPrivate`
Jeffrey Seyfried [Thu, 25 Feb 2016 03:36:17 +0000 (03:36 +0000)]
Remove `LastPrivate`

8 years agoLay the groundwork for privacy checking in typeck
Jeffrey Seyfried [Thu, 25 Feb 2016 01:55:54 +0000 (01:55 +0000)]
Lay the groundwork for privacy checking in typeck

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 agofix drop of fat ptrs
Niko Matsakis [Thu, 25 Feb 2016 21:56:11 +0000 (16:56 -0500)]
fix drop of fat ptrs

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 agoAdd f32 and f64 examples warning
Guillaume Gomez [Fri, 26 Feb 2016 18:46:00 +0000 (19:46 +0100)]
Add f32 and f64 examples warning

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.