]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agomove codegenunitext to rustc::mir::mono
Mark Mansi [Fri, 24 May 2019 16:19:53 +0000 (11:19 -0500)]
move codegenunitext to rustc::mir::mono

5 years agomove monoitemext to inherent methods
Mark Mansi [Fri, 24 May 2019 15:57:30 +0000 (10:57 -0500)]
move monoitemext to inherent methods

5 years agomove DefPathBasedNames to ty::print::obsolete
Mark Mansi [Thu, 23 May 2019 18:48:27 +0000 (13:48 -0500)]
move DefPathBasedNames to ty::print::obsolete

5 years agoremove reexports of mir::mono::{MonoItem,CodegenUnit}
Mark Mansi [Thu, 23 May 2019 18:10:11 +0000 (13:10 -0500)]
remove reexports of mir::mono::{MonoItem,CodegenUnit}

5 years agomove single-use function
Mark Mansi [Thu, 23 May 2019 18:00:08 +0000 (13:00 -0500)]
move single-use function

5 years agodeduplicate ty::Instance constructors
Mark Mansi [Thu, 23 May 2019 17:45:22 +0000 (12:45 -0500)]
deduplicate ty::Instance constructors

5 years agoremove reexport of rustc::ty::Instance
Mark Mansi [Thu, 23 May 2019 17:15:48 +0000 (12:15 -0500)]
remove reexport of rustc::ty::Instance

5 years agoAuto merge of #61295 - RalfJung:miri, r=oli-obk
bors [Sun, 2 Jun 2019 21:15:35 +0000 (21:15 +0000)]
Auto merge of #61295 - RalfJung:miri, r=oli-obk

update miri

r? @oli-obk

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

5 years agoupdate miri
Ralf Jung [Sun, 2 Jun 2019 21:12:33 +0000 (23:12 +0200)]
update miri

5 years agoAuto merge of #61278 - RalfJung:miri-tag-allocations, r=oli-obk
bors [Sun, 2 Jun 2019 17:25:58 +0000 (17:25 +0000)]
Auto merge of #61278 - RalfJung:miri-tag-allocations, r=oli-obk

Miri: give machine the chance to tag all allocations

r? @oli-obk

The Miri side of this is at https://github.com/rust-lang/rust/pull/61278.

5 years agoAuto merge of #61460 - Centril:rollup-8txhjx4, r=Centril
bors [Sun, 2 Jun 2019 14:42:11 +0000 (14:42 +0000)]
Auto merge of #61460 - Centril:rollup-8txhjx4, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #61380 (Fix some issues with `unwrap_usize` instead of `assert_usize`)
 - #61423 (codegen: change `$6d$` to `$u6d$`)
 - #61438 (Point at individual type args on arg count mismatch)
 - #61441 (Tweak wording when encountering `fn` call in pattern)
 - #61451 (Fix missing semicolon in doc)
 - #61458 (Fix typo in AsRef doc)

Failed merges:

r? @ghost

5 years agoRollup merge of #61458 - fabric-and-ink:doc-typo, r=jonas-schievink
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:53 +0000 (15:23 +0200)]
Rollup merge of #61458 - fabric-and-ink:doc-typo, r=jonas-schievink

Fix typo in AsRef doc

5 years agoRollup merge of #61451 - 0x1793d1:master, r=Centril
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:52 +0000 (15:23 +0200)]
Rollup merge of #61451 - 0x1793d1:master, r=Centril

Fix missing semicolon in doc

A semicolon is missing in the examples of compile_error.
Macros that expand to items must be delimited with braces or followed by a semicolon.

5 years agoRollup merge of #61441 - estebank:fn-call-in-match, r=varkor
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:50 +0000 (15:23 +0200)]
Rollup merge of #61441 - estebank:fn-call-in-match, r=varkor

Tweak wording when encountering `fn` call in pattern

Fix #60642

5 years agoRollup merge of #61438 - estebank:generics-span, r=varkor
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:49 +0000 (15:23 +0200)]
Rollup merge of #61438 - estebank:generics-span, r=varkor

Point at individual type args on arg count mismatch

- Point at individual type arguments on arg count mismatch
- Make generics always have a valid span, even when there are no args
- Explain that `impl Trait` introduces an implicit type argument

Fix #55991.

5 years agoRollup merge of #61423 - davidtwco:correct-symbol-mangling, r=eddyb
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:47 +0000 (15:23 +0200)]
Rollup merge of #61423 - davidtwco:correct-symbol-mangling, r=eddyb

codegen: change `$6d$` to `$u6d$`

