]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoci: haiku: rename llvm-config to address tidy issues.
Jessica Hamilton [Sat, 16 Sep 2017 02:51:50 +0000 (21:51 -0500)]
ci: haiku: rename llvm-config to address tidy issues.

6 years agoci: move dist-x86_64-haiku into disabled.
Jessica Hamilton [Sat, 16 Sep 2017 00:04:24 +0000 (19:04 -0500)]
ci: move dist-x86_64-haiku into disabled.

6 years agoci: introduce haiku x86_64 builder
Jessica Hamilton [Wed, 6 Sep 2017 17:07:05 +0000 (12:07 -0500)]
ci: introduce haiku x86_64 builder

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 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 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 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 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 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 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 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 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

6 years agoAuto merge of #43886 - oli-obk:clippy, r=nrc
bors [Sat, 2 Sep 2017 17:17:14 +0000 (17:17 +0000)]
Auto merge of #43886 - oli-obk:clippy, r=nrc

Add clippy as a submodule

~~This builds clippy as part of `./x.py build` (locally and in CI).~~

This allows building clippy with `./x.py build src/tools/clippy`

~~Needs https://github.com/nrc/dev-tools-team/issues/18#issuecomment-322456461 to be resolved before it can be merged.~~ Contributers can simply open a PR to clippy and point the submodule at the `pull/$pr_number/head` branch.

This does **not** build clippy or test the clippy test suite at all as per https://github.com/nrc/dev-tools-team/issues/18#issuecomment-321411418

r? @nrc

cc @Manishearth @llogiq @mcarton @alexcrichton

6 years agoadd test for not optimized `pow` with constant power
Evgeniy A. Dushistov [Sat, 2 Sep 2017 16:10:00 +0000 (19:10 +0300)]
add test for not optimized `pow` with constant power

Closes #34947

6 years agoRemove invalid doctest from bootstrap.py.
kennytm [Sat, 2 Sep 2017 11:59:53 +0000 (19:59 +0800)]
Remove invalid doctest from bootstrap.py.

Make sure that if the test is failed, the CI will stop the build.

6 years agoAuto merge of #44259 - Mark-Simulacrum:update-cargo, r=alexcrichton
bors [Sat, 2 Sep 2017 13:43:53 +0000 (13:43 +0000)]
Auto merge of #44259 - Mark-Simulacrum:update-cargo, r=alexcrichton

Update cargo

This includes https://github.com/rust-lang/cargo/pull/4447 which fixes a bug in Cargo that is needed to fix https://github.com/rust-lang/rust/issues/44237.

r? @alexcrichton

6 years agoMinor compilation fix
Kornel [Sat, 2 Sep 2017 11:14:30 +0000 (12:14 +0100)]
Minor compilation fix

6 years agoAuto merge of #44256 - GuillaumeGomez:update-html-diff-rs, r=Mark-Simulacrum
bors [Sat, 2 Sep 2017 11:07:49 +0000 (11:07 +0000)]
Auto merge of #44256 - GuillaumeGomez:update-html-diff-rs, r=Mark-Simulacrum

Update html-diff-rs version

r? @nrc

6 years agoAuto merge of #44104 - llogiq:lowercase-lints, r=nikomatsakis
bors [Sat, 2 Sep 2017 08:38:12 +0000 (08:38 +0000)]
Auto merge of #44104 - llogiq:lowercase-lints, r=nikomatsakis

add a lowercase suggestion to unknown_lints

I recently wrote some tests for a clippy lint, copied the (uppercase) lint name into my test file and forgot to toggle the case. This PR adds a suggestion that would have saved me 10 minutes of debugging, so it's likely a net win ðŸ™‚ . Also it adds a UI test for the `unknown_lints` lint.

