]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoRollup merge of #43979 - Jouan:Add-links-for-impls, r=GuillaumeGomez
Corey Farwell [Sat, 26 Aug 2017 13:46:33 +0000 (06:46 -0700)]
Rollup merge of #43979 - Jouan:Add-links-for-impls, r=GuillaumeGomez

Add links for impls

Implements a solution for issue #23552
r? @QuietMisdreavus

6 years agoRollup merge of #43966 - GuillaumeGomez:remove-dup, r=QuietMisdreavus
Corey Farwell [Sat, 26 Aug 2017 13:46:32 +0000 (06:46 -0700)]
Rollup merge of #43966 - GuillaumeGomez:remove-dup, r=QuietMisdreavus

Remove duplicates in rustdoc

Fixes #43934.

Two things however:

 1. I'm not happy with the current check. It seems completely overkill and unsatisfying.
 2. I have no idea how to test if there is only one element and not two.

r? @rust-lang/docs

6 years agoRollup merge of #43776 - zackmdavis:feature_gate_fn_must_use, r=alexcrichton
Corey Farwell [Sat, 26 Aug 2017 13:46:31 +0000 (06:46 -0700)]
Rollup merge of #43776 - zackmdavis:feature_gate_fn_must_use, r=alexcrichton

feature-gate #[must_use] for functions as `fn_must_use`