This changes a mistake introduced in #61195 where the mangling
workaround used was incorrect, resolving [this comment](https://github.com/rust-lang/rust/pull/61195#discussion_r289597707) from @eddyb.

r? @eddyb

5 years agoRollup merge of #61380 - varkor:expected-usize-got-param, r=eddyb
Mazdak Farrokhzad [Sun, 2 Jun 2019 13:23:46 +0000 (15:23 +0200)]
Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddyb

Fix some issues with `unwrap_usize` instead of `assert_usize`

Fixes https://github.com/rust-lang/rust/issues/61337.
Fixes https://github.com/rust-lang/rust/issues/61341.
Fixes https://github.com/rust-lang/rust/issues/61422.

r? @eddyb

5 years agoFix typo in AsRef doc
Fabian Drinck [Sun, 2 Jun 2019 12:12:06 +0000 (14:12 +0200)]
Fix typo in AsRef doc

5 years agoAuto merge of #61276 - eddyb:kill-res-upvar, r=petrochenkov
bors [Sun, 2 Jun 2019 11:46:13 +0000 (11:46 +0000)]
Auto merge of #61276 - eddyb:kill-res-upvar, r=petrochenkov

rustc: remove Res::Upvar.

By keeping track of the current "`body_owner`" (the `DefId` of the current fn/closure/const/etc.) in several passes, `Res::Upvar` and `hir::Upvar` don't need to contain contextual information about the closure.

By leveraging [`indexmap`](https://docs.rs/indexmap), the list of upvars for a given closure can now also be queried, to check whether a local variable is a closure capture, and so `Res::Upvar` can be merged with `Res::Local`.

And finally, the `tcx.upvars(...)` query now collects upvars from HIR, without relying on `rustc_resolve`.

r? @petrochenkov cc @varkor @davidtwco

5 years agoupdate comments
Ralf Jung [Wed, 29 May 2019 13:16:18 +0000 (15:16 +0200)]
update comments

5 years agoFIXME
Ralf Jung [Wed, 29 May 2019 12:49:02 +0000 (14:49 +0200)]
FIXME

5 years agofix indentation
Ralf Jung [Wed, 29 May 2019 09:52:14 +0000 (11:52 +0200)]
fix indentation

5 years agoturn comments into doc-comments
Ralf Jung [Wed, 29 May 2019 09:51:43 +0000 (11:51 +0200)]
turn comments into doc-comments

5 years agofix comments
Ralf Jung [Tue, 28 May 2019 17:08:14 +0000 (19:08 +0200)]
fix comments

5 years agono longer assume that there is a default tag: give the machine the chance to tag...
Ralf Jung [Tue, 28 May 2019 08:44:46 +0000 (10:44 +0200)]
no longer assume that there is a default tag: give the machine the chance to tag all allocations

5 years agoFix missing semicolon in doc
0x1793d1 [Sun, 2 Jun 2019 08:23:33 +0000 (10:23 +0200)]
Fix missing semicolon in doc

A semicolon is missing in the examples of compile_error.
Macros that expand to items must be delimited with braces or followed by a semicolon.

5 years agocache tag for vtable; fn_alloc's don't have a stack nor tag
Ralf Jung [Sat, 25 May 2019 11:48:56 +0000 (13:48 +0200)]
cache tag for vtable; fn_alloc's don't have a stack nor tag

5 years agoAuto merge of #61384 - varkor:fmin-fmax-llvm-opt, r=alexcrichton
bors [Sun, 2 Jun 2019 04:10:25 +0000 (04:10 +0000)]
Auto merge of #61384 - varkor:fmin-fmax-llvm-opt, r=alexcrichton

Update LLVM to include fmin/fmax optimisations

This will enable us to test if the optimisation issues mentioned in https://github.com/rust-lang/rust/issues/18384 really are fixed. Unfortunately, using the intrinsics immediately is problematic due to the libcore/libstd split (see https://github.com/rust-lang/rust/issues/50145).

5 years agoreview comments: use param kind type to identify impl Trait
Esteban Küber [Sat, 1 Jun 2019 22:39:12 +0000 (15:39 -0700)]
review comments: use param kind type to identify impl Trait

5 years agoAuto merge of #61299 - eddyb:nicer-llvm-builder, r=rkruppe
bors [Sun, 2 Jun 2019 01:12:36 +0000 (01:12 +0000)]
Auto merge of #61299 - eddyb:nicer-llvm-builder, r=rkruppe

rustc_codegen_llvm: a couple builder niceties.

r? @nagisa cc @sunfishcode @rkruppe

5 years agoAdd regression test for #61422
varkor [Sat, 1 Jun 2019 10:57:22 +0000 (11:57 +0100)]
Add regression test for #61422

5 years agoAdd error for pattern-matching on arrays without a fixed size
varkor [Fri, 31 May 2019 21:27:26 +0000 (22:27 +0100)]
Add error for pattern-matching on arrays without a fixed size

5 years agoUse `assert_usize` instead of `unwrap_usize` in several places
varkor [Thu, 30 May 2019 23:26:30 +0000 (00:26 +0100)]
Use `assert_usize` instead of `unwrap_usize` in several places

5 years agoFix unwrapping usize issue with transparent MaybeUnit array wrapper
varkor [Thu, 30 May 2019 23:12:24 +0000 (00:12 +0100)]
Fix unwrapping usize issue with transparent MaybeUnit array wrapper

5 years agoTweak wording when encountering `fn` call in pattern
Esteban Küber [Sat, 1 Jun 2019 20:34:53 +0000 (13:34 -0700)]
Tweak wording when encountering `fn` call in pattern

5 years agoAuto merge of #61436 - Manishearth:clippyup, r=Manishearth
bors [Sat, 1 Jun 2019 18:58:54 +0000 (18:58 +0000)]
Auto merge of #61436 - Manishearth:clippyup, r=Manishearth

Update clippy

r? @ghost

5 years agoExplain that `impl Trait` introduces an implicit type argument
Esteban Küber [Sat, 1 Jun 2019 18:33:38 +0000 (11:33 -0700)]
Explain that `impl Trait` introduces an implicit type argument

5 years agorustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.
Eduard-Mihai Burtescu [Wed, 29 May 2019 01:46:55 +0000 (04:46 +0300)]
rustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.

5 years agorustc_codegen_llvm: pretty up a few builder methods with a macro.
Eduard-Mihai Burtescu [Wed, 29 May 2019 01:34:33 +0000 (04:34 +0300)]
rustc_codegen_llvm: pretty up a few builder methods with a macro.

5 years agoUpdate clippy
Manish Goregaokar [Sat, 1 Jun 2019 17:50:55 +0000 (10:50 -0700)]
Update clippy

5 years agorustc: collect upvars from HIR, instead of during name resolution.
Eduard-Mihai Burtescu [Tue, 28 May 2019 20:31:01 +0000 (23:31 +0300)]
rustc: collect upvars from HIR, instead of during name resolution.

5 years agoPoint at individual type arguments on arg count mismatch
Esteban Küber [Sat, 1 Jun 2019 17:35:31 +0000 (10:35 -0700)]
Point at individual type arguments on arg count mismatch

5 years agorustc_resolve: never push `ClosureRibKind` to `label_ribs`.
Eduard-Mihai Burtescu [Tue, 28 May 2019 20:50:30 +0000 (23:50 +0300)]
rustc_resolve: never push `ClosureRibKind` to `label_ribs`.

5 years agorustc: remove Res::Upvar.
Eduard-Mihai Burtescu [Tue, 28 May 2019 15:06:01 +0000 (18:06 +0300)]
rustc: remove Res::Upvar.

5 years agorustc: remove `has_parent` from `hir::Upvar`.
Eduard-Mihai Burtescu [Tue, 28 May 2019 14:12:24 +0000 (17:12 +0300)]
rustc: remove `has_parent` from `hir::Upvar`.

5 years agorustc: track the body owner in liveness.
Eduard-Mihai Burtescu [Mon, 27 May 2019 17:33:59 +0000 (20:33 +0300)]
rustc: track the body owner in liveness.

5 years agorustc: remove closure ID from Res::Upvar.
Eduard-Mihai Burtescu [Mon, 20 May 2019 18:51:55 +0000 (21:51 +0300)]
rustc: remove closure ID from Res::Upvar.

5 years agorustc: track the body owner DefId in MC and EUV.
Eduard-Mihai Burtescu [Wed, 22 May 2019 14:02:40 +0000 (17:02 +0300)]
rustc: track the body owner DefId in MC and EUV.

5 years agorustc: use indexmap instead of a plain vector for upvars.
Eduard-Mihai Burtescu [Tue, 14 May 2019 16:42:57 +0000 (19:42 +0300)]
rustc: use indexmap instead of a plain vector for upvars.

5 years agoAuto merge of #61350 - RalfJung:alloc, r=oli-obk
bors [Sat, 1 Jun 2019 16:06:11 +0000 (16:06 +0000)]
Auto merge of #61350 - RalfJung:alloc, r=oli-obk

light refactoring of global AllocMap

* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind.
* rename the methods that allocate stuff to have consistent names.

Cc @oli-obk

5 years agorustc: remove the closure ID from hir::Upvar's parent field.
Eduard-Mihai Burtescu [Tue, 7 May 2019 01:40:36 +0000 (04:40 +0300)]
rustc: remove the closure ID from hir::Upvar's parent field.

5 years agorustc: remove the index field from Res::Upvar.
Eduard-Mihai Burtescu [Sat, 4 May 2019 02:05:38 +0000 (05:05 +0300)]
rustc: remove the index field from Res::Upvar.

5 years agorustc: replace Res in hir::Upvar with only Local/Upvar data.
Eduard-Mihai Burtescu [Sat, 4 May 2019 02:06:52 +0000 (05:06 +0300)]
rustc: replace Res in hir::Upvar with only Local/Upvar data.

5 years agoAuto merge of #61388 - Amanieu:hashbrown4, r=alexcrichton
bors [Sat, 1 Jun 2019 11:10:11 +0000 (11:10 +0000)]
Auto merge of #61388 - Amanieu:hashbrown4, r=alexcrichton

Bump hashbrown to 0.4.0

Fixes #61357

This also includes rust-lang/hashbrown#80.

5 years agocodegen: change `$6d$` to `$u6d$`
David Wood [Sat, 1 Jun 2019 10:37:11 +0000 (11:37 +0100)]
codegen: change `$6d$` to `$u6d$`

This changes a mistake introduced in #61195 where the mangling
workaround used was incorrect.

5 years agoBump hashbrown to 0.4.0
Amanieu d'Antras [Fri, 31 May 2019 07:40:14 +0000 (08:40 +0100)]
Bump hashbrown to 0.4.0

Fixes #61357

5 years agoAuto merge of #61418 - Centril:rollup-yvj33a1, r=Centril
bors [Sat, 1 Jun 2019 06:34:15 +0000 (06:34 +0000)]
Auto merge of #61418 - Centril:rollup-yvj33a1, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #60729 (Expand dynamic drop tests for cases in #47949)
 - #61263 (Don't generate div inside header (h4/h3/h...) elements)
 - #61364 (Stabilize reverse_bits feature)
 - #61375 (Make "panic did not include expected string" message consistent)
 - #61387 (Remove ty::BrFresh and RegionConstraintCollector::new_bound)
 - #61389 (Remove GlobalArenas and use Arena instead)
 - #61391 (Doc comment fixes for `rustc::mir::interpret::InterpretCx`)
 - #61403 (Remove unnecessary `-Z continue-parse-after-error` from tests)

Failed merges:

r? @ghost

5 years agoMake generics always have a valid span
Esteban Küber [Sat, 1 Jun 2019 05:19:30 +0000 (22:19 -0700)]
Make generics always have a valid span

5 years agoRollup merge of #61403 - estebank:test-cleanup, r=petrochenkov
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:10 +0000 (06:50 +0200)]
Rollup merge of #61403 - estebank:test-cleanup, r=petrochenkov

Remove unnecessary `-Z continue-parse-after-error` from tests

r? @petrochenkov

5 years agoRollup merge of #61391 - wesleywiser:doc_comments_interpretcx, r=Centril
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:09 +0000 (06:50 +0200)]
Rollup merge of #61391 - wesleywiser:doc_comments_interpretcx, r=Centril