6 years agostabilize mem::discriminant (closes #24263)
Alex Burka [Sat, 2 Sep 2017 05:59:54 +0000 (01:59 -0400)]
stabilize mem::discriminant (closes #24263)

6 years agorustc: Flag {i,u}128 as unsafe for FFI
Alex Crichton [Sat, 2 Sep 2017 04:34:51 +0000 (21:34 -0700)]
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 agoUpdate cargo.
Mark Simulacrum [Sat, 2 Sep 2017 03:15:47 +0000 (21:15 -0600)]
Update cargo.

This includes https://github.com/rust-lang/cargo/pull/4447 which fixes
a bug in Cargo that is needed to fix
https://github.com/rust-lang/rust/issues/44237.

6 years agox86: return single-float aggregates in a float register
Josh Stone [Fri, 1 Sep 2017 23:05:19 +0000 (16:05 -0700)]
x86: return single-float aggregates in a float register

Following Clang's lead, and anecdotal evidence from the `float_one` part
of `run-make/extern-fn-struct-passing-abi`, use a floating point
register to return single-float aggregates, except on MSVC targets.

6 years agoExclude all windows-gnu from the float_one test
Josh Stone [Wed, 30 Aug 2017 19:26:01 +0000 (12:26 -0700)]
Exclude all windows-gnu from the float_one test

6 years agoExclude x86_64-pc-windows-gnu from the float_one test
Josh Stone [Tue, 29 Aug 2017 21:48:59 +0000 (14:48 -0700)]
Exclude x86_64-pc-windows-gnu from the float_one test

6 years agopowerpc64: improve extern struct ABI
Josh Stone [Wed, 23 Aug 2017 21:38:45 +0000 (17:38 -0400)]
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

6 years agorustc_mir: always emit StorageLive even without a matching StorageDead.
Eduard-Mihai Burtescu [Fri, 1 Sep 2017 19:53:54 +0000 (22:53 +0300)]
rustc_mir: always emit StorageLive even without a matching StorageDead.

6 years agorustc_mir: actually "promote" constants' MIR to 'static by removing StorageDead's.
Eduard-Mihai Burtescu [Fri, 1 Sep 2017 19:04:09 +0000 (22:04 +0300)]
rustc_mir: actually "promote" constants' MIR to 'static by removing StorageDead's.

6 years agoUpdate html-diff-rs version
Guillaume Gomez [Fri, 1 Sep 2017 22:16:55 +0000 (00:16 +0200)]
Update html-diff-rs version

6 years agoFix unstable book example
Matt Ickstadt [Fri, 1 Sep 2017 21:16:36 +0000 (16:16 -0500)]
Fix unstable book example

6 years agorustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.
Eduard-Mihai Burtescu [Thu, 31 Aug 2017 18:37:38 +0000 (21:37 +0300)]
rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.

6 years agoFix arm visitor
Matt Ickstadt [Fri, 1 Sep 2017 19:39:46 +0000 (14:39 -0500)]
Fix arm visitor

6 years agoImplement RFC 1925
Matt Ickstadt [Sat, 26 Aug 2017 22:09:31 +0000 (17:09 -0500)]
Implement RFC 1925

6 years agoAuto merge of #44154 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum
bors [Fri, 1 Sep 2017 16:39:31 +0000 (16:39 +0000)]
Auto merge of #44154 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum

Bump to 1.22.0 and update boostrap compiler

Time to get a new nightly!

6 years agoUpdate git2-rs to fix cross compiles
Alex Crichton [Fri, 1 Sep 2017 14:56:44 +0000 (07:56 -0700)]
Update git2-rs to fix cross compiles

6 years agoAuto merge of #44238 - nrc:pulldown-warn, r=@QuietMisdreavus
bors [Fri, 1 Sep 2017 13:56:22 +0000 (13:56 +0000)]
Auto merge of #44238 - nrc:pulldown-warn, r=@QuietMisdreavus

Improve the Pulldown/hoedown warnings

cc #44229

r? @QuietMisdreavus

6 years agoAuto merge of #44171 - eddyb:scope, r=nikomatsakis
bors [Fri, 1 Sep 2017 10:40:18 +0000 (10:40 +0000)]
Auto merge of #44171 - eddyb:scope, r=nikomatsakis

Use hir::ItemLocalId instead of ast::NodeId in rustc::middle::region::CodeExtent.

This is an alternative to @michaelwoerister's #43887, changing `CodeExtent` instead of `ReScope`.

The benefit here is that the same `Region`s are used same-crate and cross-crate, while preserving the incremental recompilation properties of the stable `hir::ItemLocalId`.

Only places which needed to get back to the `ast::NodeId` from `CodeExtent` was its `span` method, used in error reporting - passing the `&RegionMaps` down allowed using `hir_to_node_id`.
`rustc::cfg` and `dataflow` also had to be converted to `hir::ItemLocalId` because of their interactions with `CodeExtent`, especially in `borrowck`, and from that we have 3 more `hir_to_node_id` calls: `cfg::graphviz` node labels, `borrowck` move reporting, and the `unconditional_recursion` lint.

Out of all of those, *only* the lint actually makes a decision (on whether code will compile) based on the result of the conversion, the others only use it to know how to print information to the user.
So I think we're safe to say that the bulk of the code working with a `CodeExtent` is fine with local IDs.

r? @nikomatsakis

6 years agorustc: use hir::ItemLocalId instead of ast::NodeId in CodeExtent.
Eduard-Mihai Burtescu [Tue, 29 Aug 2017 16:24:49 +0000 (19:24 +0300)]
rustc: use hir::ItemLocalId instead of ast::NodeId in CodeExtent.

6 years agorustc: take TyCtxt and RegionMaps in CodeMap::span.
Eduard-Mihai Burtescu [Tue, 29 Aug 2017 23:39:06 +0000 (02:39 +0300)]
rustc: take TyCtxt and RegionMaps in CodeMap::span.

6 years agorustc: use hir::ItemLocalId instead of ast::NodeId in CFG.
Eduard-Mihai Burtescu [Tue, 29 Aug 2017 16:27:30 +0000 (19:27 +0300)]
rustc: use hir::ItemLocalId instead of ast::NodeId in CFG.

6 years agoFix tests
Nick Cameron [Fri, 1 Sep 2017 06:15:10 +0000 (18:15 +1200)]
Fix tests

This is just undoing changes from #41991 because we are not running markdown rendering twice.

6 years agoAuto merge of #44233 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Fri, 1 Sep 2017 04:50:00 +0000 (04:50 +0000)]
Auto merge of #44233 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 10 pull requests

- Successful merges: #44192, #44199, #44202, #44203, #44205, #44207, #44209, #44223, #44230, #44231
- Failed merges:

6 years agoWindows line endings
Nick Cameron [Fri, 1 Sep 2017 04:15:25 +0000 (16:15 +1200)]
Windows line endings

6 years agoDo a better job of eliding whitespace-only differences from warnings
Nick Cameron [Fri, 1 Sep 2017 03:34:44 +0000 (15:34 +1200)]
Do a better job of eliding whitespace-only differences from warnings

6 years agoImprove the appearance of markdown warnings
Nick Cameron [Fri, 1 Sep 2017 01:37:26 +0000 (13:37 +1200)]
Improve the appearance of markdown warnings

6 years agoBring back stage0 allocator logic on MSVC
Alex Crichton [Thu, 31 Aug 2017 14:07:54 +0000 (07:07 -0700)]
Bring back stage0 allocator logic on MSVC

I think there may still be bugs preventing its removal..

6 years agorustdoc: collect rendering warnings and print them in one place
Nick Cameron [Fri, 1 Sep 2017 00:24:26 +0000 (12:24 +1200)]
rustdoc: collect rendering warnings and print them in one place

6 years agoRollup merge of #44231 - lukaramu:patch-1, r=alexcrichton
Mark Simulacrum [Fri, 1 Sep 2017 00:07:49 +0000 (18:07 -0600)]
Rollup merge of #44231 - lukaramu:patch-1, r=alexcrichton

Fix release notes on associated constants

Associated constants seem to be stable everywhere, not just in traits

6 years agoRollup merge of #44230 - Phlosioneer:patch-1, r=sfackler
Mark Simulacrum [Fri, 1 Sep 2017 00:07:48 +0000 (18:07 -0600)]
Rollup merge of #44230 - Phlosioneer:patch-1, r=sfackler

Fix typo in 1.20.0 release notes

str::from_boxed_utf8_unchecked rather than ste::

6 years agoRollup merge of #44223 - eddyb:symbol-from-str, r=jseyfried
Mark Simulacrum [Fri, 1 Sep 2017 00:07:47 +0000 (18:07 -0600)]
Rollup merge of #44223 - eddyb:symbol-from-str, r=jseyfried

Implement From<&str> for Symbol.

This lets us have `fn foo<S: Into<Symbol>>` bounds and accept both `&str` and existing `Symbol`s.

r? @jseyfried

6 years agoRollup merge of #44209 - frewsxcv:frewsxcv-addr-other-scenarios, r=alexcrichton
Mark Simulacrum [Fri, 1 Sep 2017 00:07:46 +0000 (18:07 -0600)]
Rollup merge of #44209 - frewsxcv:frewsxcv-addr-other-scenarios, r=alexcrichton

Expand docs of multi-address behavior of some UDP/TCP APIs.

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

6 years agoRollup merge of #44207 - durka:define-maps-fn, r=eddyb
Mark Simulacrum [Fri, 1 Sep 2017 00:07:45 +0000 (18:07 -0600)]
Rollup merge of #44207 - durka:define-maps-fn, r=eddyb

add `fn` to syntax of rustc::ty::maps::define_maps

This is not a functional change, it just makes it possible to find a query by grepping without knowing that it's a query rather than a function.

I didn't pursue renaming everything from "map" to "query" because it seems to be a very invasive change. It would be a good test to exercise an IDE's renaming features.

Closes #44161

r? @eddyb

6 years agoRollup merge of #44205 - frewsxcv:frewsxcv-addr-doc-fix, r=QuietMisdreavus
Mark Simulacrum [Fri, 1 Sep 2017 00:07:44 +0000 (18:07 -0600)]
Rollup merge of #44205 - frewsxcv:frewsxcv-addr-doc-fix, r=QuietMisdreavus

Fix typo in doc `ToSocketAddrs` example.

None

6 years agoRollup merge of #44203 - cuviper:compiler-rt-test, r=Mark-Simulacrum
Mark Simulacrum [Fri, 1 Sep 2017 00:07:43 +0000 (18:07 -0600)]
Rollup merge of #44203 - cuviper:compiler-rt-test, r=Mark-Simulacrum

rustbuild: update the rust-src filter for compiler-rt

We wanted `src/compiler-rt/test` filtered from the `rust-src` package,
but that path is now `src/libcompiler_builtins/compiler-rt/test`.  This
saves over half of the installed rust-src size. (50MB -> 22MB)

6 years agoRollup merge of #44202 - alexcrichton:xcrate-generators, r=arielb1
Mark Simulacrum [Fri, 1 Sep 2017 00:07:42 +0000 (18:07 -0600)]
Rollup merge of #44202 - alexcrichton:xcrate-generators, r=arielb1

rustc: Fix reachability with cross-crate generators

Same solution as in f2df1857

Closes #44181

6 years agoRollup merge of #44199 - jakllsch:jakllsch-abcc6c4a-0caf-4d30-b336-39629c73d3f5,...
Mark Simulacrum [Fri, 1 Sep 2017 00:07:41 +0000 (18:07 -0600)]
Rollup merge of #44199 - jakllsch:jakllsch-abcc6c4a-0caf-4d30-b336-39629c73d3f5, r=sfackler

bootstrap: add openssl configuration mapping for i686-unknown-netbsd

6 years agoRollup merge of #44192 - GuillaumeGomez:sub-fields-style, r=QuietMisdreavus
Mark Simulacrum [Fri, 1 Sep 2017 00:07:40 +0000 (18:07 -0600)]
Rollup merge of #44192 - GuillaumeGomez:sub-fields-style, r=QuietMisdreavus

Fix invalid display of enum sub-fields docs

Before:

<img width="1440" alt="screen shot 2017-08-30 at 23 17 00" src="https://user-images.githubusercontent.com/3050060/29895433-61f2bf8c-8dd9-11e7-83e8-cf1dca878100.png">

After:

<img width="1440" alt="screen shot 2017-08-30 at 23 16 48" src="https://user-images.githubusercontent.com/3050060/29895441-66dea042-8dd9-11e7-9576-11b0c770c70b.png">

cc @nox @rust-lang/docs

6 years agoAuto merge of #43425 - matklad:lambda-restrictions, r=eddyb
bors [Thu, 31 Aug 2017 23:26:47 +0000 (23:26 +0000)]
Auto merge of #43425 - matklad:lambda-restrictions, r=eddyb

Lambda expressions honor no struct literal restriction

This is a fix for #43412 if we decide that it is indeed a bug :)

closes #43412

6 years agoOnly emit warnings if the user is using Pulldown
Nick Cameron [Thu, 31 Aug 2017 23:22:18 +0000 (11:22 +1200)]
Only emit warnings if the user is using Pulldown

Also checks for differences after eliminating whitespace-only diffs.

Renames get_html_diff

6 years agoFix release note on associated constants
Lukas H [Thu, 31 Aug 2017 23:17:08 +0000 (01:17 +0200)]
Fix release note on associated constants

Associated constants seem to be stable everywhere, not just in traits

6 years agoFix typo in 1.20.0 release notes
Phlosioneer [Thu, 31 Aug 2017 23:12:07 +0000 (19:12 -0400)]
Fix typo in 1.20.0 release notes

str::from_boxed_utf8_unchecked rather than ste::

6 years agoImplement From<&str> for Symbol.
Eduard-Mihai Burtescu [Thu, 31 Aug 2017 20:23:52 +0000 (23:23 +0300)]
Implement From<&str> for Symbol.

6 years agoadd a lowercase suggestion to unknown_lints
Andre Bogus [Sat, 26 Aug 2017 20:18:04 +0000 (22:18 +0200)]
add a lowercase suggestion to unknown_lints

6 years agoExpand docs of multi-address behavior of some UDP/TCP APIs.
Corey Farwell [Thu, 31 Aug 2017 02:11:48 +0000 (22:11 -0400)]
Expand docs of multi-address behavior of some UDP/TCP APIs.

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

6 years agoUpdate Cargo to 0.23.0 and our lockfile
Alex Crichton [Mon, 28 Aug 2017 15:57:37 +0000 (08:57 -0700)]
Update Cargo to 0.23.0 and our lockfile

6 years agoBump to 1.22.0
Alex Crichton [Mon, 28 Aug 2017 15:55:45 +0000 (08:55 -0700)]
Bump to 1.22.0

6 years agoUpdate bootstrap compiler
Alex Crichton [Fri, 25 Aug 2017 15:39:02 +0000 (08:39 -0700)]
Update bootstrap compiler

This commit updates the bootstrap compiler and clears out a number
of #[cfg(stage0)] annotations and related business