]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoBetter handling of tab in error
Seo Sanghyeon [Mon, 9 May 2016 14:09:25 +0000 (23:09 +0900)]
Better handling of tab in error

8 years agoAuto merge of #33365 - birkenfeld:makehelpfix, r=alexcrichton
bors [Mon, 9 May 2016 03:07:10 +0000 (20:07 -0700)]
Auto merge of #33365 - birkenfeld:makehelpfix, r=alexcrichton

Makefile: there is only one tidy target now

Also removes mention of tidy.py from the tidy sources.

8 years agoAuto merge of #33360 - alexcrichton:rustbuild-dox, r=brson
bors [Mon, 9 May 2016 00:58:54 +0000 (17:58 -0700)]
Auto merge of #33360 - alexcrichton:rustbuild-dox, r=brson

rustbuild: Document many more parts of the build

This commit expands the bootstrap build system's `README.md` as well as ensuring
that all API documentation is present and up-to-date. Additionally a new
`config.toml.example` file is checked in with commented out versions of all
possible configuration values.

8 years agoAuto merge of #33288 - cyplo:32834_retry_download, r=alexcrichton
bors [Sun, 8 May 2016 21:57:57 +0000 (14:57 -0700)]
Auto merge of #33288 - cyplo:32834_retry_download, r=alexcrichton

Get a file during bootstrap to a temp location first.

When downloading a file in the bootstrap phase - get it to a temp
location first. Verify it there and only if downloaded properly move it
to the `cache` directory.

This should prevent `make` being stuck if the download was interrupted
or otherwise corrupted, as per discussion in #32834

The temporary files are deleted in case of an exception.

I was looking for some unit/integration tests around this and couldn't find any - presumably because this is being tested by just Travis launching it ? Let me know if it would be good to try to write tests around this. Thanks !

8 years agoAuto merge of #33414 - Nercury:master, r=alexcrichton
bors [Sun, 8 May 2016 16:13:19 +0000 (09:13 -0700)]
Auto merge of #33414 - Nercury:master, r=alexcrichton

Add armv7-linux-androideabi target

This PR adds `armv7-linux-androideabi` target that matches `armeabi-v7a` Android ABI, ~~downscales `arm-linux-androideabi` target to match `armeabi` Android ABI~~ (TBD later if needed).