Doc comment fixes for `rustc::mir::interpret::InterpretCx`

Fixes some stuff I noticed while working in const-prop.

5 years agoRollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:07 +0000 (06:50 +0200)]
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb

Remove GlobalArenas and use Arena instead

r? @eddyb

5 years agoRollup merge of #61387 - JohnTitor:remove-unused, r=matthewjasper
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:06 +0000 (06:50 +0200)]
Rollup merge of #61387 - JohnTitor:remove-unused, r=matthewjasper

Remove ty::BrFresh and RegionConstraintCollector::new_bound

Fixes #60957

r? @matthewjasper

5 years agoRollup merge of #61375 - varkor:panic-contains-string-lowercase, r=Centril
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:05 +0000 (06:50 +0200)]
Rollup merge of #61375 - varkor:panic-contains-string-lowercase, r=Centril

Make "panic did not include expected string" message consistent

Note messages are typically lowercase.

5 years agoRollup merge of #61364 - lzutao:stabilize-reverse_bits, r=Centril
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:03 +0000 (06:50 +0200)]
Rollup merge of #61364 - lzutao:stabilize-reverse_bits, r=Centril

Stabilize reverse_bits feature

FCP done in https://github.com/rust-lang/rust/issues/48763#issuecomment-497349379

Closes #48763

