]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoProperly detect overflow in Instance +/- Duration.
kennytm [Thu, 31 Aug 2017 17:16:24 +0000 (01:16 +0800)]
Properly detect overflow in Instance +/- Duration.

Avoid unchecked cast from `u64` to `i64`. Use `try_into()` for checked
cast. (On Unix, cast to `time_t` instead of `i64`.)

6 years agoAuto merge of #44094 - alexcrichton:long-linkers, r=michaelwoerister
bors [Thu, 7 Sep 2017 04:07:09 +0000 (04:07 +0000)]
Auto merge of #44094 - alexcrichton:long-linkers, r=michaelwoerister

rustc: Attempt to handle super long linker invocations

This commit adds logic to the compiler to attempt to handle super long linker
invocations by falling back to the `@`-file syntax if the invoked command is too
large. Each OS has a limit on how many arguments and how large the arguments can
be when spawning a new process, and linkers tend to be one of those programs
that can hit the limit!

The logic implemented here is to unconditionally attempt to spawn a linker and
then if it fails to spawn with an error from the OS that indicates the command
line is too big we attempt a fallback. The fallback is roughly the same for all
linkers where an argument pointing to a file, prepended with `@`, is passed.
This file then contains all the various arguments that we want to pass to the
linker.

Closes #41190

6 years agoAuto merge of #44380 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Thu, 7 Sep 2017 01:04:34 +0000 (01:04 +0000)]
Auto merge of #44380 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 23 pull requests

- Successful merges: #44097, #44206, #44218, #44276, #44277, #44296, #44303, #44313, #44315, #44317, #44319, #44321, #44325, #44326, #44327, #44328, #44330, #44351, #44353, #44354, #44361, #44362, #44377
- Failed merges:

6 years agoRollup merge of #44377 - mathstuf:config.toml-typos, r=alexcrichton
Mark Simulacrum [Thu, 7 Sep 2017 00:28:08 +0000 (18:28 -0600)]
Rollup merge of #44377 - mathstuf:config.toml-typos, r=alexcrichton

config.toml.example: fix some typos

6 years agoRollup merge of #44362 - oli-obk:patch-7, r=eddyb
Mark Simulacrum [Thu, 7 Sep 2017 00:28:07 +0000 (18:28 -0600)]
Rollup merge of #44362 - oli-obk:patch-7, r=eddyb

Fix a bug in the inliner

r? @eddyb

6 years agoRollup merge of #44361 - oli-obk:lit_sugg, r=nikomatsakis
Mark Simulacrum [Thu, 7 Sep 2017 00:28:06 +0000 (18:28 -0600)]
Rollup merge of #44361 - oli-obk:lit_sugg, r=nikomatsakis