This should allow us to get the best performance from every [Android ABI level](http://developer.android.com/ndk/guides/abis.html).

Currently existing target `arm-linux-androideabi` started gaining features out of the supported range of [android `armeabi`](http://developer.android.com/ndk/guides/abis.html). While android compiler does not use a different target for later supported `armv7` architecture, it has distinct ABI name `armeabi-v7a`. We decided to add rust target `armv7-linux-androideabi` to match it.

Note that `NEON`, `VFPv3-D32`, and `ThumbEE` instruction sets are not added, because not all android devices are guaranteed to support all or some of these, and [their availability should be checked at runtime](http://developer.android.com/ndk/guides/abis.html#v7a).

~~This reduces performance of existing `arm-linux-androideabi` and may make it _much_ slower (we are talking more than order of magnitude in some random ad-hoc fp benchmark that I did).~~

Part of #33278.

8 years agoAuto merge of #33494 - Manishearth:rollup, r=Manishearth
bors [Sun, 8 May 2016 14:04:17 +0000 (07:04 -0700)]
Auto merge of #33494 - Manishearth:rollup, r=Manishearth

Rollup of 8 pull requests

- Successful merges: #33369, #33373, #33404, #33406, #33420, #33424, #33426, #33473
- Failed merges:

8 years agoRollup merge of #33426 - sfackler:try-from, r=aturon
Manish Goregaokar [Sun, 8 May 2016 05:08:14 +0000 (22:08 -0700)]
Rollup merge of #33426 - sfackler:try-from, r=aturon

Implement RFC 1542

cc #33417

r? @aturon

8 years agoRollup merge of #33424 - semarie:dist, r=alexcrichton
Manish Goregaokar [Sun, 8 May 2016 05:08:14 +0000 (22:08 -0700)]
Rollup merge of #33424 - semarie:dist, r=alexcrichton

make dist: specify the archive file as stdout

If the `-f` option isn't given, GNU tar will use environment variable
`TAPE` first, and next use the compiled-in default, which isn't
necessary `stdout` (it is the tape device `/dev/rst0` under OpenBSD for
example).

8 years agoRollup merge of #33420 - durka:patch-20, r=alexcrichton
Manish Goregaokar [Sun, 8 May 2016 05:08:14 +0000 (22:08 -0700)]
Rollup merge of #33420 - durka:patch-20, r=alexcrichton

implement RFC 1521

Adds documentation to Clone, specifying that Copy types should have a trivial Clone impl.

Fixes #33416.

I tried to use "should" and "must" as defined [here](https://tools.ietf.org/html/rfc2119).

cc @ubsan

8 years agoRollup merge of #33406 - Manishearth:diag-improve-const-let, r=GuillaumeGomez
Manish Goregaokar [Sun, 8 May 2016 05:08:13 +0000 (22:08 -0700)]
Rollup merge of #33406 - Manishearth:diag-improve-const-let, r=GuillaumeGomez

Improve diagnostics for constants being used in irrefutable patterns

It's pretty confusing and this error triggers in resolve only when "shadowing" a const, so let's make that clearer.

r? @steveklabnik

8 years agoRollup merge of #33404 - gsquire:cargo-lock, r=alexcrichton
Manish Goregaokar [Sun, 8 May 2016 05:08:13 +0000 (22:08 -0700)]
Rollup merge of #33404 - gsquire:cargo-lock, r=alexcrichton

Cargo lock tidy check

A rebased PR for #32901

8 years agoRollup merge of #33373 - birkenfeld:issue-32555, r=bluss
Manish Goregaokar [Sun, 8 May 2016 05:08:13 +0000 (22:08 -0700)]
Rollup merge of #33373 - birkenfeld:issue-32555, r=bluss

rustdoc: use btree map for where clauses

to get more reproducible output.

Fixes: #32555
I've looked at the other uses of HashMap in rustdoc, and they seem ok to (i.e. they use `iter()` and related only for constructing a new map, or when the output goes into independent files).

Not sure what the cause of #24473 is, it shouldn't be where clauses, but maybe it was also fixed inbetween since May 2015.

8 years agoRollup merge of #33369 - nikomatsakis:graceful-empty-span, r=jntrnr
Manish Goregaokar [Sun, 8 May 2016 05:08:13 +0000 (22:08 -0700)]
Rollup merge of #33369 - nikomatsakis:graceful-empty-span, r=jntrnr

degrade gracefully with empty spans

In https://github.com/rust-lang/rust/pull/32756, we solved the final test failure, but digging more into it the handling of that scenario could be better. The error was caused by an empty span supplied by the parser representing EOF. This patch checks that we cope more gracefully with such spans:

r? @jonathandturner

8 years agoAuto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrc
bors [Sun, 8 May 2016 11:50:27 +0000 (04:50 -0700)]
Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrc

Warn unused trait imports, rebased

Rebase of #30021.

Fix #25730.

8 years agoAuto merge of #33403 - alexcrichton:consistent-env, r=brson
bors [Sun, 8 May 2016 09:41:50 +0000 (02:41 -0700)]
Auto merge of #33403 - alexcrichton:consistent-env, r=brson

rustc: Change target_env for ARM targets to `gnu`

Right now they're `gnueabihf` and `gnueabi`, but when adding new platforms like
musl on ARM it's unfortunate to have to test for all three (`musl`, `musleabi`,
and `musleabihf`). This PR switches everything currently to `gnu`, and the new
musl targets can also use `musl` when they land.

Closes #33244

8 years agoRemove sha256 file only if present.
Cyryl Płotnicki-Chudyk [Sun, 8 May 2016 08:00:36 +0000 (10:00 +0200)]
Remove sha256 file only if present.

8 years agoBetter error handling for bootstrap file downloads.
Cyryl Płotnicki-Chudyk [Sun, 8 May 2016 07:54:50 +0000 (09:54 +0200)]
Better error handling for bootstrap file downloads.

Remove the temp files if something goes wrong.

8 years agoAuto merge of #33130 - eddyb:mir-const, r=nikomatsakis
bors [Sun, 8 May 2016 07:31:40 +0000 (00:31 -0700)]
Auto merge of #33130 - eddyb:mir-const, r=nikomatsakis

Implement constant support in MIR.

All of the intended features in `trans::consts` are now supported by `mir::constant`.
The implementation is considered a temporary measure until `miri` replaces it.

A `-Z orbit` bootstrap build will only translate LLVM IR from AST for `#[rustc_no_mir]` functions.

Furthermore, almost all checks of constant expressions have been moved to MIR.
In non-`const` functions, trees of temporaries are promoted, as per RFC 1414 (rvalue promotion).
Promotion before MIR borrowck would allow reasoning about promoted values' lifetimes.

The improved checking comes at the cost of four `[breaking-change]`s:
* repeat counts must contain a constant expression, e.g.:
`let arr = [0; { println!("foo"); 5 }];` used to be allowed (it behaved like `let arr = [0; 5];`)
* dereference of a reference to a `static` cannot be used in another `static`, e.g.:
`static X: [u8; 1] = [1]; static Y: u8 = (&X)[0];` was unintentionally allowed before
* the type of a `static` *must* be `Sync`, irrespective of the initializer, e.g.
`static FOO: *const T = &BAR;` worked as `&T` is `Sync`, but it shouldn't because `*const T` isn't
* a `static` cannot wrap `UnsafeCell` around a type that *may* need drop, e.g.
`static X: MakeSync<UnsafeCell<Option<String>>> = MakeSync(UnsafeCell::new(None));`
was previously allowed based on the fact `None` alone doesn't need drop, but in `UnsafeCell`
it can be later changed to `Some(String)` which *does* need dropping

The drop restrictions are relaxed by RFC 1440 (#33156), which is implemented, but feature-gated.
However, creating `UnsafeCell` from constants is unstable, so users can just enable the feature gate.

8 years agotrans: handle string literal reborrows.
Eduard Burtescu [Sat, 7 May 2016 21:28:52 +0000 (00:28 +0300)]
trans: handle string literal reborrows.

8 years agoAlways remove tmp/partitioning-tests before check-codegen-units to work around #33435.
Eduard Burtescu [Sat, 7 May 2016 20:44:52 +0000 (23:44 +0300)]
Always remove tmp/partitioning-tests before check-codegen-units to work around #33435.

8 years agoAuto merge of #33487 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 7 May 2016 19:36:18 +0000 (12:36 -0700)]
Auto merge of #33487 - steveklabnik:rollup, r=steveklabnik

Rollup of 20 pull requests

- Successful merges: #33256, #33283, #33313, #33314, #33326, #33336, #33382, #33384, #33402, #33409, #33410, #33412, #33428, #33430, #33437, #33438, #33439, #33442, #33456, #33459
- Failed merges:

8 years agoRollup merge of #33459 - frewsxcv:patch-29, r=guillaumegomez
Steve Klabnik [Sat, 7 May 2016 19:35:19 +0000 (15:35 -0400)]
Rollup merge of #33459 - frewsxcv:patch-29, r=guillaumegomez

Indicate struct names are code-like in doc-comment.

8 years agoRollup merge of #33456 - CryZe:barrier-wait-docs, r=GuillaumeGomez
Steve Klabnik [Sat, 7 May 2016 19:35:19 +0000 (15:35 -0400)]
Rollup merge of #33456 - CryZe:barrier-wait-docs, r=GuillaumeGomez

Fix Typo in Barrier::wait documentation

This should be `have` instead of `has`.

8 years agoRollup merge of #33442 - tshepang:trim, r=steveklabnik
Steve Klabnik [Sat, 7 May 2016 19:35:19 +0000 (15:35 -0400)]
Rollup merge of #33442 - tshepang:trim, r=steveklabnik

doc: trim some needless code

8 years agoRollup merge of #33439 - birkenfeld:ip-rfc-refs, r=steveklabnik
Steve Klabnik [Sat, 7 May 2016 19:35:19 +0000 (15:35 -0400)]
Rollup merge of #33439 - birkenfeld:ip-rfc-refs, r=steveklabnik

doc: make RFC references consistent

Always add a space and end sentence with a full stop.

8 years agoRollup merge of #33438 - birkenfeld:dup-words, r=steveklabnik
Steve Klabnik [Sat, 7 May 2016 19:35:19 +0000 (15:35 -0400)]
Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnik

Fix some some duplicate words.

8 years agoRollup merge of #33437 - brson:trips, r=Manishearth
Steve Klabnik [Sat, 7 May 2016 19:35:18 +0000 (15:35 -0400)]
Rollup merge of #33437 - brson:trips, r=Manishearth

doc: Update reference with better description of target_env

The definition of this value recently changed slightly. It no
longer corresponds directly to the target triple.

Also shuffled things around to make the order of cfg descriptions more
logical and added text related them to the target triple.

cc #33403

8 years agoRollup merge of #33430 - phil-opp:patch-1, r=alexcrichton
Steve Klabnik [Sat, 7 May 2016 19:35:18 +0000 (15:35 -0400)]
Rollup merge of #33430 - phil-opp:patch-1, r=alexcrichton

[Doc] Default cpu is "generic" (and not "default")

See [line 305](https://github.com/phil-opp/rust/blob/a22ca2872ef6782306012e6817dc4b8b778c43e9/src/librustc_back/target/mod.rs#L305).

8 years agoRollup merge of #33428 - fiveop:wrapping_example, r=steveklabnik
Steve Klabnik [Sat, 7 May 2016 19:35:18 +0000 (15:35 -0400)]
Rollup merge of #33428 - fiveop:wrapping_example, r=steveklabnik

Add an example to Wrapping's documentation.

Such an example would have helped me understand `Wrapping` quicker.

r? @steveklabnik

8 years agoRollup merge of #33412 - cramertj:E0389, r=Manishearth
Steve Klabnik [Sat, 7 May 2016 19:35:18 +0000 (15:35 -0400)]
Rollup merge of #33412 - cramertj:E0389, r=Manishearth

Add detailed error explanation for E0389

Part of #32777

8 years agoRollup merge of #33410 - GuillaumeGomez:explain, r=Manishearth
Steve Klabnik [Sat, 7 May 2016 19:35:18 +0000 (15:35 -0400)]
Rollup merge of #33410 - GuillaumeGomez:explain, r=Manishearth

Remove rust flags from doc block

Fixes #33405

r? @Manishearth

8 years agoRollup merge of #33409 - kindlychung:patch-2, r=steveklabnik
Steve Klabnik [Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)]
Rollup merge of #33409 - kindlychung:patch-2, r=steveklabnik

errors in the doc

8 years agoRollup merge of #33402 - shepmaster:copied-variable-name, r=Manishearth
Steve Klabnik [Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)]
Rollup merge of #33402 - shepmaster:copied-variable-name, r=Manishearth

Replace copy-pasted variable name with relevant one

8 years agoRollup merge of #33384 - cramertj:E0506, r=arielb1
Steve Klabnik [Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)]
Rollup merge of #33384 - cramertj:E0506, r=arielb1

Add detailed error explanation for E0506

Part of #32777

8 years agoRollup merge of #33382 - birkenfeld:issue-30416, r=alexcrichton
Steve Klabnik [Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)]
Rollup merge of #33382 - birkenfeld:issue-30416, r=alexcrichton

rustdoc: add "src" links to individual impls

Since these impls can be scattered around quite a bit, it is nice to be able to jump to the location where individual methods and trait impls are defined.

NOTE: this needs an update to the CSS, which I'd like to leave for whoever is the "rustdoc frontend champion". The new [src] links are currently too large and bold. Also, the interaction with the "since version X" annotations is not good.

Fixes: #30416
8 years agoRollup merge of #33336 - birkenfeld:issue-27361, r=sfackler
Steve Klabnik [Sat, 7 May 2016 19:35:17 +0000 (15:35 -0400)]
Rollup merge of #33336 - birkenfeld:issue-27361, r=sfackler

parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: #27361
8 years agoRollup merge of #33326 - birkenfeld:issue-33321, r=GuillaumeGomez
Steve Klabnik [Sat, 7 May 2016 19:35:16 +0000 (15:35 -0400)]
Rollup merge of #33326 - birkenfeld:issue-33321, r=GuillaumeGomez

std::thread docs: spawn() does not return a Thread anymore

Also move the "Thread type" section down a bit, since it is not so important anymore.

Fixes: #33321
8 years agoRollup merge of #33314 - alexcrichton:fix-enable-ccache, r=pnkfelix
Steve Klabnik [Sat, 7 May 2016 19:35:16 +0000 (15:35 -0400)]
Rollup merge of #33314 - alexcrichton:fix-enable-ccache, r=pnkfelix

mk: Fix building with --enable-ccache

We will no longer use `ccache` in the makefiles for our local dependencies like
miniz, but they're so small anyway it doesn't really matter.

Closes #33285

8 years agoRollup merge of #33313 - birkenfeld:depgraph-panic, r=nikomatsakis
Steve Klabnik [Sat, 7 May 2016 19:35:16 +0000 (15:35 -0400)]
Rollup merge of #33313 - birkenfeld:depgraph-panic, r=nikomatsakis

dep_graph: avoid panicking in thread when channel closed

On my system, when the processor is already loaded, and I try to
run the test suite, e.g. compile-fail/dep-graph-assoc-type-trans.rs
fails because of undecodable JSON.

Running the compiler manually, I can see that the dep graph thread
panics (and puts non-JSON on stderr) while `send`ing on `swap_out`,
presumably because the other end has already quit.  I think that in
this case, we can just gracefully exit the thread.

8 years agoRollup merge of #33283 - GuillaumeGomez:process_doc, r=steveklabnik
Steve Klabnik [Sat, 7 May 2016 19:35:16 +0000 (15:35 -0400)]
Rollup merge of #33283 - GuillaumeGomez:process_doc, r=steveklabnik

Add process types documentation

Part of #29370.

r? @steveklabnik

8 years agoRollup merge of #33256 - pnkfelix:add-rustc-specific-tags-files, r=nikomatsakis
Steve Klabnik [Sat, 7 May 2016 19:35:15 +0000 (15:35 -0400)]
Rollup merge of #33256 - pnkfelix:add-rustc-specific-tags-files, r=nikomatsakis

Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets

Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets, (re-)including rustc source.

8 years agotrans: support simd_shuffle using MIR constants for indices.
Eduard Burtescu [Tue, 26 Apr 2016 20:54:38 +0000 (23:54 +0300)]
trans: support simd_shuffle using MIR constants for indices.

8 years agoImplement RFC 1440 "Allow Drop types in statics/const functions".
Eduard Burtescu [Thu, 5 May 2016 05:11:28 +0000 (08:11 +0300)]
Implement RFC 1440 "Allow Drop types in statics/const functions".

8 years agotest: adjust for the move to MIR-based const checking.
Eduard Burtescu [Mon, 2 May 2016 22:57:35 +0000 (01:57 +0300)]
test: adjust for the move to MIR-based const checking.

8 years agomir: qualify and promote constants.
Eduard Burtescu [Sat, 7 May 2016 16:14:28 +0000 (19:14 +0300)]
mir: qualify and promote constants.

8 years agoImplement RFC 1542
Steven Fackler [Thu, 5 May 2016 05:42:14 +0000 (22:42 -0700)]
Implement RFC 1542

cc #33417

8 years agoAuto merge of #33359 - tamird:consolidate-musl, r=alexcrichton
bors [Sat, 7 May 2016 14:59:28 +0000 (07:59 -0700)]
Auto merge of #33359 - tamird:consolidate-musl, r=alexcrichton

rustc_back: use a common musl base

extracted from #33327.

cc #33189.

r? @alexcrichton

8 years agoCheck for both arm and armv7 android targets in runtest.
Nerijus Arlauskas [Wed, 4 May 2016 22:10:29 +0000 (01:10 +0300)]
Check for both arm and armv7 android targets in runtest.

8 years agoAdd armv7-linux-androideabi target.
Nerijus Arlauskas [Wed, 4 May 2016 22:08:14 +0000 (01:08 +0300)]
Add armv7-linux-androideabi target.

8 years agoAuto merge of #33333 - birkenfeld:issue-30318, r=Manishearth
bors [Sat, 7 May 2016 10:01:44 +0000 (03:01 -0700)]
Auto merge of #33333 - birkenfeld:issue-30318, r=Manishearth

parser: show a helpful note on unexpected inner comment

Fixes: #30318.
8 years agoAuto merge of #33328 - nrc:highlight-api, r=alexcrichton
bors [Sat, 7 May 2016 07:52:51 +0000 (00:52 -0700)]
Auto merge of #33328 - nrc:highlight-api, r=alexcrichton

rustdoc: refactor rustdoc syntax highlighting for a more flexible API

Clients can now use the rustdoc syntax highlighter to classify tokens, then use that info to put together there own HTML (or whatever), rather than just having static HTML output.

8 years agoAuto merge of #33311 - birkenfeld:issue33262, r=nrc
bors [Sat, 7 May 2016 05:39:43 +0000 (22:39 -0700)]
Auto merge of #33311 - birkenfeld:issue33262, r=nrc

parser: fix suppression of syntax errors in range RHS

Invalid expressions on the RHS were just swallowed without generating an error.  The new version more closely mirrors the code for parsing `..x` in the `parse_prefix_range_expr` method below, where no cancel is done either.

Fixes #33262.

8 years agomir: prepare for rvalue promotion support.
Eduard Burtescu [Mon, 2 May 2016 21:26:41 +0000 (00:26 +0300)]
mir: prepare for rvalue promotion support.

8 years agoTranslate constants from MIR instead of going through trans::expr/consts.
Eduard Burtescu [Thu, 21 Apr 2016 13:15:56 +0000 (16:15 +0300)]
Translate constants from MIR instead of going through trans::expr/consts.

8 years agotest: avoid triggering an unsigned negation error from MIR building.
Eduard Burtescu [Mon, 25 Apr 2016 22:13:25 +0000 (01:13 +0300)]
test: avoid triggering an unsigned negation error from MIR building.

8 years agomir: build MIR for constants and static initializers.
Eduard Burtescu [Mon, 2 May 2016 20:11:19 +0000 (23:11 +0300)]
mir: build MIR for constants and static initializers.

8 years agomir: factor out the parts of MIR building which are not fn-specific.
Eduard Burtescu [Fri, 15 Apr 2016 14:11:24 +0000 (17:11 +0300)]
mir: factor out the parts of MIR building which are not fn-specific.

8 years agomir: remove the unused attribute logic in the MIR map construction.
Eduard Burtescu [Fri, 15 Apr 2016 07:12:38 +0000 (10:12 +0300)]
mir: remove the unused attribute logic in the MIR map construction.

8 years agoAuto merge of #33267 - nagisa:mir-temporary-32959, r=nikomatsakis
bors [Sat, 7 May 2016 01:15:39 +0000 (18:15 -0700)]
Auto merge of #33267 - nagisa:mir-temporary-32959, r=nikomatsakis

[MIR] Temporary hack for 32959

Gets rid of the warning. This is more elegant that I thought it would be, actually.

r? @nikomatsakis

cc #32959

8 years agoAuto merge of #33228 - nikomatsakis:compiletest-gut, r=acrichto
bors [Fri, 6 May 2016 23:04:55 +0000 (16:04 -0700)]
Auto merge of #33228 - nikomatsakis:compiletest-gut, r=acrichto

Move auxiliary directories to live with the tests

This is a step for enabling testing of cross-crate incremental compilation. The idea is that instead of having a central auxiliary directory, when you have a `// aux-build:foo.rs` annotation in the test `run-pass/bar.rs`, it will look in (e.g.) `run-pass/aux/foo.rs`. In general, it looks for an `aux` directory in the same directory as the test. We also ignore the `aux` directories when enumerating the set of tests.

As part of this PR, also refactor `runtest.rs` to use methods on a context, which means we can stop passing around context everywhere.

r? @alexcrichton

8 years agoremove stray files in auxiliary directory
Niko Matsakis [Thu, 5 May 2016 09:55:08 +0000 (05:55 -0400)]
remove stray files in auxiliary directory

8 years agos/aux/auxiliary, because windows
Niko Matsakis [Thu, 5 May 2016 00:09:17 +0000 (20:09 -0400)]
s/aux/auxiliary, because windows

For legacy reasons (presumably), Windows does not permit files name aux.

8 years agoadd missing aux files
Niko Matsakis [Wed, 27 Apr 2016 19:48:49 +0000 (15:48 -0400)]
add missing aux files

8 years agoremove unused aux-base argument
Niko Matsakis [Wed, 27 Apr 2016 13:39:47 +0000 (09:39 -0400)]
remove unused aux-base argument

8 years agokill the old auxiliary directory
Niko Matsakis [Tue, 26 Apr 2016 21:57:12 +0000 (17:57 -0400)]
kill the old auxiliary directory

8 years agomove auxiliary builds to a test-relative `aux`
Niko Matsakis [Tue, 26 Apr 2016 17:51:14 +0000 (10:51 -0700)]
move auxiliary builds to a test-relative `aux`

Instead of finding aux-build files in `auxiliary`, we now search for an
`aux` directory relative to the test. So if your test is
`compile-fail/foo.rs`, we would look in `compile-fail/aux`.  Similarly,
we ignore the `aux` directory when searching for tets.

8 years agotweak incremental comment
Niko Matsakis [Mon, 25 Apr 2016 22:07:15 +0000 (18:07 -0400)]
tweak incremental comment

8 years agomove free functions in runtest into methods
Niko Matsakis [Mon, 25 Apr 2016 21:59:31 +0000 (17:59 -0400)]
move free functions in runtest into methods

Also, promote the for loop iterating over revisions out into the
top-level method, whereas before it was pushed down instead each test's
method. Not entirely clear that this was the right call.

8 years agouse methods for EarlyProps and TestProps
Niko Matsakis [Mon, 25 Apr 2016 20:51:06 +0000 (16:51 -0400)]
use methods for EarlyProps and TestProps

8 years agorefactor interface of make_compile_args
Niko Matsakis [Mon, 25 Apr 2016 14:50:24 +0000 (10:50 -0400)]
refactor interface of make_compile_args

8 years agodoc: binding not needed
Tshepang Lekhonkhobe [Thu, 5 May 2016 21:55:36 +0000 (23:55 +0200)]
doc: binding not needed

8 years agodoc: mut not needed
Tshepang Lekhonkhobe [Thu, 5 May 2016 21:55:08 +0000 (23:55 +0200)]
doc: mut not needed

8 years agoAuto merge of #33472 - alexcrichton:fix-nightlies-again, r=brson
bors [Fri, 6 May 2016 18:57:16 +0000 (11:57 -0700)]
Auto merge of #33472 - alexcrichton:fix-nightlies-again, r=brson

mk: Try to fix nightlies again

Looks like the real bug on nightlies is that the `llvm-pass` run-make test is
not actually getting the value of `LLVM_CXXFLAGS` correct. Namely, it's blank!
Now the only change #33093 which actually affected this is that the argument
`$(LLVM_CXXFLAGS_$(2))` was moved up from a makefile rule into the definition of
a variable. Sounds innocuous?

Turns out the variable this was moved into is defined with `:=`, which means
that it's not recursively expanded, which basically means that it's expanded
immediately. Unfortunately part of this expansion involves running
`llvm-config`, which doesn't exist at the start of distcheck build!

This didn't show up on the bots because they run `make` *then* `make check`, and
the first step builds llvm-config so the next time `make` is loaded everything
is available. The distcheck bots, however, run just a plain `distcheck` so
`make` doesn't exist ahead of time. You can see this in action where the
distcheck bots start out with a bunch of "llvm-config not found" error messages.

This commit just changes a few variables to be defined with `=` which
essentially means they're lazily expanded. I did not run a full distcheck
locally, but this makes the initial "llvm-config not found" error messages go
away so I suspect that this is the fix.

Closes #33379 (hopefully)

8 years agomk: Try to fix nightlies again
Alex Crichton [Fri, 6 May 2016 18:21:42 +0000 (11:21 -0700)]
mk: Try to fix nightlies again

Looks like the real bug on nightlies is that the `llvm-pass` run-make test is
not actually getting the value of `LLVM_CXXFLAGS` correct. Namely, it's blank!
Now the only change #33093 which actually affected this is that the argument
`$(LLVM_CXXFLAGS_$(2))` was moved up from a makefile rule into the definition of
a variable. Sounds innocuous?

Turns out the variable this was moved into is defined with `:=`, which means
that it's not recursively expanded, which basically means that it's expanded
immediately. Unfortunately part of this expansion involves running
`llvm-config`, which doesn't exist at the start of distcheck build!

This didn't show up on the bots because they run `make` *then* `make check`, and
the first step builds llvm-config so the next time `make` is loaded everything
is available. The distcheck bots, however, run just a plain `distcheck` so
`make` doesn't exist ahead of time. You can see this in action where the
distcheck bots start out with a bunch of "llvm-config not found" error messages.

This commit just changes a few variables to be defined with `=` which
essentially means they're lazily expanded. I did not run a full distcheck
locally, but this makes the initial "llvm-config not found" error messages go
away so I suspect that this is the fix.

Closes #33379

8 years agoAdd detailed error explanation for E0389
Taylor Cramer [Wed, 4 May 2016 21:00:43 +0000 (14:00 -0700)]
Add detailed error explanation for E0389

Cleanup of E0389

Added type-d out version of type in E0389 description

8 years agoAuto merge of #33225 - michaelwoerister:fix-debuginfo-struct-ns, r=eddyb
bors [Fri, 6 May 2016 15:31:58 +0000 (08:31 -0700)]
Auto merge of #33225 - michaelwoerister:fix-debuginfo-struct-ns, r=eddyb

debuginfo: Fix regression in namespace handling for struct types.

Fixes a small regression that has been introduced in recent refactorings.

Fixes #33193

r? @eddyb

8 years agoAuto merge of #33138 - arielb1:sized-shortcut, r=nikomatsakis
bors [Fri, 6 May 2016 13:21:25 +0000 (06:21 -0700)]
Auto merge of #33138 - arielb1:sized-shortcut, r=nikomatsakis

Short-cut `T: Sized` trait selection for ADTs

Basically avoids all nested obligations when checking whether an ADT is sized - this speeds up typeck by ~15%

The refactoring fixed #32963, but I also want to make `Copy` not object-safe (will commit that soon).

Fixes #33201

r? @nikomatsakis

8 years agoIndicate struct names are code-like in doc-comment.
Corey Farwell [Fri, 6 May 2016 13:07:05 +0000 (09:07 -0400)]
Indicate struct names are code-like in doc-comment.

8 years agoAuto merge of #33086 - cardoe:non-blocking-rand-read, r=alexcrichton
bors [Fri, 6 May 2016 10:07:00 +0000 (03:07 -0700)]
Auto merge of #33086 - cardoe:non-blocking-rand-read, r=alexcrichton

rand: don't block before random pool is initialized

If we attempt a read with getrandom() on Linux the syscall can block
before the random pool is initialized unless the GRND_NONBLOCK flag is
passed. This flag causes getrandom() to instead return EAGAIN while the
pool is uninitialized. To avoid downstream users of crate or std
functionality that have no ability to avoid this blocking behavior this
change causes Rust to read bytes from /dev/urandom while getrandom()
would block and once getrandom() is available to use that. Fixes #32953.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
8 years agoFix Typo in Barrier::wait documentation
Christopher Serr [Fri, 6 May 2016 09:18:05 +0000 (11:18 +0200)]
Fix Typo in Barrier::wait documentation

This should be `have` instead of `has`.

8 years agoAuto merge of #33072 - tbu-:pr_duration_new_overflow, r=alexcrichton
bors [Fri, 6 May 2016 07:58:59 +0000 (00:58 -0700)]
Auto merge of #33072 - tbu-:pr_duration_new_overflow, r=alexcrichton

Panic on overflow in `Duration::new` constructor

Panicking on overflow is also done for `+`, and it replaces the
currently incorrect overflow behavior of wrapping around, which does not
make sense for `Duration`s.

8 years agorustdoc: add "src" links to individual impls
Georg Brandl [Tue, 3 May 2016 17:15:59 +0000 (19:15 +0200)]
rustdoc: add "src" links to individual impls

Since these impls can be scattered around quite a bit, it is nice
to be able to jump to the location where individual methods and
trait impls are defined.

Fixes: #30416
8 years agoAuto merge of #32835 - brson:alldebug, r=michaelwoerister
bors [Fri, 6 May 2016 04:55:02 +0000 (21:55 -0700)]
Auto merge of #32835 - brson:alldebug, r=michaelwoerister

Distribute both rust-lldb and rust-gdb everywhere

Both debuggers are viable in some capacity on all tier-1 platforms,
and people often ask for rust-lldb on Linux or rust-gdb on OS X.

r? @michaelwoerister

I'm still testing locally, but this *looks* like the right thing to change.

8 years agoDistribute both rust-lldb and rust-gdb everywhere except win-msvc
Brian Anderson [Fri, 8 Apr 2016 19:10:56 +0000 (19:10 +0000)]
Distribute both rust-lldb and rust-gdb everywhere except win-msvc

Both debuggers are viable in some capacity on all tier-1 platforms,
and people often ask for rust-lldb on Linux or rust-gdb on OS X.

8 years agoAuto merge of #32565 - tbu-:pr_cell_as_mut, r=alexcrichton
bors [Fri, 6 May 2016 00:55:28 +0000 (17:55 -0700)]
Auto merge of #32565 - tbu-:pr_cell_as_mut, r=alexcrichton

Add `as_mut` methods to the `std::cell` structs

This is safe since the borrow checking ensures that we have the only
mutable reference to the struct, thus we can safely borrow its interior.

8 years agoAdd `get_mut` methods to the `RefCell` and `Cell`
Tobias Bucher [Thu, 5 May 2016 22:39:25 +0000 (00:39 +0200)]
Add `get_mut` methods to the `RefCell` and `Cell`

This is safe since the borrow checker ensures that we have the only
mutable reference to the struct, thus we can safely borrow its interior.

Tracking issue is #33444.

8 years agoAuto merge of #32990 - tbu-:pr_more_defaults_cstr_path, r=alexcrichton
bors [Thu, 5 May 2016 20:18:57 +0000 (13:18 -0700)]
Auto merge of #32990 - tbu-:pr_more_defaults_cstr_path, r=alexcrichton

Add `Default` implementation for `&CStr`, `CString`, `Path`

8 years agodoc: make RFC references consistent
Georg Brandl [Thu, 5 May 2016 19:15:15 +0000 (21:15 +0200)]
doc: make RFC references consistent

8 years agoFix some some duplicate words.
Georg Brandl [Thu, 5 May 2016 19:11:41 +0000 (21:11 +0200)]
Fix some some duplicate words.

8 years agodoc: Update reference with better description of target_env
Brian Anderson [Thu, 5 May 2016 18:20:31 +0000 (18:20 +0000)]
doc: Update reference with better description of target_env

The definition of this value recently changed slightly. It no
longer corresponds directly to the target triple.

Also shuffled things around to make the order of cfg descriptions more
logical and added text related them to the target triple.

cc #33403

8 years agomk: Fix building with --enable-ccache
Alex Crichton [Sun, 1 May 2016 17:40:01 +0000 (10:40 -0700)]
mk: Fix building with --enable-ccache

We will no longer use `ccache` in the makefiles for our local dependencies like
miniz, but they're so small anyway it doesn't really matter.

Closes #33285

8 years agoAuto merge of #33128 - xen0n:more-confusing-unicode-chars, r=nagisa
bors [Thu, 5 May 2016 15:50:23 +0000 (08:50 -0700)]
Auto merge of #33128 - xen0n:more-confusing-unicode-chars, r=nagisa

Add more aliases for Unicode confusable chars

Building upon #29837, this PR:

* added aliases for space characters,
* distinguished square brackets from parens, and
* added common CJK punctuation characters as aliases.

This will especially help CJK users who may have forgotten to switch off IME when coding.

8 years ago[Doc] Default cpu is "generic" (and not "default")
Philipp Oppermann [Thu, 5 May 2016 12:23:43 +0000 (14:23 +0200)]
[Doc] Default cpu is "generic" (and not "default")

8 years agoAdd `Default` implementation for `&CStr` and `CString`
Tobias Bucher [Fri, 15 Apr 2016 15:58:59 +0000 (17:58 +0200)]
Add `Default` implementation for `&CStr` and `CString`

8 years agoAuto merge of #33067 - notriddle:wrapping_neg, r=alexcrichton
bors [Thu, 5 May 2016 07:37:56 +0000 (00:37 -0700)]
Auto merge of #33067 - notriddle:wrapping_neg, r=alexcrichton

Implement negation for wrapping numerals.

Fixes #33037

8 years agoAdd an example to Wrapping's documentation.
Philipp Matthias Schaefer [Thu, 5 May 2016 06:23:24 +0000 (08:23 +0200)]
Add an example to Wrapping's documentation.

8 years agospecify the archive file as stdout
Sébastien Marie [Thu, 5 May 2016 04:41:49 +0000 (06:41 +0200)]
specify the archive file as stdout

If the `-f` option isn't given, GNU tar will use environment variable
`TAPE` first, and next use the compiled-in default, which isn't
necessary `stdout` (it is the tape device `/dev/rst0` under OpenBSD for
example).

8 years agoAdd long diagnostics for E0414
Manish Goregaokar [Wed, 4 May 2016 17:58:50 +0000 (23:28 +0530)]
Add long diagnostics for E0414

8 years agoimplement RFC 1521
Alex Burka [Thu, 5 May 2016 02:09:51 +0000 (22:09 -0400)]
implement RFC 1521

Adds documentation to Clone, specifying that Copy types should have a trivial Clone impl.

Fixes #33416.

8 years agoAdd detailed error explanation for E0506
Taylor Cramer [Tue, 3 May 2016 18:26:01 +0000 (11:26 -0700)]
Add detailed error explanation for E0506

Broke up long lines in E0506

Trimmed E0506 comment to be under max line width

Added function example to E0506

Changed example of erroneous code wording on E0506