r? @Centril

5 years agoRollup merge of #61263 - GuillaumeGomez:valid-html, r=Manishearth
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:02 +0000 (06:50 +0200)]
Rollup merge of #61263 - GuillaumeGomez:valid-html, r=Manishearth

Don't generate div inside header (h4/h3/h...) elements

Fixes #60865.

According to the HTML spec, we're not supposed to put `div` elements inside heading elements (h4/h3/h...). It doesn't change the display as far as I could tell.

r? @QuietMisdreavus

5 years agoRollup merge of #60729 - matthewjasper:leak-after-into, r=nikomatsakis
Mazdak Farrokhzad [Sat, 1 Jun 2019 04:50:00 +0000 (06:50 +0200)]
Rollup merge of #60729 - matthewjasper:leak-after-into, r=nikomatsakis

Expand dynamic drop tests for cases in #47949

Adds test cases for #47949

5 years agoAuto merge of #60145 - little-dude:ip2, r=alexcrichton
bors [Sat, 1 Jun 2019 03:46:13 +0000 (03:46 +0000)]
Auto merge of #60145 - little-dude:ip2, r=alexcrichton

std::net: Ipv4Addr and Ipv6Addr improvements

Picking this up again from my previous PR: https://github.com/rust-lang/rust/pull/56050
Related to: https://github.com/rust-lang/rust/issues/27709
Fixes: https://github.com/rust-lang/rust/issues/57558
- add `add Ipv4Addr::is_reserved()`
  - [X] implementation
  - [X] tests