@eddyb I [was](https://github.com/rust-lang/rust/pull/43728#issuecomment-320854120) [dithering](https://github.com/rust-lang/rust/pull/43728#issuecomment-320856407) on this, but [your comment](https://github.com/rust-lang/rust/issues/43302#issuecomment-321174989) makes it sound like we do want a feature gate for this? Please advise.

r? @eddyb

6 years agoAuto merge of #44071 - alexcrichton:no-cycles, r=nikomatsakis
bors [Sat, 26 Aug 2017 08:25:44 +0000 (08:25 +0000)]
Auto merge of #44071 - alexcrichton:no-cycles, r=nikomatsakis

rustc: Start moving toward "try_get is a bug" for incremental

This PR is an effort to burn down some of the work items on #42633. The basic change here was to leave the `try_get` function exposed but have it return a `DiagnosticBuilder` instead of a `CycleError`. This means that it should be a compiler bug to *not* handle the error as dropping a diagnostic should result in a complier panic.

After that change it was then necessary to update the compiler's callsites of `try_get` to handle the error coming out. These were handled as:

* The `sized_constraint` and `needs_drop_raw` checks take the diagnostic and defer it as a compiler bug. This was a new piece of functionality added to the error handling infrastructure, and the idea is that for both these checks a "real" compiler error should be emitted elsewhere, so it's only a bug if we don't actually emit the complier error elsewhere.
* MIR inlining was updated to just ignore the diagnostic. This is being tracked by https://github.com/rust-lang/rust/issues/43542 which sounded like it either already had some work underway or was planning to change regardless.
* The final case, `item_path`, is still sort of up for debate. At the time of this writing this PR simply removes the invocations of `try_get` there, assuming that the query will always succeed. This turns out to be true for the test suite anyway! It sounds like, though, that this logic was intended to assist in "weird" situations like `RUST_LOG` where debug implementations can trigger at any time. This PR would therefore, however, break those implementations.

I'm unfortunately sort of out of ideas on how to handle `item_path`, but other thoughts would be welcome!

Closes #42633

6 years agoAuto merge of #44028 - nrc:rls-update, r=alexcrichton
bors [Sat, 26 Aug 2017 01:28:57 +0000 (01:28 +0000)]
Auto merge of #44028 - nrc:rls-update, r=alexcrichton

Update RLS and Cargo

r? @alexcrichton

6 years agoUpdate RLS and Cargo
Nick Cameron [Thu, 24 Aug 2017 05:52:28 +0000 (17:52 +1200)]
Update RLS and Cargo

6 years agorustc: Make `report_cycle` and `CycleError` private
Alex Crichton [Thu, 24 Aug 2017 22:13:55 +0000 (15:13 -0700)]
rustc: Make `report_cycle` and `CycleError` private

6 years agorustc: Skip cyclic checks in `item_path`
Alex Crichton [Thu, 24 Aug 2017 14:37:09 +0000 (07:37 -0700)]
rustc: Skip cyclic checks in `item_path`

This seems like it may be likely to cause bugs with `RUST_LOG` and other
"interesting" scenarios, but it removes the usage of `try_get` for now!

6 years agorustc: Add a FIXME for `try_get` in MIR inlining
Alex Crichton [Thu, 24 Aug 2017 14:00:44 +0000 (07:00 -0700)]
rustc: Add a FIXME for `try_get` in MIR inlining

It sounds like this is being handled elsewhere, so for now just preserve the
existing behavior of ignoring th error.

6 years agorustc: Fix two instances of `try_get`
Alex Crichton [Wed, 23 Aug 2017 19:54:36 +0000 (12:54 -0700)]
rustc: Fix two instances of `try_get`

The `sized_constraint` and `needs_drop_raw` queries both use `try_get` to detect
cycles, but in both of these cases the cycle indicates an error has happened
elsewhere in compilation. In these cases we can just delay the diagnostic to get
emitted as a bug later if we ended up forgetting to emit the error diagnostic.

6 years agorustc: Change the return of a query's `try_get`
Alex Crichton [Wed, 23 Aug 2017 19:53:29 +0000 (12:53 -0700)]
rustc: Change the return of a query's `try_get`

This alters the return value of the `try_get` function so the error contains a
diagnostic rather than a `CycleError`. This way consumers are forced to take
*some* action (else they get a bug to an un-emitted diagnostic). This action
could be to emit the error itself, or in some cases delay the diagnostic as a
bug and continue.

6 years agorustc_errors: Add the ability to delay as bugs
Alex Crichton [Wed, 23 Aug 2017 19:52:22 +0000 (12:52 -0700)]
rustc_errors: Add the ability to delay as bugs

This adds a function to `DiagnosticBuilder` to delay the entire diagnostic as a
bug to be emitted at a later time. This'll end up getting used in the compiler
in the subsequent commits...

6 years agoAuto merge of #43994 - tamird:remove-attributes, r=alexcrichton
bors [Fri, 25 Aug 2017 22:54:00 +0000 (22:54 +0000)]
Auto merge of #43994 - tamird:remove-attributes, r=alexcrichton

*: remove crate_{name,type} attributes

Fixes #41701.

r? @arielb1

6 years ago*: remove crate_{name,type} attributes
Tamir Duberstein [Sat, 19 Aug 2017 23:54:17 +0000 (16:54 -0700)]
*: remove crate_{name,type} attributes

Fixes #41701.

6 years agosyntax: clarify field name
Tamir Duberstein [Sun, 20 Aug 2017 15:40:07 +0000 (08:40 -0700)]
syntax: clarify field name

The value of this field is meant to indicate whether or not the
crate is rustc's libtest itself - not whether or not it is a test
crate generally.

6 years agoAuto merge of #44046 - alexcrichton:capture-diagnostics, r=michaelwoerister
bors [Fri, 25 Aug 2017 20:11:25 +0000 (20:11 +0000)]
Auto merge of #44046 - alexcrichton:capture-diagnostics, r=michaelwoerister

rustc: Capture diagnostics from all queries

This commit alters the `rustc::ty::maps` implementation to ensure that all
output diagnostics from the compiler are tracked for the duration of each query.
These are then intended to be replayed back the first time a cached value is
loaded, and otherwise the cache should operate the same as it does today.

Closes #42513

6 years agosyntax: remove unused field
Tamir Duberstein [Sun, 20 Aug 2017 15:22:46 +0000 (08:22 -0700)]
syntax: remove unused field

6 years agoAuto merge of #44053 - alexcrichton:no-choco, r=Mark-Simulacrum
bors [Fri, 25 Aug 2017 17:26:15 +0000 (17:26 +0000)]
Auto merge of #44053 - alexcrichton:no-choco, r=Mark-Simulacrum

appveyor: Use InnoSetup from our mirror

Chocolatey has been pretty flaky, so let's not rely on it.

Closes #43985

6 years agoAuto merge of #43700 - gaurikholkar:struct_lifetimes, r=nikomatsakis
bors [Fri, 25 Aug 2017 12:59:04 +0000 (12:59 +0000)]
Auto merge of #43700 - gaurikholkar:struct_lifetimes, r=nikomatsakis

Adding E0623 for structs

This is a fix to #43275

The error message is
```
+error[E0623]: lifetime mismatch
+  --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12
+   |
+14 | fn foo(mut x: Vec<Ref>, y: Ref) {
+   |                   ---      --- these structs are declared with different lifetimes...
+15 |     x.push(y);
+   |            ^ ...but data from `y` flows into `x` here
+
+error: aborting due to previous error
```

r? @nikomatsakis

6 years agoAuto merge of #44031 - scottmcm:swap_with_slice, r=alexcrichton
bors [Fri, 25 Aug 2017 10:20:15 +0000 (10:20 +0000)]
Auto merge of #44031 - scottmcm:swap_with_slice, r=alexcrichton

Add [T]::swap_with_slice

The safe version of a method from `ptr`, like `[T]::copy_from_slice` is.

Tracking issue: https://github.com/rust-lang/rust/issues/44030

6 years agoAuto merge of #44012 - michaelwoerister:cache-hir-dep-node-index, r=nikomatsakis
bors [Fri, 25 Aug 2017 06:40:10 +0000 (06:40 +0000)]
Auto merge of #44012 - michaelwoerister:cache-hir-dep-node-index, r=nikomatsakis

incr.comp.: Cache Hir-DepNodeIndices in the HIR map.

In preparation for red/green. This should also be faster than before without any additional memory cost.

r? @nikomatsakis

6 years agoAuto merge of #43786 - scalexm:issue-43784, r=nikomatsakis
bors [Fri, 25 Aug 2017 02:43:20 +0000 (02:43 +0000)]
Auto merge of #43786 - scalexm:issue-43784, r=nikomatsakis

Elaborate trait obligations when typechecking impls

When typechecking trait impl declarations, we only checked that bounds explictly written on the trait declaration hold.

We now also check that bounds which would have been implied by the trait reference do hold.

Fixes #43784.

6 years agoChange to `Elaborate::None` inside `compute_projection`
scalexm [Fri, 25 Aug 2017 01:57:44 +0000 (03:57 +0200)]
Change to `Elaborate::None` inside `compute_projection`

6 years agoAuto merge of #44070 - smaeul:musl-libunwind, r=alexcrichton
bors [Fri, 25 Aug 2017 00:04:06 +0000 (00:04 +0000)]
Auto merge of #44070 - smaeul:musl-libunwind, r=alexcrichton

Do not assume libunwind.a is available on musl

Fixes #40113, #44069, and clux/muslrust#16.

libunwind.a is not copied from musl_root, so it must be integrated into the unwind crate.

6 years agorustc: Capture diagnostics from all queries
Alex Crichton [Sat, 12 Aug 2017 22:37:28 +0000 (15:37 -0700)]
rustc: Capture diagnostics from all queries

This commit alters the `rustc::ty::maps` implementation to ensure that all
output diagnostics from the compiler are tracked for the duration of each query.
These are then intended to be replayed back the first time a cached value is
loaded, and otherwise the cache should operate the same as it does today.

Closes #42513

6 years agoAuto merge of #44051 - eddyb:apfloat-faster-div, r=nagisa
bors [Thu, 24 Aug 2017 21:18:16 +0000 (21:18 +0000)]
Auto merge of #44051 - eddyb:apfloat-faster-div, r=nagisa

Speed up APFloat division by using short division for small divisors.

Fixes #43828 (hopefully), by not doing long division bit-by-bit for small divisors.

When parsing the ~200,000 decimal float literals in the `tuple-stress` benchmark, this change brings roughly a 5x speed increase (from `0.6s` to `0.12s`), and the hottest instructions are native `div`s.

6 years agoDo not assume libunwind.a is available
Samuel Holland [Thu, 24 Aug 2017 13:37:06 +0000 (08:37 -0500)]
Do not assume libunwind.a is available

6 years agoAuto merge of #43345 - matthewhammer:master, r=nikomatsakis
bors [Thu, 24 Aug 2017 16:04:50 +0000 (16:04 +0000)]
Auto merge of #43345 - matthewhammer:master, r=nikomatsakis

Profile queries

This PR implements the "profile queries" debugging feature described here:
https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md

In particular, it implements the debugging flag `-Z profile-queries`

FYI: This PR is my second attempt at pushing these changes.  My original PR required a rebase; I have now done that rebase manually, after messing up with git's "interactive" rebase support.  The original (now closed/cancelled) PR is this one: https://github.com/rust-lang/rust/issues/43156

r? @nikomatsakis

6 years agoAuto merge of #44011 - TobiasSchaffner:improved_target_spec_clean, r=alexcrichton
bors [Thu, 24 Aug 2017 12:43:13 +0000 (12:43 +0000)]
Auto merge of #44011 - TobiasSchaffner:improved_target_spec_clean, r=alexcrichton

L4Re Target: Add the needed Libraries and locate them

Add the libraries and objects that have to be linked to a get working L4Re Binary using pre- and post-link-args. Additionaly some ld commands had to be passed.

* L4Re libraries and objects will be located by an environment variable.
* gcc libraries and objects will be located using a gcc call.

GCC is mandatory for this target, that might need documentation somewhere. As soon as something mandatory cannot be found, the compiler will panic. This is intended, because the functions involved don't allow the usage of a Result type. libgcc_eh is now passed using `-l` and crtbeginT.o and crtend.o are now located using `gcc -print-filename`.

6 years agoAuto merge of #43907 - euclio:command, r=alexcrichton
bors [Thu, 24 Aug 2017 10:02:18 +0000 (10:02 +0000)]
Auto merge of #43907 - euclio:command, r=alexcrichton

Use std::process::Command throughout compile-test

Resubmission of #43798.

Fixes #43762.

r? @alexcrichton

6 years agoAdd duplicate test
Guillaume Gomez [Wed, 23 Aug 2017 20:47:17 +0000 (22:47 +0200)]
Add duplicate test

6 years agoRemove duplicates in rustdoc
Guillaume Gomez [Thu, 17 Aug 2017 22:08:12 +0000 (00:08 +0200)]
Remove duplicates in rustdoc

6 years agoAuto merge of #43532 - petrochenkov:pgargs, r=nikomatsakis
bors [Thu, 24 Aug 2017 03:48:25 +0000 (03:48 +0000)]
Auto merge of #43532 - petrochenkov:pgargs, r=nikomatsakis

Desugar parenthesized generic arguments in HIR

Fixes ICE in https://github.com/rust-lang/rust/issues/43431 and maybe some other similar issues.

r? @eddyb

6 years agoAuto merge of #42565 - murarth:rc-from-slice, r=aturon
bors [Wed, 23 Aug 2017 23:20:32 +0000 (23:20 +0000)]
Auto merge of #42565 - murarth:rc-from-slice, r=aturon

Implement From<&[T]> and others for Arc/Rc (RFC 1845)

* Implements `From<`{`&[T]`, `&str`, `String`, `Box<T> where T: ?Sized`, `Vec<T>`}`>` for `Arc`/`Rc`
* Removes `rustc_private`-marked methods `Rc::__from_array` and `Rc::__from_str`, replacing their use with `Rc::from`

Tracking issue: #40475

6 years agoadd a comment
Niko Matsakis [Wed, 23 Aug 2017 22:56:19 +0000 (18:56 -0400)]
add a comment

6 years agocapture `adb shell` stdout
Andy Russell [Tue, 22 Aug 2017 15:14:43 +0000 (10:14 -0500)]
capture `adb shell` stdout

6 years ago-Z profile-query-and-key, separate from -Z profile-query; query key is string option
Matthew Hammer [Wed, 2 Aug 2017 18:58:23 +0000 (12:58 -0600)]
-Z profile-query-and-key, separate from -Z profile-query; query key is string option

6 years agobuild fixes
gaurikholkar [Wed, 23 Aug 2017 21:04:05 +0000 (02:34 +0530)]
build fixes

6 years agoadding macro, cleaning up code
gaurikholkar [Wed, 23 Aug 2017 19:48:20 +0000 (01:18 +0530)]
adding macro, cleaning up code

6 years ago-Z profile-queries includes dep_graph.with_task uses in output
Matthew Hammer [Sun, 23 Jul 2017 16:02:07 +0000 (10:02 -0600)]
-Z profile-queries includes dep_graph.with_task uses in output

6 years ago-Z profile-queries: remove panic when channel is unset
Matthew Hammer [Fri, 21 Jul 2017 22:14:34 +0000 (16:14 -0600)]
-Z profile-queries: remove panic when channel is unset

6 years agoprofiling with -Z profile-queries recognizes -Z time-passes
Matthew Hammer [Fri, 21 Jul 2017 18:32:38 +0000 (12:32 -0600)]
profiling with -Z profile-queries recognizes -Z time-passes

6 years agoinc comp: -Z profile-queries support; see also https://github.com/rust-lang-nursery...
Matthew Hammer [Wed, 19 Jul 2017 21:04:30 +0000 (15:04 -0600)]
inc comp: -Z profile-queries support; see also https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md

6 years agominor fix
gaurikholkar [Wed, 23 Aug 2017 14:13:05 +0000 (19:43 +0530)]
minor fix

6 years agoAuto merge of #44058 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 23 Aug 2017 13:46:14 +0000 (13:46 +0000)]
Auto merge of #44058 - frewsxcv:rollup, r=frewsxcv

Rollup of 8 pull requests

- Successful merges: #43631, #43977, #43983, #44016, #44039, #44043, #44047, #44054
- Failed merges:

6 years agocode review fixes
gaurikholkar [Wed, 23 Aug 2017 13:10:28 +0000 (18:40 +0530)]
code review fixes

6 years agoRollup merge of #44054 - frewsxcv:frewsxcv-libstd-thread-unwrap-or-else, r=sfackler
Corey Farwell [Wed, 23 Aug 2017 12:44:30 +0000 (08:44 -0400)]
Rollup merge of #44054 - frewsxcv:frewsxcv-libstd-thread-unwrap-or-else, r=sfackler

Thread spawning: don't run `min_stack` if the user has specified stack size.

None

6 years agoRollup merge of #44047 - cuviper:union-basic-endian, r=petrochenkov
Corey Farwell [Wed, 23 Aug 2017 12:44:29 +0000 (08:44 -0400)]
Rollup merge of #44047 - cuviper:union-basic-endian, r=petrochenkov

Fix little-endian assumptions in run-pass/union/union-basic

None

6 years agoRollup merge of #44043 - mattico:patch-1, r=alexcrichton
Corey Farwell [Wed, 23 Aug 2017 12:44:28 +0000 (08:44 -0400)]
Rollup merge of #44043 - mattico:patch-1, r=alexcrichton

Clarify windows build instructions in README

The old wording made me think you were supposed to do `python x.py --build=msvc`, which is not the case. Specify that you need to use the target triple.

6 years agoRollup merge of #44039 - remexre:master, r=steveklabnik
Corey Farwell [Wed, 23 Aug 2017 12:44:27 +0000 (08:44 -0400)]
Rollup merge of #44039 - remexre:master, r=steveklabnik

Mention null_mut on the pointer primitive docs.

Also adds a few mentions that both `*const` and `*mut` support functions, when only `*const` was mentioned before.

6 years agoRollup merge of #44016 - steffengy:master, r=alexcrichton
Corey Farwell [Wed, 23 Aug 2017 12:44:26 +0000 (08:44 -0400)]
Rollup merge of #44016 - steffengy:master, r=alexcrichton

libproc_macro docs: fix brace and bracket mixup

The documentation indicates that brace is `[`.
Brace is mapped token::Brace which (expectedly) is `{`.
So the documentation is simply confusing brace and bracket there.

Even though it's just a very small issue, it can lead to quite some confusion.

6 years agoRollup merge of #43983 - ids1024:redox-path-prefix, r=alexcrichton
Corey Farwell [Wed, 23 Aug 2017 12:44:25 +0000 (08:44 -0400)]
Rollup merge of #43983 - ids1024:redox-path-prefix, r=alexcrichton

Redox: correct is_absolute() and has_root()

This is awkward, but representing schemes properly in `Components` is not easily possible without breaking backwards compatibility, as discussed earlier in https://github.com/rust-lang/rust/pull/37702.

But these methods can be corrected anyway.

6 years agoRollup merge of #43977 - GuillaumeGomez:remove-outline, r=QuietMisdreavus
Corey Farwell [Wed, 23 Aug 2017 12:44:24 +0000 (08:44 -0400)]
Rollup merge of #43977 - GuillaumeGomez:remove-outline, r=QuietMisdreavus

Remove outline when details have focus

r? @rust-lang/docs

(the green outline annoyed me a bit)

6 years agoRollup merge of #43631 - ruuda:update-docs, r=QuietMisdreavus
Corey Farwell [Wed, 23 Aug 2017 12:44:23 +0000 (08:44 -0400)]
Rollup merge of #43631 - ruuda:update-docs, r=QuietMisdreavus

Point "deref coercions" links to new book

Currently the link on doc.rust-lang.org is semi-broken; it links to a page that links to the exact page in the first edition in the book, or to the index of the second edition of the book. If the second editions
is the recommended one now, we should point the links at that one. (In the mean time, the links have been updated to point directly to the first edition of the book, but that hasn't made it onto
the stable channel yet.) By the time this commit makes it onto the stable channel, the second edition of the book should be complete enough. At least the part about deref coercions is.

r? @steveklabnik

6 years agoAuto merge of #40113 - smaeul:native-musl, r=alexcrichton
bors [Wed, 23 Aug 2017 08:43:52 +0000 (08:43 +0000)]
Auto merge of #40113 - smaeul:native-musl, r=alexcrichton

Support dynamically-linked and/or native musl targets

These changes allow native compilation on musl-based distributions and the use of dynamic libraries on linux-musl targets. This is intended to remove limitations based on past assumptions about musl targets, while maintaining existing behavior by default.

A minor related bugfix is included.

6 years agoAuto merge of #43948 - jseyfried:generic_arguments_in_paths, r=petrochenkov
bors [Wed, 23 Aug 2017 06:06:21 +0000 (06:06 +0000)]
Auto merge of #43948 - jseyfried:generic_arguments_in_paths, r=petrochenkov

Ensure that generic arguments don't end up in attribute paths.

Fixes #43424.
r? @petrochenkov or @nrc

6 years agofn_must_use soft feature-gate warning on methods too, not only functions
Zack M. Davis [Wed, 23 Aug 2017 00:27:00 +0000 (17:27 -0700)]
fn_must_use soft feature-gate warning on methods too, not only functions

This continues to be in the matter of #43302.

6 years ago"soft" (warn instead of error) feature-gate for #[must_use] on functions
Zack M. Davis [Tue, 22 Aug 2017 23:05:01 +0000 (16:05 -0700)]
"soft" (warn instead of error) feature-gate for #[must_use] on functions

Before `#[must_use]` for functions was implemented, a `#[must_use]` attribute
on a function was a no-op. To avoid a breaking change in this behavior, we add
an option for "this-and-such feature is experimental" feature-gate messages to
be a mere warning rather than a compilation-halting failure (so old code that
used to have a useless no-op `#[must_use]` attribute now warns rather than
breaking). When we're on stable, we add a help note to clarify that the feature
isn't "on."

This is in support of #43302.

6 years agoAuto merge of #43830 - alexcrichton:path-display-regression, r=aturon
bors [Wed, 23 Aug 2017 03:24:13 +0000 (03:24 +0000)]
Auto merge of #43830 - alexcrichton:path-display-regression, r=aturon

std: Respect formatting flags for str-like OsStr

Historically many `Display` and `Debug` implementations for `OsStr`-like
abstractions have gone through `String::from_utf8_lossy`, but this was updated
in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the
unfortunate side effect of causing a regression (#43765) in code which relied on
these `fmt` trait implementations respecting the various formatting flags
specified.

This commit opportunistically adds back interpretation of formatting trait flags
in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can
delegate to the formatting implementation for `str`. This doesn't entirely solve
the regression as non-utf8 paths will format differently than they did before
still (in that they will not respect formatting flags), but this should solve
the regression for all "real world" use cases of paths and such. The door's also
still open for handling these flags in the future!

Closes #43765

6 years agoThread spawning: don't run `min_stack` if the user has specified stack size.
Corey Farwell [Tue, 22 Aug 2017 22:03:09 +0000 (18:03 -0400)]
Thread spawning: don't run `min_stack` if the user has specified stack size.

6 years agoappveyor: Use InnoSetup from our mirror
Alex Crichton [Wed, 23 Aug 2017 02:42:28 +0000 (19:42 -0700)]
appveyor: Use InnoSetup from our mirror

Chocolatey has been pretty flaky, so let's not rely on it.

Closes #43985

6 years agocorrect comment re feature-checking tooling
Zack M. Davis [Wed, 16 Aug 2017 01:52:04 +0000 (18:52 -0700)]
correct comment re feature-checking tooling

The featureck.py that this comment referred to was removed in 9dd3c54a (March
2016).

6 years agohard feature-gate for #[must_use] on functions
Zack M. Davis [Tue, 15 Aug 2017 23:21:28 +0000 (16:21 -0700)]
hard feature-gate for #[must_use] on functions

We'll actually want a new "soft" warning-only gate to maintain
backwards-compatibility, but it's cleaner to start out with the established,
well-understood gate before implementing the alternative warn-only behavior in
a later commit.

This is in the matter of #43302.

6 years agoSpeed up APFloat division by using short division for small divisors.
Eduard-Mihai Burtescu [Tue, 22 Aug 2017 23:44:41 +0000 (02:44 +0300)]
Speed up APFloat division by using short division for small divisors.

6 years agoFix fallout in tests.
Jeffrey Seyfried [Mon, 21 Aug 2017 21:54:03 +0000 (14:54 -0700)]
Fix fallout in tests.

6 years agoEnsure that generic arguments don't end up in attribute paths.
Jeffrey Seyfried [Thu, 17 Aug 2017 18:44:28 +0000 (11:44 -0700)]
Ensure that generic arguments don't end up in attribute paths.

6 years agoAuto merge of #44032 - pnkfelix:mir-borrowck-fix-orisnotand, r=eddyb
bors [Tue, 22 Aug 2017 22:41:29 +0000 (22:41 +0000)]
Auto merge of #44032 - pnkfelix:mir-borrowck-fix-orisnotand, r=eddyb

Fix logic error in test guarding prototype MIR borrowck code.

Fix logic error in test guarding prototype MIR borrowck code.

tl;dr: :facepalm:

(This crept in during the shift from a transform to a query (#44009); I didn't notice because my muscle memory was still always passing `-Z mir-borrowck`, while my test cases *also* had the `#[rustc_mir_borrowck]` attribute attached to them.)

6 years agoUpdate ignored tests for dynamic musl
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Update ignored tests for dynamic musl

Now that musl supports dynamic libraries (although not by default)
enable the tests that now pass. Additional currently-ignored tests
will pass if rustc is built with crt_static=false in config.toml.

6 years agoSupport dynamic linking for musl-based targets
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Support dynamic linking for musl-based targets

Note that this commit does not affect mips-musl targets, as they do not
inherit from linux_musl_base.

6 years agoUpdate libunwind dependencies for musl
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Update libunwind dependencies for musl

Use libgcc_s when linking dynamically. Convert the static libunwind to
static-nobundle, as libunwind.a is copied from musl_root and available
in the library search path.

6 years agoTell the linker when we want to link a static executable
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Tell the linker when we want to link a static executable

If the C runtime is linked statically, explicitly tell the linker that
the executable should be static.

6 years agoDisable PIE when linking statically
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Disable PIE when linking statically

Static PIE support, while supported on musl, requires a patch to GCC.
Until/unless it is merged, adding '-pie' to the linker command line will
override '-static' and create a binary that requires a dynamic
interpreter (ld.so).

6 years agoIntroduce target feature crt_static_allows_dylibs
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Introduce target feature crt_static_allows_dylibs

Most UNIX-like platforms do not allow shared libraries to statically
link their own libc, as libc expects to have consistent process-global
state. On those platforms, when we do not have a shared libc available,
we must not attempt to link dylibs or cdylibs. On Windows, however, it
is expected to statically link the CRT into dynamic libraries.

This feature is only relevant for targets that support both fully-static
and fully-dynamic linkage, such as musl on Linux.

6 years agoIntroduce temporary target feature crt_static_respected
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Introduce temporary target feature crt_static_respected

This feature allows targets to opt in to full support of the crt-static
feature. Currently, crt-static is allowed on all targets, even those
that really can't or really shouldn't support it. This works because it
is very loose in the specification of its effects. Changing the behavior
of crt-static to be more strict in how it chooses libraries and links
executables would likely cause compilation to fail on these platforms.

To avoid breaking existing uses of crt-static, whitelist targets that
support the new, stricter behavior. For all other targets, this changes
crt-static from being "mostly a no-op" to "explicitly a no-op".

6 years agoFactor out a helper for the getting C runtime linkage
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Factor out a helper for the getting C runtime linkage

This commit makes no functional changes.

6 years agoInline crt-static choice for pc-windows-msvc
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Inline crt-static choice for pc-windows-msvc

This avoids the possibility of a duplicate or conflicting crt-static
command line option sent to rustc.

6 years agoIntroduce crt_static target option in config.toml
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Introduce crt_static target option in config.toml

This controls the value of the crt-static feature used when building the
standard library for a target, as well as the compiler itself when that
target is the host.

6 years agoCopy musl startup objects before building std
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Copy musl startup objects before building std

They are required for linking it, even though it is a library, because
crtn.o in post_link_objects, as hardcoded in src/librustc_back/target/
linux_musl_base.rs, is added to the linker command line for both
executables and libraries.

6 years agoInfer a default musl_root for native builds
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Infer a default musl_root for native builds

6 years agoImprove explanation of musl_root
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Improve explanation of musl_root

6 years agoRemove incorrect special case of mips-musl
Samuel Holland [Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)]
Remove incorrect special case of mips-musl

The libdl/librt/libpthread provided by musl are no-op (empty static
libraries) on all architectures, mips included.

6 years agoFix little-endian assumptions in run-pass/union/union-basic
Josh Stone [Tue, 22 Aug 2017 19:45:10 +0000 (12:45 -0700)]
Fix little-endian assumptions in run-pass/union/union-basic

6 years agoAuto merge of #44013 - arielb1:coerce-snapshot, r=eddyb
bors [Tue, 22 Aug 2017 19:14:12 +0000 (19:14 +0000)]
Auto merge of #44013 - arielb1:coerce-snapshot, r=eddyb

Register fn-ptr coercion obligations out of a snapshot

Fixes #43923.

beta-nominating because regression.
r? @eddyb

6 years agoClarify windows build instructions in README
Matt Ickstadt [Tue, 22 Aug 2017 18:28:39 +0000 (13:28 -0500)]
Clarify windows build instructions in README

The old wording made me think you were supposed to do `python x.py --build=msvc`, which is not the case. Specify that you need to use the target triple.

6 years agoSimplify code for handling Redox paths
Ian Douglas Scott [Tue, 22 Aug 2017 17:33:26 +0000 (10:33 -0700)]
Simplify code for handling Redox paths

6 years agoMention null_mut on the pointer primitive docs.
Nathaniel Ringo [Tue, 22 Aug 2017 16:56:38 +0000 (11:56 -0500)]
Mention null_mut on the pointer primitive docs.

Also adds a few mentions that both `*const` and `*mut` support
functions, when only `*const` was mentioned before.

6 years agoFixed changes to .in-band CSS
Jouan Amate [Tue, 22 Aug 2017 16:24:18 +0000 (09:24 -0700)]
Fixed changes to .in-band CSS

:target will specifically override .in-band background

6 years agoReturn L4Re TargetOptions as a Result type instead of panic
Tobias Schaffner [Tue, 22 Aug 2017 09:11:30 +0000 (11:11 +0200)]
Return L4Re TargetOptions as a Result type instead of panic

If the environment variable L4RE_LIBDIR ist not set an Error will be
returned wrapped in a result type instead of a panic.

6 years agoUse cfg! instead of #[cfg]
Ian Douglas Scott [Tue, 22 Aug 2017 15:17:05 +0000 (08:17 -0700)]
Use cfg! instead of #[cfg]

6 years agoremove needless clone
Andy Russell [Tue, 22 Aug 2017 15:09:54 +0000 (10:09 -0500)]
remove needless clone

6 years agoAuto merge of #44033 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 22 Aug 2017 13:59:20 +0000 (13:59 +0000)]
Auto merge of #44033 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 5 pull requests

- Successful merges: #43993, #44001, #44010, #44014, #44029
- Failed merges:

6 years agoL4Re Target: Add the needed Libraries and locate them
Sebastian Humenda [Mon, 21 Aug 2017 07:50:13 +0000 (09:50 +0200)]
L4Re Target: Add the needed Libraries and locate them

Add the libraries and objects that have to be linked to a get working L4Re
Binary using pre- and post-link-args. Additionaly some ld commands had to
be passed.

* L4Re libraries and objects will be located by an environment variable.
* gcc libraries and objects will be located using a gcc call.

GCC is mandatory for this target, that might need documentation somewhere.
As soon as something mandatory cannot be found, the compiler will panic.
This is intended, because the functions involved don't allow the usage of
a Result type. libgcc_eh is now passed using `-l` and crtbeginT.o and
crtend.o are now located using `gcc -print-filename`.

Co-authored-by: TobiasSchaffner <tobiasschaffner@outlook.com>
6 years agoRollup merge of #44029 - WiSaGaN:patch-1, r=alexcrichton
Guillaume Gomez [Tue, 22 Aug 2017 11:36:21 +0000 (13:36 +0200)]
Rollup merge of #44029 - WiSaGaN:patch-1, r=alexcrichton

Fix typos in 1.20 release notes

6 years agoRollup merge of #44014 - Mark-Simulacrum:update-readme, r=alexcrichton
Guillaume Gomez [Tue, 22 Aug 2017 11:36:20 +0000 (13:36 +0200)]
Rollup merge of #44014 - Mark-Simulacrum:update-readme, r=alexcrichton

Update rustbuild README

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

r? @alexcrichton

6 years agoRollup merge of #44010 - GuillaumeGomez:read-links, r=frewsxcv
Guillaume Gomez [Tue, 22 Aug 2017 11:36:19 +0000 (13:36 +0200)]
Rollup merge of #44010 - GuillaumeGomez:read-links, r=frewsxcv

Add missing links for Read trait

r? @rust-lang/docs

6 years agoRollup merge of #44001 - tamird:release-notes-1.16, r=alexcrichton
Guillaume Gomez [Tue, 22 Aug 2017 11:36:18 +0000 (13:36 +0200)]
Rollup merge of #44001 - tamird:release-notes-1.16, r=alexcrichton

RELEASES.md: document 1.16 lifetime elision change

Closes #41105.

r? @Mark-Simulacrum cc @nikomatsakis

6 years agoRollup merge of #43993 - tamird:better-wording-error, r=arielb1
Guillaume Gomez [Tue, 22 Aug 2017 11:36:17 +0000 (13:36 +0200)]
Rollup merge of #43993 - tamird:better-wording-error, r=arielb1

borrowck: name the correct type in error message

Closes #36407.

r? @Mark-Simulacrum

6 years agoAuto merge of #44008 - RalfJung:staged1, r=alexcrichton
bors [Tue, 22 Aug 2017 11:15:10 +0000 (11:15 +0000)]
Auto merge of #44008 - RalfJung:staged1, r=alexcrichton

Make sure crates not opting in to staged_api don't use staged_api

This also fixes the problem that with `-Zforce-unstable-if-unmarked` set, crates could not use `#[deprecated]`.

If you prefer, I can instead submit another version which just fixes this problem, but still allows the staged API attributes for all crates when  `-Zforce-unstable-if-unmarked` is set. I have prepared that at <https://github.com/RalfJung/rust/tree/staged2>. As yet another alternative, @alexcrichton suggested to turn this error into a lint, but that seems to be much more work, so is it worth it?

Cc @alexcrichton #43975

6 years agoFix logic error in test guarding prototype MIR borrowck code.
Felix S. Klock II [Tue, 22 Aug 2017 10:05:52 +0000 (12:05 +0200)]
Fix logic error in test guarding prototype MIR borrowck code.

(This crept in during the shift from a transform to a query; I didn't
notice because my muscle memory was still always passing `-Z
mir-borrowck`, while my test cases *also* had the
`#[rustc_mir_borrowck]` attribute attached to them.)

6 years agoAuto merge of #44003 - LukasKalbertodt:patch-1, r=nikomatsakis
bors [Tue, 22 Aug 2017 08:32:14 +0000 (08:32 +0000)]
Auto merge of #44003 - LukasKalbertodt:patch-1, r=nikomatsakis

Add PartialEq/Eq impls to proc_macro::{Spacing, Delimiter}

I don't see a reason why those two types shouldn't be tested for equality. But I hardly know anything about proc macros, so I'm probably wrong :)