Suggest changing literals instead of calling methods (fixes #44307)

6 years agoRollup merge of #44354 - jakllsch:jakllsch-85453197-a0cc-43f6-8c55-7bce6c4a4ebf,...
Mark Simulacrum [Thu, 7 Sep 2017 00:28:05 +0000 (18:28 -0600)]
Rollup merge of #44354 - jakllsch:jakllsch-85453197-a0cc-43f6-8c55-7bce6c4a4ebf, r=Mark-Simulacrum

bootstrap: openssl for NetBSD/sparc64 in extended build

r? @Mark-Simulacrum

6 years agoRollup merge of #44353 - cuviper:install-rustc, r=Mark-Simulacrum
Mark Simulacrum [Thu, 7 Sep 2017 00:28:04 +0000 (18:28 -0600)]
Rollup merge of #44353 - cuviper:install-rustc, r=Mark-Simulacrum

Include rustc in the default `./x.py install`

The default install used to include rustc, rust-std, and rust-docs, but
the refactoring in commit 6b3413d825fa6 make rustc only default in
extended builds.  This commit makes rustc installed by default again.

6 years agoRollup merge of #44351 - lu-zero:master, r=nikomatsakis
Mark Simulacrum [Thu, 7 Sep 2017 00:28:03 +0000 (18:28 -0600)]
Rollup merge of #44351 - lu-zero:master, r=nikomatsakis

More PowerPC Altivec intrinsics

6 years agoRollup merge of #44330 - WiSaGaN:patch-1, r=aturon
Mark Simulacrum [Thu, 7 Sep 2017 00:28:02 +0000 (18:28 -0600)]
Rollup merge of #44330 - WiSaGaN:patch-1, r=aturon

Fix link typo in 1.20.0 release notes

Should have been included in https://github.com/rust-lang/rust/pull/44230

6 years agoRollup merge of #44328 - mcomstock:from-str-doc-fix, r=steveklabnik
Mark Simulacrum [Thu, 7 Sep 2017 00:28:00 +0000 (18:28 -0600)]
Rollup merge of #44328 - mcomstock:from-str-doc-fix, r=steveklabnik

Removed the incorrect documentation for from_str

Fixes #44242.

6 years agoRollup merge of #44327 - Eh2406:FIXME#12808, r=aturon
Mark Simulacrum [Thu, 7 Sep 2017 00:27:59 +0000 (18:27 -0600)]
Rollup merge of #44327 - Eh2406:FIXME#12808, r=aturon

#12808 is closed remove the FIXME

let's see if this can be cleaned up.

https://github.com/rust-lang/rust/issues/12808#issuecomment-326852052

6 years agoRollup merge of #44326 - Eh2406:FIXME#44590, r=arielb1
Mark Simulacrum [Thu, 7 Sep 2017 00:27:58 +0000 (18:27 -0600)]
Rollup merge of #44326 - Eh2406:FIXME#44590, r=arielb1

#33490 is closed remove the FIXME

let's see if this can be cleaned up.

https://github.com/rust-lang/rust/issues/33490#issuecomment-326851930

6 years agoRollup merge of #44325 - nielsegberts:master, r=steveklabnik
Mark Simulacrum [Thu, 7 Sep 2017 00:27:57 +0000 (18:27 -0600)]
Rollup merge of #44325 - nielsegberts:master, r=steveklabnik

Make slice::split_at_mut example demonstrate mutability

Moved the examples from split_at_mut to split_at so the example at
split_at_mut can just demonstrate mutability.

See #44314

r? @steveklabnik

6 years agoRollup merge of #44321 - jakllsch:jakllsch-4f2d6c87-2674-43e4-9c5f-2415136e6bdc,...
Mark Simulacrum [Thu, 7 Sep 2017 00:27:56 +0000 (18:27 -0600)]
Rollup merge of #44321 - jakllsch:jakllsch-4f2d6c87-2674-43e4-9c5f-2415136e6bdc, r=Mark-Simulacrum

bootstrap: only include docs in extended distribution if enabled

Fixes #44163

6 years agoRollup merge of #44319 - est31:master, r=eddyb
Mark Simulacrum [Thu, 7 Sep 2017 00:27:55 +0000 (18:27 -0600)]
Rollup merge of #44319 - est31:master, r=eddyb

Improve DefIndex formatting to be more semantic

Fixes #44318

r? @eddyb

6 years agoRollup merge of #44317 - Dushistov:master, r=arielb1
Mark Simulacrum [Thu, 7 Sep 2017 00:27:54 +0000 (18:27 -0600)]
Rollup merge of #44317 - Dushistov:master, r=arielb1

Add test for #22706

Closes #22706

6 years agoRollup merge of #44315 - kallisti5:epoch-doc-example-squashed, r=GuillaumeGomez
Mark Simulacrum [Thu, 7 Sep 2017 00:27:53 +0000 (18:27 -0600)]
Rollup merge of #44315 - kallisti5:epoch-doc-example-squashed, r=GuillaumeGomez

std/time: Give an example to get UNIX_EPOCH in seconds

6 years agoRollup merge of #44313 - RalfJung:book, r=nikomatsakis
Mark Simulacrum [Thu, 7 Sep 2017 00:27:52 +0000 (18:27 -0600)]
Rollup merge of #44313 - RalfJung:book, r=nikomatsakis

rustbook: remove dead test functions

There is no "test" subcommand added to the `clap::App`, so this is all dead code.

Cc @steveklabnik -- your [commit](https://github.com/RalfJung/rust/commit/a076961fd0e3d8a68f8b047460b8f5191d203b08) introducing this stated the intention of having both commands, but it seems nobody has missed the `test` command since February.

6 years agoRollup merge of #44303 - clarcharr:debugs, r=alexcrichton
Mark Simulacrum [Thu, 7 Sep 2017 00:27:51 +0000 (18:27 -0600)]
Rollup merge of #44303 - clarcharr:debugs, r=alexcrichton

impl Debug for SplitWhitespace.

This one got missed because `libstd_unicode` doesn't have a `deny(missing_debug_implementations)` like `libstd` and `libcore`. I think that perhaps this lint should check for items exported from other crates too.

6 years agoRollup merge of #44296 - zmanian:patch-1, r=steveklabnik
Mark Simulacrum [Thu, 7 Sep 2017 00:27:50 +0000 (18:27 -0600)]
Rollup merge of #44296 - zmanian:patch-1, r=steveklabnik

Minor documentation improvements for StmtKind

Documentation for Semi and Marco StmtKinds.

Wasn't obvious to me what these were when writing a lint recently.

6 years agoRollup merge of #44277 - mattico:test-33185, r=nikomatsakis
Mark Simulacrum [Thu, 7 Sep 2017 00:27:49 +0000 (18:27 -0600)]
Rollup merge of #44277 - mattico:test-33185, r=nikomatsakis

Add test for #33185

Closes #33185

6 years agoRollup merge of #44276 - mattico:test-35376, r=alexcrichton
Mark Simulacrum [Thu, 7 Sep 2017 00:27:48 +0000 (18:27 -0600)]
Rollup merge of #44276 - mattico:test-35376, r=alexcrichton

Add test for #35676

Closes #35676

6 years agoRollup merge of #44218 - SimonSapin:commit-hash, r=alexcrichton
Mark Simulacrum [Thu, 7 Sep 2017 00:27:47 +0000 (18:27 -0600)]
Rollup merge of #44218 - SimonSapin:commit-hash, r=alexcrichton

Add full git commit hash to release channel manifests

The full hash is necessary to build the download URL for "alternate" compiler builds. This is a first step for https://github.com/rust-lang-nursery/rustup.rs/issues/1099.

6 years agoRollup merge of #44206 - MarkMcCaskey:master, r=steveklabnik
Mark Simulacrum [Thu, 7 Sep 2017 00:27:46 +0000 (18:27 -0600)]
Rollup merge of #44206 - MarkMcCaskey:master, r=steveklabnik

update unimplemented! docs

For #42628 (updating docs from changes from #42155).

Initial changes made to make `unimplemented!` doc comments look more like `unreachable!` and remove statement about the panic message.

r? @steveklabnik

6 years agoRollup merge of #44097 - Xaeroxe:clamp, r=burntsushi
Mark Simulacrum [Thu, 7 Sep 2017 00:27:45 +0000 (18:27 -0600)]
Rollup merge of #44097 - Xaeroxe:clamp, r=burntsushi

Add clamp functions

Implementation of clamp feature:

Tracking issue: https://github.com/rust-lang/rust/issues/44095
RFC: https://github.com/rust-lang/rfcs/pull/1961

6 years agoconfig.toml.example: fix some typos
Ben Boeckel [Wed, 6 Sep 2017 22:22:32 +0000 (18:22 -0400)]
config.toml.example: fix some typos

6 years agoAuto merge of #43975 - RalfJung:gcc, r=alexcrichton
bors [Wed, 6 Sep 2017 19:28:36 +0000 (19:28 +0000)]
Auto merge of #43975 - RalfJung:gcc, r=alexcrichton

use gcc::Build rather than deprecated gcc::Config

I did `cargo update -p gcc` to upgrade only this package. Is there further process that should be follwoed when updating a build dependency from crates.io?

r? @alexcrichton
Fixes #43973

6 years agoAuto merge of #43849 - QuietMisdreavus:foreign-impls, r=steveklabnik
bors [Wed, 6 Sep 2017 11:24:18 +0000 (11:24 +0000)]
Auto merge of #43849 - QuietMisdreavus:foreign-impls, r=steveklabnik

rustdoc: add new "Implementations on Foreign Types" section to traits

Demo screenshot:

![image](https://user-images.githubusercontent.com/5217170/29281219-c547f758-80e3-11e7-808f-49f592c65c5b.png)

Full demo available at https://tonberry.quietmisdreavus.net/foreign-test/foreign_test/trait.CheckIt.html

This PR splits the "Implementors" section on trait pages into two: First, for impls on types local to the crate, their impls are kept as-is, printing one line for the impl line, and any additional lines for associated types. However, for types external to the crate, they are now pulled up over the others and are printed (almost) like the summary impl on the type page itself. This gives any doc comments on these impls or methods to be exposed in the documentation.

There's just one small problem, though: [libstd docs apparently surface impls for libc and rand, possibly among others](https://tonberry.quietmisdreavus.net/foreign-std/std/marker/trait.Copy.html#foreign-impls). This adds this section to pages in the std docs where we might not want them to show up in the first place. I think this is a bug distinct from this PR, but it does make it drastically apparent.

~~My question, then, is this: Do we want this here? Taking it out involves fixing which impls are visible to rustdoc, possibly specifically when rendering the std facade. I'm convinced this is fine to land as-is, since it adds a feature specifically for non-std crates (i'm thinking of things like `num` or related crates that implement things on primitives or std types as part of their functionality).~~ (EDIT: I have an open PR to fix this: https://github.com/rust-lang/rust/pull/44026)

6 years agoReintroduce the early returns
Oliver Schneider [Wed, 6 Sep 2017 10:25:46 +0000 (12:25 +0200)]
Reintroduce the early returns

6 years agoFix a bug in the inliner
Oliver Schneider [Wed, 6 Sep 2017 08:33:53 +0000 (10:33 +0200)]
Fix a bug in the inliner

6 years agoSuggest changing literals instead of calling methods (fixes #44307)
Oliver Schneider [Wed, 6 Sep 2017 08:09:25 +0000 (10:09 +0200)]
Suggest changing literals instead of calling methods (fixes #44307)

6 years agorustc: Attempt to handle super long linker invocations
Alex Crichton [Sat, 26 Aug 2017 03:16:51 +0000 (20:16 -0700)]
rustc: Attempt to handle super long linker invocations

This commit adds logic to the compiler to attempt to handle super long linker
invocations by falling back to the `@`-file syntax if the invoked command is too
large. Each OS has a limit on how many arguments and how large the arguments can
be when spawning a new process, and linkers tend to be one of those programs
that can hit the limit!

The logic implemented here is to unconditionally attempt to spawn a linker and
then if it fails to spawn with an error from the OS that indicates the command
line is too big we attempt a fallback. The fallback is roughly the same for all
linkers where an argument pointing to a file, prepended with `@`, is passed.
This file then contains all the various arguments that we want to pass to the
linker.

Closes #41190

6 years agoRemove trailing white space
Zaki Manian [Wed, 6 Sep 2017 01:46:21 +0000 (18:46 -0700)]
Remove trailing white space

6 years agoAuto merge of #43426 - qnighy:intercrate-ambiguity-hints, r=nikomatsakis
bors [Wed, 6 Sep 2017 00:28:15 +0000 (00:28 +0000)]
Auto merge of #43426 - qnighy:intercrate-ambiguity-hints, r=nikomatsakis

Add hints when intercrate ambiguity causes overlap.

I'm going to tackle #23980.

# Examples

## Trait impl overlap caused by possible downstream impl

```rust
trait Foo<X> {}
trait Bar<X> {}
impl<X, T> Foo<X> for T where T: Bar<X> {}
impl<X> Foo<X> for i32 {}

fn main() {}
```

```
error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`:
 --> test1.rs:4:1
  |
3 | impl<X, T> Foo<X> for T where T: Bar<X> {}
  | ------------------------------------------ first implementation here
4 | impl<X> Foo<X> for i32 {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
  |
  = note: downstream crates may implement Bar

error: aborting due to previous error
```

## Trait impl overlap caused by possible upstream update

```rust
trait Foo {}
impl<T> Foo for T where T: ::std::fmt::Octal {}
impl Foo for () {}

fn main() {}
```

```
error[E0119]: conflicting implementations of trait `Foo` for type `()`:
 --> test2.rs:3:1
  |
2 | impl<T> Foo for T where T: ::std::fmt::Octal {}
  | ----------------------------------------------- first implementation here
3 | impl Foo for () {}
  | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `()`
  |
  = note: upstream crates may add new impl for std::fmt::Octal in future versions

error: aborting due to previous error
```

## Inherent impl overlap caused by possible downstream impl

```rust
trait Bar<X> {}

struct A<T, X>(T, X);
impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
impl<X> A<i32, X> { fn f(&self) {} }

fn main() {}
```

```
error[E0592]: duplicate definitions with name `f`
 --> test3.rs:4:38
  |
4 | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
  |                                      ^^^^^^^^^^^^^^ duplicate definitions for `f`
5 | impl<X> A<i32, X> { fn f(&self) {} }
  |                     -------------- other definition for `f`
  |
  = note: downstream crates may implement Bar

error: aborting due to previous error
```

## Inherent impl overlap caused by possible upstream update

```rust
struct A<T>(T);

impl<T> A<T> where T: ::std::fmt::Octal { fn f(&self) {} }
impl A<()> { fn f(&self) {} }

fn main() {}
```

```
error[E0592]: duplicate definitions with name `f`
 --> test4.rs:3:43
  |
3 | impl<T> A<T> where T: ::std::fmt::Octal { fn f(&self) {} }
  |                                           ^^^^^^^^^^^^^^ duplicate definitions for `f`
4 | impl A<()> { fn f(&self) {} }
  |              -------------- other definition for `f`
  |
  = note: upstream crates may add new impl for std::fmt::Octal in future versions

error: aborting due to previous error
```

6 years agobootstrap: avoid m4 -B for NetBSD-built sparc64 OpenSSL
Jonathan A. Kollasch [Thu, 31 Aug 2017 14:36:10 +0000 (09:36 -0500)]
bootstrap: avoid m4 -B for NetBSD-built sparc64 OpenSSL

6 years agobootstrap: add openssl config for sparc64-unknown-netbsd
Jonathan A. Kollasch [Thu, 31 Aug 2017 14:34:03 +0000 (09:34 -0500)]
bootstrap: add openssl config for sparc64-unknown-netbsd

6 years agoInclude rustc in the default `./x.py install`
Josh Stone [Tue, 5 Sep 2017 21:19:22 +0000 (14:19 -0700)]
Include rustc in the default `./x.py install`

The default install used to include rustc, rust-std, and rust-docs, but
the refactoring in commit 6b3413d825fa6 make rustc only default in
extended builds.  This commit makes rustc installed by default again.

6 years agoAdd support for Vector Sum Saturated on PowerPC
Luca Barbato [Fri, 4 Aug 2017 00:19:58 +0000 (00:19 +0000)]
Add support for Vector Sum Saturated on PowerPC

6 years agoAdd support for Vector Sum Across Partial 1/4 Saturated on PowerPC
Luca Barbato [Fri, 4 Aug 2017 00:19:58 +0000 (00:19 +0000)]
Add support for Vector Sum Across Partial 1/4 Saturated on PowerPC

6 years agoAdd support for Vector Sum Across Partial 1/2 Saturated on PowerPC
Luca Barbato [Fri, 4 Aug 2017 00:19:58 +0000 (00:19 +0000)]
Add support for Vector Sum Across Partial 1/2 Saturated on PowerPC

6 years agoMake git commit info optional and per-package in channel manifests
Simon Sapin [Mon, 4 Sep 2017 15:31:29 +0000 (17:31 +0200)]
Make git commit info optional and per-package in channel manifests

At the moment it is always missing for Cargo and RLS.
Their respective build systems need to be modified to include
`git-commit-hash` files in their "dist" tarballs.

6 years agodisable gcc warnings
Ralf Jung [Tue, 5 Sep 2017 15:48:47 +0000 (17:48 +0200)]
disable gcc warnings

6 years agoadd "Implementations on Foreign Types" to the sidebar
QuietMisdreavus [Tue, 15 Aug 2017 21:05:03 +0000 (16:05 -0500)]
add "Implementations on Foreign Types" to the sidebar

6 years agoif not showing default docs on an impl, autohide the items
QuietMisdreavus [Mon, 14 Aug 2017 15:59:03 +0000 (10:59 -0500)]
if not showing default docs on an impl, autohide the items

6 years agorustdoc: add new "Implementations on Foreign Types" section to traits
QuietMisdreavus [Tue, 8 Aug 2017 20:22:04 +0000 (15:22 -0500)]
rustdoc: add new "Implementations on Foreign Types" section to traits

6 years agofactor out helper method
Niko Matsakis [Mon, 28 Aug 2017 20:50:41 +0000 (16:50 -0400)]
factor out helper method

6 years agoFix misdetection of upstream intercrate ambiguity.
Masaki Hara [Tue, 1 Aug 2017 08:07:11 +0000 (12:37 +0430)]
Fix misdetection of upstream intercrate ambiguity.

6 years agoAdd downstream tests for intercrate ambiguity hints.
Masaki Hara [Tue, 1 Aug 2017 06:53:02 +0000 (11:23 +0430)]
Add downstream tests for intercrate ambiguity hints.

6 years agoPrint more detailed trait-ref for intercrate ambiguity.
Masaki Hara [Tue, 1 Aug 2017 05:57:25 +0000 (10:27 +0430)]
Print more detailed trait-ref for intercrate ambiguity.

6 years agoUnify intercrate ambiguity emitters into a function.
Masaki Hara [Tue, 25 Jul 2017 07:52:36 +0000 (16:52 +0900)]
Unify intercrate ambiguity emitters into a function.

6 years agoFix a very subtle mistake in a ui test.
Masaki Hara [Tue, 25 Jul 2017 07:50:49 +0000 (16:50 +0900)]
Fix a very subtle mistake in a ui test.

6 years agoAdd tests for intercrate ambiguity hints.
Masaki Hara [Tue, 25 Jul 2017 06:46:26 +0000 (15:46 +0900)]
Add tests for intercrate ambiguity hints.

6 years agoSlightly modify hint messages.
Masaki Hara [Tue, 25 Jul 2017 03:17:51 +0000 (12:17 +0900)]
Slightly modify hint messages.

6 years agoAdd hints when intercrate ambiguity causes overlap.
Masaki Hara [Sun, 23 Jul 2017 13:30:47 +0000 (22:30 +0900)]
Add hints when intercrate ambiguity causes overlap.

6 years agoAuto merge of #44308 - eddyb:local-index, r=arielb1
bors [Tue, 5 Sep 2017 04:56:03 +0000 (04:56 +0000)]
Auto merge of #44308 - eddyb:local-index, r=arielb1

[MIR] Restrict ProjectionElem::Index and Storage{Live,Dead} to Local.

(see #44285)

r? @nikomatsakis

6 years agoFix link typo in 1.20.0 release notes
Wangshan Lu [Tue, 5 Sep 2017 04:27:14 +0000 (12:27 +0800)]
Fix link typo in 1.20.0 release notes

6 years agoAdd panic unit tests
Jacob Kiesel [Tue, 5 Sep 2017 02:49:46 +0000 (20:49 -0600)]
Add panic unit tests

6 years agoAuto merge of #44248 - oli-obk:spans, r=jseyfried
bors [Tue, 5 Sep 2017 02:21:02 +0000 (02:21 +0000)]
Auto merge of #44248 - oli-obk:spans, r=jseyfried

Produce expansion info for more builtin macros

r? @jseyfried

fixes #43268

6 years agoRemoved the incorrect documentation for from_str
Max Comstock [Tue, 5 Sep 2017 02:16:15 +0000 (22:16 -0400)]
Removed the incorrect documentation for from_str

6 years agostd/time: Give an example to get UNIX_EPOCH in seconds
Alexander von Gluck IV [Mon, 4 Sep 2017 16:08:08 +0000 (11:08 -0500)]
std/time: Give an example to get UNIX_EPOCH in seconds

6 years ago#12808 is closed remove the FIXME
Eh2406 [Tue, 5 Sep 2017 00:06:39 +0000 (20:06 -0400)]
#12808 is closed remove the FIXME

6 years ago#33490 is closed remove the FIXME
Eh2406 [Mon, 4 Sep 2017 23:59:16 +0000 (19:59 -0400)]
#33490 is closed remove the FIXME

6 years agoAuto merge of #43067 - pornel:libdeps, r=nrc
bors [Mon, 4 Sep 2017 23:06:59 +0000 (23:06 +0000)]
Auto merge of #43067 - pornel:libdeps, r=nrc

Compact display of static lib dependencies

Fixes #33173

Instead of displaying one dependency per line, I've changed the format to display them all in one line.

As a bonus they're in format of linker flags (`-lfoo`), so the output can be copy&pasted if one is actually going to link as suggested.

6 years agoFix tests
est31 [Mon, 4 Sep 2017 22:23:34 +0000 (00:23 +0200)]
Fix tests

6 years agoMake slice::split_at_mut example demonstrate mutability
Niels Egberts [Mon, 4 Sep 2017 21:59:34 +0000 (22:59 +0100)]
Make slice::split_at_mut example demonstrate mutability

Moved the examples from split_at_mut to split_at so the example at
split_at_mut can just demonstrate mutability.

6 years agoImprove DefIndex formatting to be more semantic
est31 [Mon, 4 Sep 2017 20:41:01 +0000 (22:41 +0200)]
Improve DefIndex formatting to be more semantic

6 years agobootstrap: only include docs in extended distribution if enabled
Jonathan A. Kollasch [Mon, 4 Sep 2017 20:41:55 +0000 (15:41 -0500)]
bootstrap: only include docs in extended distribution if enabled

Issue #44163

6 years agoAdd test for #22706
Evgeniy A. Dushistov [Mon, 4 Sep 2017 06:59:27 +0000 (09:59 +0300)]
Add test for #22706

Closes #22706

6 years agoOnly include git-commit-hash in tarballs when available
Simon Sapin [Mon, 4 Sep 2017 14:29:57 +0000 (16:29 +0200)]
Only include git-commit-hash in tarballs when available

… instead of writing an empty file.

6 years agorustbook: remove dead test functions
Ralf Jung [Mon, 4 Sep 2017 11:04:53 +0000 (13:04 +0200)]
rustbook: remove dead test functions

6 years agoAuto merge of #44194 - QuietMisdreavus:hey-how-do-i-use-this-new-fangled-thing, r...
bors [Mon, 4 Sep 2017 10:33:53 +0000 (10:33 +0000)]
Auto merge of #44194 - QuietMisdreavus:hey-how-do-i-use-this-new-fangled-thing, r=aturon

expand on using rustup custom toolchains in CONTRIBUTING.md

fixes #42484

Should i include more notes about how to use a local build *without* rustup? It can kinda feel like a cop-out otherwise. Other means that come to mind are setting `$RUSTC` directly and fully installing it.

cc @rust-lang/docs

6 years agoProduce expansion info for more builtin macros
Oliver Schneider [Fri, 1 Sep 2017 15:45:46 +0000 (17:45 +0200)]
Produce expansion info for more builtin macros

6 years agoAuto merge of #44300 - Manishearth:clippyup, r=oli-obk
bors [Mon, 4 Sep 2017 07:12:42 +0000 (07:12 +0000)]
Auto merge of #44300 - Manishearth:clippyup, r=oli-obk

Resync clippy to v0.0.156

None

6 years agorustc_mir: use Local instead of Lvalue in Storage{Live,Dead}.
Eduard-Mihai Burtescu [Mon, 4 Sep 2017 05:01:46 +0000 (08:01 +0300)]
rustc_mir: use Local instead of Lvalue in Storage{Live,Dead}.

6 years agoAuto merge of #44268 - kennytm:fix-python-bootstrap-test, r=Mark-Simulacrum
bors [Mon, 4 Sep 2017 04:30:12 +0000 (04:30 +0000)]
Auto merge of #44268 - kennytm:fix-python-bootstrap-test, r=Mark-Simulacrum

rustbuild: Remove invalid doctest from bootstrap.py

6 years agoAuto merge of #44272 - Dushistov:master, r=alexcrichton
bors [Mon, 4 Sep 2017 00:03:44 +0000 (00:03 +0000)]
Auto merge of #44272 - Dushistov:master, r=alexcrichton

add test for not optimized `pow` with constant power

Closes #34947

6 years agoimpl Debug for SplitWhitespace.
Clar Charr [Sun, 3 Sep 2017 23:13:01 +0000 (19:13 -0400)]
impl Debug for SplitWhitespace.

6 years agoResync clippy to v0.0.156
Manish Goregaokar [Sun, 3 Sep 2017 21:33:28 +0000 (14:33 -0700)]
Resync clippy to v0.0.156

6 years agoAuto merge of #44263 - durka:stabilize-discriminant, r=dtolnay
bors [Sun, 3 Sep 2017 21:32:29 +0000 (21:32 +0000)]
Auto merge of #44263 - durka:stabilize-discriminant, r=dtolnay

stabilize mem::discriminant (closes #24263)

6 years agoMinor documentation improvements for StmtKind
Zaki Manian [Sun, 3 Sep 2017 19:27:31 +0000 (12:27 -0700)]
Minor documentation improvements for StmtKind

6 years agoAuto merge of #44261 - alexcrichton:u128-ffi-unsafe, r=eddyb
bors [Sun, 3 Sep 2017 18:57:21 +0000 (18:57 +0000)]
Auto merge of #44261 - alexcrichton:u128-ffi-unsafe, r=eddyb

rustc: Flag {i,u}128 as unsafe for FFI

These don't appear to have a stable ABI as noted in #41799 and the work in
compiler-builtins definitely seems to be confirming it!

6 years agorustc_mir: use Local in ProjectionElem::Index.
Eduard-Mihai Burtescu [Sun, 3 Sep 2017 18:55:41 +0000 (21:55 +0300)]
rustc_mir: use Local in ProjectionElem::Index.

6 years agoAuto merge of #44191 - arielb1:on-unimplemented-label, r=nikomatsakis
bors [Sun, 3 Sep 2017 16:25:46 +0000 (16:25 +0000)]
Auto merge of #44191 - arielb1:on-unimplemented-label, r=nikomatsakis

More general `on_unimplemented`, with uses in `Try`

Allow `on_unimplemented` directives to specify both the label and the primary message of the trait error, and allow them to be controlled by flags - currently only to be desugaring-sensitive.

e.g.
```Rust
#[rustc_on_unimplemented(
    on(all(direct, from_desugaring="?"),
        message="the `?` operator can only be used in a \
        function that returns `Result` \
        (or another type that implements `{Try}`)",
        label="cannot use the `?` operator in a function that returns `{Self}`"),
)]
```

r? @nikomatsakis

6 years agorustc_mir: implement visit_local instead/along visit_lvalue where possible.
Eduard-Mihai Burtescu [Sun, 3 Sep 2017 16:14:31 +0000 (19:14 +0300)]
rustc_mir: implement visit_local instead/along visit_lvalue where possible.

6 years agoAuto merge of #44253 - eddyb:nice-scope, r=nikomatsakis
bors [Sun, 3 Sep 2017 12:46:14 +0000 (12:46 +0000)]
Auto merge of #44253 - eddyb:nice-scope, r=nikomatsakis

rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.

r? @nikomatsakis

6 years agoadd error message for the other case too
Ariel Ben-Yehuda [Thu, 31 Aug 2017 19:52:49 +0000 (22:52 +0300)]
add error message for the other case too

6 years agoon_unimplemented: add method-name checks and use them in Try
Ariel Ben-Yehuda [Thu, 31 Aug 2017 18:46:03 +0000 (21:46 +0300)]
on_unimplemented: add method-name checks and use them in Try

6 years agoaddress review comments
Ariel Ben-Yehuda [Thu, 31 Aug 2017 10:06:13 +0000 (13:06 +0300)]
address review comments

6 years agoenable desugaring-sensitive error messages and use them in Try
Ariel Ben-Yehuda [Wed, 30 Aug 2017 21:12:34 +0000 (00:12 +0300)]
enable desugaring-sensitive error messages and use them in Try

Maybe I should allow error messages to check the *specific* desugaring?
Thanks @huntiep for the idea!

6 years agoimplement improved on_unimplemented directives
Ariel Ben-Yehuda [Wed, 30 Aug 2017 20:40:43 +0000 (23:40 +0300)]
implement improved on_unimplemented directives

6 years agomove the on_unimplemented logic to its own file
Ariel Ben-Yehuda [Wed, 30 Aug 2017 09:35:48 +0000 (12:35 +0300)]
move the on_unimplemented logic to its own file

6 years agorefactor and centralize `on_unimplemented` parsing
Ariel Ben-Yehuda [Tue, 29 Aug 2017 21:44:29 +0000 (00:44 +0300)]
refactor and centralize `on_unimplemented` parsing

6 years agoAuto merge of #44252 - eddyb:what-is-dead-may-never-die, r=nikomatsakis
bors [Sun, 3 Sep 2017 08:40:11 +0000 (08:40 +0000)]
Auto merge of #44252 - eddyb:what-is-dead-may-never-die, r=nikomatsakis

Better StorageLive / StorageDead placement for constants.

Fixes problems in miri (see https://github.com/solson/miri/pull/324#issuecomment-326555552) caused by the new scope rules in #43932.
What I've tried to do here is always have a `StorageLive` but no `StorageDead` for `'static` slots.
It might not work perfectly in all cases, but it should unblock miri.

r? @nikomatsakis cc @oli-obk

6 years agoAuto merge of #44195 - alexcrichton:remove-used-unsafe, r=nikomatsakis
bors [Sun, 3 Sep 2017 03:24:59 +0000 (03:24 +0000)]
Auto merge of #44195 - alexcrichton:remove-used-unsafe, r=nikomatsakis

rustc: Remove the `used_unsafe` field on TyCtxt

Now that lint levels are available for the entire compilation, this can be an
entirely local lint in `effect.rs`

cc #44137

6 years agoAuto merge of #44176 - nrc:update-rls, r=alexcrichton
bors [Sun, 3 Sep 2017 00:51:47 +0000 (00:51 +0000)]
Auto merge of #44176 - nrc:update-rls, r=alexcrichton

Update rls

And expose the `CFG_VERSION` env var to tools so they can determine the version of Rust.

This gets the RLS back on master and so completes the PR dance for the generators PR.

r? @alexcrichton

6 years agoAuto merge of #44108 - mattico:match-pipe, r=petrochenkov
bors [Sat, 2 Sep 2017 22:22:54 +0000 (22:22 +0000)]
Auto merge of #44108 - mattico:match-pipe, r=petrochenkov

Implement RFC 1925

cc #44101

6 years agoMerge branch 'master' of git://github.com/rust-lang/rust
MarkMcCaskey [Sat, 2 Sep 2017 21:01:34 +0000 (17:01 -0400)]
Merge branch 'master' of git://github.com/rust-lang/rust

6 years agoupdate gcc crate
Ralf Jung [Sat, 2 Sep 2017 08:54:43 +0000 (10:54 +0200)]
update gcc crate

Use gcc::Build rather than deprecated gcc::Config.
Fixes #43973

6 years agoAuto merge of #44066 - cuviper:powerpc64-extern-abi, r=alexcrichton
bors [Sat, 2 Sep 2017 19:46:51 +0000 (19:46 +0000)]
Auto merge of #44066 - cuviper:powerpc64-extern-abi, r=alexcrichton

powerpc64: improve extern struct ABI

These fixes all have to do with the 64-bit PowerPC ELF ABI for big-endian
targets.  The ELF v2 ABI for powerpc64le already worked well.

- Return after marking return aggregates indirect. Fixes #42757.
- Pass one-member float aggregates as direct argument values.
- Aggregate arguments less than 64-bit must be written in the least-
  significant bits of the parameter space.
- Larger aggregates are instead padded at the tail.
  (i.e. filling MSBs, padding the remaining LSBs.)

New tests were also added for the single-float aggregate, and a 3-byte
aggregate to check that it's filled into LSBs.  Overall, at least these
formerly-failing tests now pass on powerpc64:

- run-make/extern-fn-struct-passing-abi
- run-make/extern-fn-with-packed-struct
- run-pass/extern-pass-TwoU16s.rs
- run-pass/extern-pass-TwoU8s.rs
- run-pass/struct-return.rs