- add `Ipv6Addr::is_unicast_link_local_strict()` and update `Ipv6Addr::is_unicast_link_local()` documentation
  - [X] implementation
  - [X] test
- add `Ipv4Addr::is_benchmarking()`
  - [X] implementation
  - [X] test
- add `Ipv4Addr::is_ietf_protocol_assignment()`
  - [X] implementation
  - [X] test
- add `Ipv4Addr::is_shared()`
  - [X] implementation
  - [x] test
- fix `Ipv4Addr:is_global()`
  - [X] implementation
  - [x] test
- [X] refactor the tests for IP properties. This makes the tests more verbose, but using macros have two advantages:
    - it will now be easier to add tests for all the new methods
    - we get clear error messages when a test is failing. For instance:

```
---- net::ip::tests::ip_properties stdout ----
thread '<unnamed>' panicked at 'assertion failed: !ip!("fec0::").is_global()', src/libstd/net/ip.rs:2036:9

```

Whereas previously it was something like

```
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
   left: `true`,
  right: `false`', libstd/net/ip.rs:1948:13
```

-----------------------

# Ongoing discussions:

## Should `Ipv4Addr::is_global()` return `true` or `false` for reserved addresses?

Reserved addresses are addresses that are matched by `Ipv4Addr::is_reserved()`.
@the8472 [pointed out](https://github.com/rust-lang/rust/pull/60145#issuecomment-485458319) that [RFC 4291](https://tools.ietf.org/html/rfc4291#section-2.4) says IPv6 reserved addresses should be considered global:

```
Future specifications may redefine one or more sub-ranges of the
Global Unicast space for other purposes, but unless and until that
happens, implementations must treat all addresses that do not start
with any of the above-listed prefixes as Global Unicast addresses.
```

We could extrapolate that this should also be the case for IPv4. However, it seems that [IANA considers them non global](https://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml) (see [my comment](https://github.com/rust-lang/rust/pull/60145#issuecomment-485713270))

### Final decision

There seems to be a consensus that reserved addresses have a different meaning for IPv4 and IPv6 ([comment1](https://github.com/rust-lang/rust/pull/60145#issuecomment-485963789) [comment2](https://github.com/rust-lang/rust/pull/60145#issuecomment-485944582), so we can consider that RFC4291 does not apply to IPv4, and that reserved IPv4 addresses are _not_ global.

## Should `Ipv6Addr::is_unicast_site_local()` exist?

@pusateri [noted](https://github.com/rust-lang/rust/pull/60145#issuecomment-485507515) that site-local addresses have been deprecated for a while by [RFC 3879](https://tools.ietf.org/html/rfc3879) and new implementations _must not_ support them. However, since this method is stable, removing does not seem possible. This kind of situation is covered by the RFC which stated that existing implementation _may_ continue supporting site-local addresses.

### Final decision

Let's keep this method. It is stable already, and the RFC explicitly states that existing implementation may remain.

---------

Note: I'll be AFK from April 27th to May 11th. Anyone should feel free to pick this up if the PR hasn't been merged by then. Sorry for dragging that for so long already.

5 years agoAuto merge of #61394 - pietroalbini:rollup-lzugnb4, r=pietroalbini
bors [Sat, 1 Jun 2019 00:57:37 +0000 (00:57 +0000)]
Auto merge of #61394 - pietroalbini:rollup-lzugnb4, r=pietroalbini

Rollup of 11 pull requests

Successful merges:

 - #60897 (error: remove StringError from Debug output)
 - #61304 (Speed up Azure CI installing Windows dependencies)
 - #61319 (Swap order of `unsafe async fn` to `async unsafe fn`)
 - #61342 (Set ellipsis_inclusive_range_patterns lint to warn)
 - #61344 (Add regression test for const generics ICE)
 - #61359 (Fix links in Deref documentation)
 - #61363 (Stabilize iter_nth_back feature)
 - #61369 (Fixed lifetime misspelling)
 - #61372 (Migrate some books to mdbook version 0.2)
 - #61374 (Explicitly suggest 'type_ascription' feature)
 - #61382 (Fixed a typo in core::convert::AsMut)

Failed merges:

r? @ghost

5 years agoAuto merge of #61300 - indygreg:upgrade-cross-make, r=sanxiyn
bors [Fri, 31 May 2019 22:16:09 +0000 (22:16 +0000)]
Auto merge of #61300 - indygreg:upgrade-cross-make, r=sanxiyn

Update musl-cross-make to 0.9.8

This version uses musl 1.1.22 and GCC 6.4.0 by default. It also
contains support for newer binutils and GCC versions, should we
want to bump those as well. But I'm purposefully limiting this
patch in order to reduce the surface area for controversy.

5 years agofix tidy
Esteban Küber [Fri, 31 May 2019 20:50:04 +0000 (13:50 -0700)]
fix tidy

5 years agoAuto merge of #57967 - eddyb:rmangle, r=michaelwoerister
bors [Fri, 31 May 2019 17:10:11 +0000 (17:10 +0000)]
Auto merge of #57967 - eddyb:rmangle, r=michaelwoerister

Introduce Rust symbol mangling scheme.

This is an implementation of a "feature-complete" Rust mangling scheme, in the vein of rust-lang/rfcs#2603 ~~- but with some differences, see https://github.com/rust-lang/rfcs/pull/2603#issuecomment-458410463 for details~~ (@michaelwoerister integrated my proposed changes into the RFC itself).

On nightly, you can now control the mangling scheme with `-Z symbol-mangling-version`, which can be:
* `legacy`: the older mangling version, still the default currently
* `v0`: the new RFC mangling version, as implemented by this PR

To test the new mangling, set `RUSTFLAGS=-Zsymbol-mangling-version=v0` (or change [`rustflags` in `.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#configuration-keys)). Please note that only symbols from crates built with that flag will use the new mangling, and that tool support (e.g. debuggers) will be limited initially, and it may take a while for everything to be upstreamed. However, `RUST_BACKTRACE` should work out of the box with either mangling version.

<hr/>

The demangling implementation PR is https://github.com/alexcrichton/rustc-demangle/pull/23
~~(this PR already uses it via a git dependency, to allow testing)~~.

Discussion of the *design* of the mangling scheme should still happen on the RFC, but this PR's specific implementation details can be reviewed in parallel.

*Notes for reviewers*:
* ~~only the last 6 commits are specific to this branch, if necessary I can open a separate PR for everything else (it was meant to be its own small refactoring, but it got a bit out of hand)~~
~~based on #58140~~
* the "harness" commit is only there because it does some extra validation (comparing the demangling from `rustc-demangle` to the compiler's pretty-printing, adjusted slightly to produce the same output), that I would like to try on crater
* ~~there is the question of whether we should turn on the new mangling now, wait for tools to support it (I'm working on that), and/or have it under a `-Z` flag for now~~ (we're gating this on `-Z symbol-mangling-version=v0`, see above)

r? @nikomatsakis / @michaelwoerister cc @rust-lang/compiler

5 years agotest: add a more complex symbol-name testcase.
Eduard-Mihai Burtescu [Thu, 30 May 2019 00:56:45 +0000 (03:56 +0300)]
test: add a more complex symbol-name testcase.

5 years agorustc_codegen_utils: remove symbol name dumping/checking harness, and mw impl.
Eduard-Mihai Burtescu [Wed, 10 Apr 2019 05:33:31 +0000 (08:33 +0300)]
rustc_codegen_utils: remove symbol name dumping/checking harness, and mw impl.

5 years agorustc_codegen_utils: update mw's symbol mangler implementation.
Eduard-Mihai Burtescu [Thu, 4 Apr 2019 18:29:07 +0000 (21:29 +0300)]
rustc_codegen_utils: update mw's symbol mangler implementation.

5 years agorustc_codegen_utils: add harness for dumping/checking symbol names, and mw mangling...
Eduard-Mihai Burtescu [Wed, 29 May 2019 21:42:56 +0000 (00:42 +0300)]
rustc_codegen_utils: add harness for dumping/checking symbol names, and mw mangling impl.

5 years agotest: force `legacy` mangling for run-make-fulldeps/a-b-a-linker-guard.
Eduard-Mihai Burtescu [Tue, 29 Jan 2019 22:53:36 +0000 (00:53 +0200)]
test: force `legacy` mangling for run-make-fulldeps/a-b-a-linker-guard.

5 years agotest: support both (`legacy` and `v0`) choices of mangling.
Eduard-Mihai Burtescu [Sat, 13 Apr 2019 16:03:02 +0000 (19:03 +0300)]
test: support both (`legacy` and `v0`) choices of mangling.

5 years agorustc_codegen_utils: don't ignore `Ctor` path components in symbols.
Eduard-Mihai Burtescu [Mon, 4 Feb 2019 07:03:31 +0000 (09:03 +0200)]
rustc_codegen_utils: don't ignore `Ctor` path components in symbols.

5 years agorustc_codegen_utils: add new mangling scheme implementation.
Eduard-Mihai Burtescu [Tue, 29 Jan 2019 05:24:32 +0000 (07:24 +0200)]
rustc_codegen_utils: add new mangling scheme implementation.

5 years agorustc_codegen_utils: test demangler output, not just symbol names.
Eduard-Mihai Burtescu [Wed, 29 May 2019 20:58:55 +0000 (23:58 +0300)]
rustc_codegen_utils: test demangler output, not just symbol names.

5 years agoUpdate rustc-demangle version.
Eduard-Mihai Burtescu [Thu, 30 May 2019 19:58:49 +0000 (22:58 +0300)]
Update rustc-demangle version.

5 years agoAuto merge of #61298 - matthiaskrgr:submodule_upd, r=oli-obk
bors [Fri, 31 May 2019 14:06:17 +0000 (14:06 +0000)]
Auto merge of #61298 - matthiaskrgr:submodule_upd, r=oli-obk

submodules: update clippy from fb33fad0 to d2f51228

Changes:
````
Rustup to https://github.com/rust-lang/rust/pull/61203
rustup https://github.com/rust-lang/rust/pull/60928
rustup https://github.com/rust-lang/rust/pull/61164 (which is included in https://github.com/rust-lang/rust/pull/61274)
````

Fixes #61287

r? @oli-obk

5 years agoRollup merge of #61382 - OptimisticPeach:patch-1, r=Centril
Pietro Albini [Fri, 31 May 2019 11:34:08 +0000 (13:34 +0200)]
Rollup merge of #61382 - OptimisticPeach:patch-1, r=Centril

Fixed a typo in core::convert::AsMut

Just missing a space, and added a comma to make more idiomatic.

5 years agoRollup merge of #61374 - VirrageS:master, r=Centril
Pietro Albini [Fri, 31 May 2019 11:34:07 +0000 (13:34 +0200)]
Rollup merge of #61374 - VirrageS:master, r=Centril

Explicitly suggest 'type_ascription' feature

Closes: #61325
r? @estebank

5 years agoRollup merge of #61372 - mati865:books, r=Centril,GuillaumeGomez
Pietro Albini [Fri, 31 May 2019 11:34:06 +0000 (13:34 +0200)]
Rollup merge of #61372 - mati865:books, r=Centril,GuillaumeGomez

Migrate some books to mdbook version 0.2

There are 3 books still using old version but they need more effort so I hope to do them in subsequent PR if I find the time.

5 years agoRollup merge of #61369 - Vallentin:patch-1, r=varkor
Pietro Albini [Fri, 31 May 2019 11:34:03 +0000 (13:34 +0200)]
Rollup merge of #61369 - Vallentin:patch-1, r=varkor

Fixed lifetime misspelling

5 years agoRollup merge of #61363 - lzutao:stabilize-iter_nth_back, r=Centril
Pietro Albini [Fri, 31 May 2019 11:34:02 +0000 (13:34 +0200)]
Rollup merge of #61363 - lzutao:stabilize-iter_nth_back, r=Centril

Stabilize iter_nth_back feature

FCP done in https://github.com/rust-lang/rust/issues/56995#issuecomment-491145691

Closes #56995

r? @Centril

5 years agoRollup merge of #61359 - GuillaumeGomez:fix-deref-doc-links, r=Manishearth
Pietro Albini [Fri, 31 May 2019 11:34:00 +0000 (13:34 +0200)]
Rollup merge of #61359 - GuillaumeGomez:fix-deref-doc-links, r=Manishearth

Fix links in Deref documentation

Fixes #61358.

In commonmark, the "link alias" has to be right after the link. Screenshot:

<img width="970" alt="Screenshot 2019-05-30 at 19 01 58" src="https://user-images.githubusercontent.com/3050060/58650155-3b594e00-830e-11e9-956c-4dadefa40ff0.png">

r? @Manishearth

5 years agoRollup merge of #61344 - varkor:const-failed-to-life-ice, r=Centril
Pietro Albini [Fri, 31 May 2019 11:33:58 +0000 (13:33 +0200)]
Rollup merge of #61344 - varkor:const-failed-to-life-ice, r=Centril

Add regression test for const generics ICE

Closes https://github.com/rust-lang/rust/issues/60879.

5 years agoRollup merge of #61342 - memoryruins:ellipsis_inclusive_range_patterns, r=Centril
Pietro Albini [Fri, 31 May 2019 11:33:57 +0000 (13:33 +0200)]
Rollup merge of #61342 - memoryruins:ellipsis_inclusive_range_patterns, r=Centril

Set ellipsis_inclusive_range_patterns lint to warn

Continuing #54910, the `ellipsis_inclusive_range_patterns` lint is set to warn.

r? @Centril

5 years agoRollup merge of #61319 - Centril:async-unsafe-fn-order, r=cramertj
Pietro Albini [Fri, 31 May 2019 11:33:55 +0000 (13:33 +0200)]
Rollup merge of #61319 - Centril:async-unsafe-fn-order, r=cramertj

Swap order of `unsafe async fn` to `async unsafe fn`

Change the order of `unsafe async fn` to `async unsafe fn`.

I had intended to do this a while back but didn't get around to it...

This should be done because:
- It is the order used by `const unsafe fn` so therefore it is consistent.
- This keeps all the "effect/restriction" modifiers to the left of `unsafe` (which according to some is not an effect) instead of mixing them such that we are more forward compatible with some sort of effect system.

r? @cramertj

5 years agoRollup merge of #61304 - lzybkr:iwr_progress, r=alexcrichton
Pietro Albini [Fri, 31 May 2019 11:33:54 +0000 (13:33 +0200)]
Rollup merge of #61304 - lzybkr:iwr_progress, r=alexcrichton

Speed up Azure CI installing Windows dependencies

There is known issue where PowerShell is unreasonably slow downloading
files due to an issue with rendering the progress bar, see this [issue](https://github.com/PowerShell/PowerShell/issues/2138)

That issue is fixed in PowerShell Core (available in Azure Pipelines as
pwsh.exe) but it can also be worked around by setting:

    $ProgressPreference = 'SilentlyContinue'

I measured downloading LLVM and it took about 220s before, 5s after, so the improvement is significant.

5 years agoRollup merge of #60897 - seanmonstar:patch-4, r=sfackler
Pietro Albini [Fri, 31 May 2019 11:33:51 +0000 (13:33 +0200)]
Rollup merge of #60897 - seanmonstar:patch-4, r=sfackler

error: remove StringError from Debug output

Seeing `StringError("something something")` in debug output can cause
 someone to think there was an error dealing with `String`s, not that the
error type is just a string. So, remove that noise.

For example:

```
io error: Custom { kind: InvalidData, error: StringError("corrupt data") }
```

With this change:

```
io error: Custom { kind: InvalidData, error: "corrupt data" }
```

5 years agoAuto merge of #60166 - oli-obk:type_name, r=eddyb
bors [Fri, 31 May 2019 10:42:31 +0000 (10:42 +0000)]
Auto merge of #60166 - oli-obk:type_name, r=eddyb

Make the `type_name` intrinsic deterministic

cc @eddyb for the printing infrastructure
cc @Centril for the deterministic (coherent?) output

r? @sfackler

5 years agoDoc comment fixes for `rustc::mir::interpret::InterpretCx`
Wesley Wiser [Fri, 31 May 2019 09:01:35 +0000 (05:01 -0400)]
Doc comment fixes for `rustc::mir::interpret::InterpretCx`

5 years agoRemove GlobalArenas and use Arena instead
John Kåre Alsaker [Fri, 31 May 2019 07:25:34 +0000 (09:25 +0200)]
Remove GlobalArenas and use Arena instead

5 years agoRemove ty::BrFresh and new_bound
Yuki Okushi [Fri, 31 May 2019 06:09:04 +0000 (15:09 +0900)]
Remove ty::BrFresh and new_bound

5 years agoStabilize reverse_bits feature
Lzu Tao [Thu, 30 May 2019 18:51:47 +0000 (18:51 +0000)]
Stabilize reverse_bits feature

5 years agoRemove unecessary `-Z continue-parse-after-error` from tests
Esteban Küber [Fri, 31 May 2019 01:55:09 +0000 (18:55 -0700)]
Remove unecessary `-Z continue-parse-after-error` from tests

5 years agoFix unwrapping usize issue in HasMutInterior
varkor [Thu, 30 May 2019 22:44:28 +0000 (23:44 +0100)]
Fix unwrapping usize issue in HasMutInterior