]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
bors [Tue, 12 Feb 2019 19:09:24 +0000 (19:09 +0000)]
Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik

Cosmetic improvements to doc comments

This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).

r? @steveklabnik

Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!

5 years agoAuto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkov
bors [Tue, 12 Feb 2019 12:10:10 +0000 (12:10 +0000)]
Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkov

Require a list of features in `#[allow_internal_unstable]`

The blanket-permission slip is not great and will likely give us trouble some point down the road.

5 years agoAuto merge of #57388 - euclio:runmake-explicit-ignore, r=kennytm
bors [Tue, 12 Feb 2019 08:19:35 +0000 (08:19 +0000)]
Auto merge of #57388 - euclio:runmake-explicit-ignore, r=kennytm

use ignore directives for run-make tests

This makes the tests easier to read, and makes it possible to tell which
tests aren't being run on the host platform.

Fixes #56704.

5 years agoAuto merge of #58389 - Centril:rollup, r=Centril
bors [Tue, 12 Feb 2019 05:50:26 +0000 (05:50 +0000)]
Auto merge of #58389 - Centril:rollup, r=Centril

Rollup of 11 pull requests

Successful merges:

 - #58105 (libarena => 2018)
 - #58111 (libterm => 2018)
 - #58287 (rustc-std-workspace-core => 2018)
 - #58288 (rustc-workspace-hack => 2018)
 - #58300 (librustc_typeck => 2018)
 - #58313 (Use `?` in librustc macros)
 - #58318 (libserialize => 2018)
 - #58322 (librustc_codegen_ssa => 2018)
 - #58342 (Revert removed #![feature(nll)])
 - #58367 (Remove two dead functions.)
 - #58382 (docs: remove "experimental" wording from std::os::unix)

Failed merges:

r? @ghost

5 years agoRollup merge of #58382 - euclio:unix-ext, r=dtolnay
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:29 +0000 (04:42 +0100)]
Rollup merge of #58382 - euclio:unix-ext, r=dtolnay

docs: remove "experimental" wording from std::os::unix

5 years agoRollup merge of #58367 - nnethercote:rm-two-dead-funcs, r=alexcrichton
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:28 +0000 (04:42 +0100)]
Rollup merge of #58367 - nnethercote:rm-two-dead-funcs, r=alexcrichton

Remove two dead functions.

5 years agoRollup merge of #58342 - taiki-e:nll, r=matthewjasper
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:26 +0000 (04:42 +0100)]
Rollup merge of #58342 - taiki-e:nll, r=matthewjasper

Revert removed #![feature(nll)]

In PRs related to #58099, `#![feature(nll)]` was removed from several crates.
This PR reverts it.

Related: https://github.com/rust-lang/rust/pull/58265#discussion_r255021244

cc @Centril

r? @matthewjasper

5 years agoRollup merge of #58322 - taiki-e:librustc_codegen_ssa-2018, r=petrochenkov
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:25 +0000 (04:42 +0100)]
Rollup merge of #58322 - taiki-e:librustc_codegen_ssa-2018, r=petrochenkov

librustc_codegen_ssa => 2018

Transitions `librustc_codegen_ssa` to Rust 2018; cc #58099

r? @petrochenkov

5 years agoRollup merge of #58318 - taiki-e:libserialize-2018, r=Centril
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:24 +0000 (04:42 +0100)]
Rollup merge of #58318 - taiki-e:libserialize-2018, r=Centril

libserialize => 2018

Transitions `libserialize` to Rust 2018; cc #58099

This includes a commit from #58252 (thanks @h-michael!)

r? @Centril

5 years agoRollup merge of #58313 - matthewjasper:use-question-in-macros, r=oli-obk
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:23 +0000 (04:42 +0100)]
Rollup merge of #58313 - matthewjasper:use-question-in-macros, r=oli-obk

Use `?` in librustc macros

5 years agoRollup merge of #58300 - taiki-e:librustc_typeck-2018, r=petrochenkov
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:21 +0000 (04:42 +0100)]
Rollup merge of #58300 - taiki-e:librustc_typeck-2018, r=petrochenkov

librustc_typeck => 2018

Transitions `librustc_typeck` to Rust 2018; cc #58099

TODO: elided_lifetimes_in_paths

r? @Centril

5 years agoRollup merge of #58288 - taiki-e:rustc-workspace-hack-2018, r=alexcrichton
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:20 +0000 (04:42 +0100)]
Rollup merge of #58288 - taiki-e:rustc-workspace-hack-2018, r=alexcrichton

rustc-workspace-hack => 2018

Transitions `rustc-workspace-hack` to Rust 2018; cc #58099

r? @alexcrichton

5 years agoRollup merge of #58287 - taiki-e:rustc-std-workspace-core-2018, r=alexcrichton
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:19 +0000 (04:42 +0100)]
Rollup merge of #58287 - taiki-e:rustc-std-workspace-core-2018, r=alexcrichton

rustc-std-workspace-core => 2018

Transitions `rustc-std-workspace-core` to Rust 2018; cc #58099

r? @alexcrichton

5 years agoRollup merge of #58111 - Centril:libterm-2018, r=oli-obk
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:18 +0000 (04:42 +0100)]
Rollup merge of #58111 - Centril:libterm-2018, r=oli-obk

libterm => 2018

Transitions `libterm` to Rust 2018; cc #58099

r? @oli-obk

5 years agoRollup merge of #58105 - Centril:libarena-trans-2018, r=oli-obk
Mazdak Farrokhzad [Tue, 12 Feb 2019 03:42:16 +0000 (04:42 +0100)]
Rollup merge of #58105 - Centril:libarena-trans-2018, r=oli-obk

libarena => 2018

Transitions `libarena` to Rust 2018; cc https://github.com/rust-lang/rust/issues/58099

r? @oli-obk

5 years agoAuto merge of #58246 - pmccarter:master, r=oli-obk
bors [Tue, 12 Feb 2019 03:20:16 +0000 (03:20 +0000)]
Auto merge of #58246 - pmccarter:master, r=oli-obk

Make `saturating_add` and `saturating_sub` `const` functions

Fixes #58030

5 years agoAuto merge of #58180 - davidtwco:issue-58053, r=estebank
bors [Tue, 12 Feb 2019 00:44:24 +0000 (00:44 +0000)]
Auto merge of #58180 - davidtwco:issue-58053, r=estebank

Fix span for closure return type when annotated.

Fixes #58053.

This PR adjusts the span used to label closure return types so that
if the user specifies the return type, i.e. `|_| -> X {}` instead of
`|_| {}`, we correctly highlight all of it and not just the last
character.

r? @pnkfelix

5 years agolibterm => 2018
Mazdak Farrokhzad [Sun, 3 Feb 2019 02:43:54 +0000 (03:43 +0100)]
libterm => 2018

5 years agolibarena => 2018
Mazdak Farrokhzad [Sat, 2 Feb 2019 17:18:24 +0000 (18:18 +0100)]
libarena => 2018

5 years agouse ignore directives for run-make tests
Andy Russell [Sun, 6 Jan 2019 21:27:57 +0000 (16:27 -0500)]
use ignore directives for run-make tests

This makes the tests easier to read, and makes it possible to tell which
tests aren't being run on the host platform.

Fixes #56704.

5 years agoremove "experimental" wording from std::os::unix
Andy Russell [Mon, 11 Feb 2019 20:36:45 +0000 (15:36 -0500)]
remove "experimental" wording from std::os::unix

5 years agorename variable and add test directive for #58030
Patrick McCarter [Mon, 11 Feb 2019 16:20:50 +0000 (11:20 -0500)]
rename variable and add test directive for #58030

5 years agoParallel rustc needs synchronizing smart pointer cloning
Oliver Scherer [Fri, 8 Feb 2019 09:21:21 +0000 (10:21 +0100)]
Parallel rustc needs synchronizing smart pointer cloning

5 years agoAllow platform specific tests
Oliver Scherer [Thu, 7 Feb 2019 13:53:21 +0000 (14:53 +0100)]
Allow platform specific tests

5 years agoUse `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocs
Oliver Scherer [Thu, 7 Feb 2019 13:19:06 +0000 (14:19 +0100)]
Use `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocs

5 years agoFiddle through the module visibilities for tests
Oliver Scherer [Wed, 6 Feb 2019 09:58:29 +0000 (10:58 +0100)]
Fiddle through the module visibilities for tests

5 years agoMove out tests of a deprecated module to work around `#[test]` bugs
Oliver Scherer [Wed, 6 Feb 2019 09:58:06 +0000 (10:58 +0100)]
Move out tests of a deprecated module to work around `#[test]` bugs

https://github.com/rust-lang/rust/issues/47238

5 years agoUse `allow_internal_unstable` in rustc itself
Oliver Scherer [Tue, 5 Feb 2019 09:56:29 +0000 (10:56 +0100)]
Use `allow_internal_unstable` in rustc itself

5 years agoUpdate fulldeps test
Oliver Scherer [Mon, 4 Feb 2019 14:47:51 +0000 (15:47 +0100)]
Update fulldeps test

5 years agoFixup RustcDeserialize internal features
Oliver Scherer [Mon, 4 Feb 2019 10:49:25 +0000 (11:49 +0100)]
Fixup RustcDeserialize internal features

5 years agoUse a more fitting name for a respanning function
Oliver Scherer [Mon, 4 Feb 2019 10:24:55 +0000 (11:24 +0100)]
Use a more fitting name for a respanning function

5 years agoConsistent attribute argument suggestion
Oliver Scherer [Mon, 4 Feb 2019 10:18:12 +0000 (11:18 +0100)]
Consistent attribute argument suggestion

5 years agoRename the `exp` field to mirror its uses
Oliver Scherer [Mon, 4 Feb 2019 10:16:50 +0000 (11:16 +0100)]
Rename the `exp` field to mirror its uses

5 years agoEase the transition to requiring features by just warning if there's no feature list
Oliver Scherer [Sun, 3 Feb 2019 12:57:03 +0000 (13:57 +0100)]
Ease the transition to requiring features by just warning if there's no feature list

while we could make this change (it's all unstable after all), there are crates.io crates that use the feature and that the compiler depends upon. We can instead roll out this feature while still supporting the old way.

5 years agoRequire a list of features to allow in `allow_internal_unstable`
Oliver Scherer [Sun, 3 Feb 2019 11:55:00 +0000 (12:55 +0100)]
Require a list of features to allow in `allow_internal_unstable`

5 years agoAuto merge of #56645 - pietroalbini:fix-unused-imports, r=estebank
bors [Mon, 11 Feb 2019 10:34:09 +0000 (10:34 +0000)]
Auto merge of #56645 - pietroalbini:fix-unused-imports, r=estebank

Initial implementation of rustfixable unused_imports lint

This PR adds the initial implementation of rustfixable `unused_imports` lint. The implementation works, but rustfix is not able to apply all the suggestions until https://github.com/rust-lang/rust/issues/53934 is fixed. It also needs https://github.com/rust-lang/rust/pull/58296 to hide the suggested note since it's really useless.

cc https://github.com/rust-lang/rust/issues/47888

<details><summary><code>cargo fix</code> in action on the <code>unused_imports</code> lint</summary>

![screenshot from 2018-12-09 15-49-01](https://user-images.githubusercontent.com/2299951/49698874-3a026080-fbca-11e8-9bf1-24060b6c59c8.png)

</details>

5 years agoAuto merge of #58153 - ljedrz:HirIdify_typeck, r=Zoxc
bors [Mon, 11 Feb 2019 06:03:58 +0000 (06:03 +0000)]
Auto merge of #58153 - ljedrz:HirIdify_typeck, r=Zoxc

Partially Hiridify typeck

Another step towards https://github.com/rust-lang/rust/pull/57578.

5 years agoRemove two dead functions.
Nicholas Nethercote [Mon, 11 Feb 2019 05:27:56 +0000 (16:27 +1100)]
Remove two dead functions.

5 years agoAuto merge of #58152 - ljedrz:HirIdify_mir, r=Zoxc
bors [Mon, 11 Feb 2019 03:35:22 +0000 (03:35 +0000)]
Auto merge of #58152 - ljedrz:HirIdify_mir, r=Zoxc

Partially HirIdify mir

Another step towards https://github.com/rust-lang/rust/pull/57578.

5 years agoAuto merge of #58358 - pietroalbini:update-cargo, r=Mark-Simulacrum
bors [Mon, 11 Feb 2019 01:05:22 +0000 (01:05 +0000)]
Auto merge of #58358 - pietroalbini:update-cargo, r=Mark-Simulacrum

Bump cargo to 865cb70

Merged PRs:

* Replace util::without_prefix with Path::strip_prefix rust-lang/cargo#6620
* keep track of crates that are whitelisted to be used even if yanked rust-lang/cargo#6611
* Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. rust-lang/cargo#6625
* Bail when trying to run "test --doc --no-run" rust-lang/cargo#6628
* In cargo test's help, add that examples are built rust-lang/cargo#6619
* Extract & re-use filter_targets in cargo_compile rust-lang/cargo#6621
* Test cleanup: remove unnecessary with_status(0) rust-lang/cargo#6630
* Fix run's help message rust-lang/cargo#6631
* Some updates to bash completion. rust-lang/cargo#6644
* Introduce Source::download_now rust-lang/cargo#6637
* Switch from unused_imports to deprecated to test unfixable warnings rust-lang/cargo#6649

5 years agoRe-blessed tests.
Alexander Regueiro [Sun, 10 Feb 2019 17:45:11 +0000 (17:45 +0000)]
Re-blessed tests.

5 years agotools: doc comments
Alexander Regueiro [Sat, 9 Feb 2019 22:22:23 +0000 (22:22 +0000)]
tools: doc comments

5 years agolibs: doc comments
Alexander Regueiro [Sat, 9 Feb 2019 22:16:58 +0000 (22:16 +0000)]
libs: doc comments

5 years agotests: doc comments
Alexander Regueiro [Sat, 9 Feb 2019 21:23:30 +0000 (21:23 +0000)]
tests: doc comments

5 years agorustc: doc comments
Alexander Regueiro [Fri, 8 Feb 2019 13:53:55 +0000 (14:53 +0100)]
rustc: doc comments

5 years agoAuto merge of #58361 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sun, 10 Feb 2019 22:35:36 +0000 (22:35 +0000)]
Auto merge of #58361 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 16 pull requests

Successful merges:

 - #57259 (Update reference of rlibc crate to compiler-builtins crate)
 - #57740 (Use `to_ne_bytes` for converting IPv4Addr to octets)
 - #57926 (Tiny expansion to docs for `core::convert`.)
 - #58157 (Add Cargo.lock automatically adding message)
 - #58203 (rustdoc: display sugared return types for async functions)
 - #58243 (Add trait alias support in rustdoc)
 - #58262 (Add #[must_use] message to Fn* traits)
 - #58295 (std::sys::unix::stdio: explain why we do into_raw)
 - #58297 (Cleanup JS a bit)
 - #58317 (Some writing improvement, conciseness of intro)
 - #58324 (miri: give non-generic functions a stable address)
 - #58332 (operand-to-place copies should never be overlapping)
 - #58345 (When there are multiple filenames, print what got interpreted as filenames)
 - #58346 (rpath computation: explain why we pop())
 - #58350 (Fix failing tidy (line endings on Windows))
 - #58352 (miri value visitor: use `?` in macro)

Failed merges:

r? @ghost

5 years agoRollup merge of #58352 - RalfJung:macro, r=oli-obk
Guillaume Gomez [Sun, 10 Feb 2019 20:45:27 +0000 (21:45 +0100)]
Rollup merge of #58352 - RalfJung:macro, r=oli-obk

miri value visitor: use `?` in macro

5 years agoRollup merge of #58350 - petrochenkov:embed, r=frewsxcv
Guillaume Gomez [Sun, 10 Feb 2019 20:45:25 +0000 (21:45 +0100)]
Rollup merge of #58350 - petrochenkov:embed, r=frewsxcv

Fix failing tidy (line endings on Windows)

Updates to `embedded-book` including https://github.com/rust-embedded/book/pull/127.

5 years agoRollup merge of #58346 - RalfJung:rpath-pop, r=Mark-Simulacrum
Guillaume Gomez [Sun, 10 Feb 2019 20:45:24 +0000 (21:45 +0100)]
Rollup merge of #58346 - RalfJung:rpath-pop, r=Mark-Simulacrum

rpath computation: explain why we pop()

I was quite confused by this code until I got a debug log of what is going on.

5 years agoRollup merge of #58345 - RalfJung:2nd-filename, r=matthewjasper
Guillaume Gomez [Sun, 10 Feb 2019 20:45:22 +0000 (21:45 +0100)]
Rollup merge of #58345 - RalfJung:2nd-filename, r=matthewjasper

When there are multiple filenames, print what got interpreted as filenames

I have written code that crafts command lines for rustc, and when I get "multiple input filenames provided" it can be quite hard to figure out where in this long list of arguments the mistake is hiding.  Probably I passed an argument to a flag that does not expect an argument, but which flag would that be?

This changes the error message to print the first two filenames, to make it easier to debug what is going on.

5 years agoRollup merge of #58332 - RalfJung:miri-copy-nonoverlapping, r=oli-obk
Guillaume Gomez [Sun, 10 Feb 2019 20:45:21 +0000 (21:45 +0100)]
Rollup merge of #58332 - RalfJung:miri-copy-nonoverlapping, r=oli-obk

operand-to-place copies should never be overlapping

This seems to just work (verified with the Miri test suite).

r? @oli-obk

5 years agoRollup merge of #58324 - RalfJung:fn-ptr-eq, r=oli-obk
Guillaume Gomez [Sun, 10 Feb 2019 20:45:20 +0000 (21:45 +0100)]
Rollup merge of #58324 - RalfJung:fn-ptr-eq, r=oli-obk

miri: give non-generic functions a stable address

This makes Miri correctly handle format string parameters despite https://github.com/rust-lang/rust/issues/58320.

Matching Miri PR: https://github.com/solson/miri/pull/626

r? @oli-obk

5 years agoRollup merge of #58317 - hayekr:patch-1, r=frewsxcv
Guillaume Gomez [Sun, 10 Feb 2019 20:45:19 +0000 (21:45 +0100)]
Rollup merge of #58317 - hayekr:patch-1, r=frewsxcv

Some writing improvement, conciseness of intro

Made unstable-features doc more concise in the introduction paragraph

5 years agoRollup merge of #58297 - GuillaumeGomez:cleanup-js, r=QuietMisdreavus
Guillaume Gomez [Sun, 10 Feb 2019 20:45:18 +0000 (21:45 +0100)]
Rollup merge of #58297 - GuillaumeGomez:cleanup-js, r=QuietMisdreavus

Cleanup JS a bit

r? @QuietMisdreavus

5 years agoRollup merge of #58295 - RalfJung:stdio, r=alexcrichton
Guillaume Gomez [Sun, 10 Feb 2019 20:45:16 +0000 (21:45 +0100)]
Rollup merge of #58295 - RalfJung:stdio, r=alexcrichton

std::sys::unix::stdio: explain why we do into_raw

I was quite puzzled why someone would call `into_raw` and then ignore the result.

5 years agoRollup merge of #58262 - taiki-e:must_use, r=estebank
Guillaume Gomez [Sun, 10 Feb 2019 20:45:15 +0000 (21:45 +0100)]
Rollup merge of #58262 - taiki-e:must_use, r=estebank

Add #[must_use] message to Fn* traits

This PR adds `#[must_use]` message to `Fn*` traits.

Related: #57549

r? @estebank

5 years agoRollup merge of #58243 - GuillaumeGomez:trait-alias-docs, r=Manishearth
Guillaume Gomez [Sun, 10 Feb 2019 20:45:13 +0000 (21:45 +0100)]
Rollup merge of #58243 - GuillaumeGomez:trait-alias-docs, r=Manishearth

Add trait alias support in rustdoc

Fixes #57595.

r? @QuietMisdreavus

5 years agoRollup merge of #58203 - euclio:rustdoc-async, r=GuillaumeGomez
Guillaume Gomez [Sun, 10 Feb 2019 20:45:12 +0000 (21:45 +0100)]
Rollup merge of #58203 - euclio:rustdoc-async, r=GuillaumeGomez

rustdoc: display sugared return types for async functions

Fixes #58027.

5 years agoRollup merge of #58157 - h-michael:cargo-lock, r=alexcrichton
Guillaume Gomez [Sun, 10 Feb 2019 20:45:11 +0000 (21:45 +0100)]
Rollup merge of #58157 - h-michael:cargo-lock, r=alexcrichton

Add Cargo.lock automatically adding message

If I execute `cargo +nightly fix`, this change always occurs; cc #58099
r? @Centril

5 years agoRollup merge of #57926 - icefoxen:test-doc-pr, r=frewsxcv
Guillaume Gomez [Sun, 10 Feb 2019 20:45:09 +0000 (21:45 +0100)]
Rollup merge of #57926 - icefoxen:test-doc-pr, r=frewsxcv

Tiny expansion to docs for `core::convert`.

This is not really significant, accept or reject as you wish.  I just want to make sure I understand how the PR process works and that I'm doing it right before doing a bigger one for #33417.

5 years agoRollup merge of #57740 - JakubOnderka:ipv4addr-to_ne_bytes, r=scottmcm
Guillaume Gomez [Sun, 10 Feb 2019 20:45:08 +0000 (21:45 +0100)]
Rollup merge of #57740 - JakubOnderka:ipv4addr-to_ne_bytes, r=scottmcm

Use `to_ne_bytes` for converting IPv4Addr to octets

It is easier and it should be also faster, because [`to_ne_bytes`](https://doc.rust-lang.org/std/primitive.u32.html#method.to_ne_bytes) just calls `mem::transmute`.

5 years agoRollup merge of #57259 - king6cong:master, r=alexcrichton
Guillaume Gomez [Sun, 10 Feb 2019 20:45:07 +0000 (21:45 +0100)]
Rollup merge of #57259 - king6cong:master, r=alexcrichton

Update reference of rlibc crate to compiler-builtins crate

None

5 years agoAuto merge of #58129 - RalfJung:maybe-uninit, r=cramertj
bors [Sun, 10 Feb 2019 20:03:03 +0000 (20:03 +0000)]
Auto merge of #58129 - RalfJung:maybe-uninit, r=cramertj

MaybeUninit: some docs, rename into_inner -> into_initialized, return &mut from set

5 years agofix SGX build failures
Ralf Jung [Sun, 10 Feb 2019 18:08:49 +0000 (19:08 +0100)]
fix SGX build failures

5 years agobump cargo submodule
Pietro Albini [Sun, 10 Feb 2019 17:36:00 +0000 (18:36 +0100)]
bump cargo submodule

5 years agoRemove spotlight for trait aliases and fix nits
Guillaume Gomez [Sun, 10 Feb 2019 15:56:21 +0000 (16:56 +0100)]
Remove spotlight for trait aliases and fix nits

5 years agoit is okay not to use into_inner
Ralf Jung [Sun, 10 Feb 2019 14:27:59 +0000 (15:27 +0100)]
it is okay not to use into_inner

5 years agoAuto merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxc
bors [Sun, 10 Feb 2019 14:30:37 +0000 (14:30 +0000)]
Auto merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxc

Partially HirId-ify rustc

Another step towards https://github.com/rust-lang/rust/pull/57578.

5 years agomiri value visitor: use in macro
Ralf Jung [Sun, 10 Feb 2019 14:16:25 +0000 (15:16 +0100)]
miri value visitor: use  in macro

5 years agoAdd trait aliases to js types
Guillaume Gomez [Thu, 7 Feb 2019 00:02:23 +0000 (01:02 +0100)]
Add trait aliases to js types

5 years agoAdd style for trait aliases
Guillaume Gomez [Thu, 7 Feb 2019 00:02:09 +0000 (01:02 +0100)]
Add style for trait aliases

5 years agoAdd trait alias support in rustdoc
Guillaume Gomez [Tue, 5 Feb 2019 13:27:09 +0000 (14:27 +0100)]
Add trait alias support in rustdoc

5 years agoFix failing tidy (line endings on Windows)
Vadim Petrochenkov [Sun, 10 Feb 2019 13:21:47 +0000 (16:21 +0300)]
Fix failing tidy (line endings on Windows)

5 years agorpath computation: explain why we pop()
Ralf Jung [Sun, 10 Feb 2019 12:05:37 +0000 (13:05 +0100)]
rpath computation: explain why we pop()

5 years agowhen there are multiple filenames, print what got interpreted as 2nd filename
Ralf Jung [Sun, 10 Feb 2019 11:58:08 +0000 (12:58 +0100)]
when there are multiple filenames, print what got interpreted as 2nd filename

5 years agoAuto merge of #58085 - wesleywiser:profiler_2, r=wesleywiser
bors [Sun, 10 Feb 2019 11:18:50 +0000 (11:18 +0000)]
Auto merge of #58085 - wesleywiser:profiler_2, r=wesleywiser

Implement more detailed self profiling

Timing data and cache hits/misses are now recorded at the query level.
This allows us to show detailed per query information such as total time
for each query.

To see detailed query information in the summary pass the `-Z verbose`
flag. For example:

```
rustc -Z self-profile -Z verbose hello_world.rs
```

results in something like:

```md
Self profiling results:

| Phase                                     | Time (ms)      | Time (%) | Queries        | Hits (%)
| ----------------------------------------- | -------------- | -------- | -------------- | --------
| Other                                     |            177 |    54.97 |           8094 |    45.47
| - {time spent not running queries}        |            113 |    35.09 |              0 |     0.00
| - const_eval                              |             16 |     4.97 |             26 |    11.54
| - type_of                                 |              9 |     2.80 |            627 |    27.75
| - const_eval_raw                          |              8 |     2.48 |             22 |     0.00
| - adt_def                                 |              7 |     2.17 |            381 |    11.55
| - visible_parent_map                      |              7 |     2.17 |             99 |    98.99
| - item_attrs                              |              6 |     1.86 |            698 |    50.14
| - item_children                           |              5 |     1.55 |           2815 |     0.00
| - adt_dtorck_constraint                   |              4 |     1.24 |              2 |     0.00
| - adt_destructor                          |              2 |     0.62 |             15 |    86.67
| TypeChecking                              |             53 |    16.46 |           2834 |    79.89
| - trait_impls_of                          |              9 |     2.80 |             65 |    86.15
| - evaluate_obligation                     |              7 |     2.17 |             80 |     2.50
| - const_is_rvalue_promotable_to_static    |              6 |     1.86 |              1 |     0.00
| - is_copy_raw                             |              6 |     1.86 |             29 |    58.62
| - rvalue_promotable_map                   |              6 |     1.86 |              2 |    50.00
| - {time spent not running queries}        |              6 |     1.86 |              0 |     0.00
| - typeck_item_bodies                      |              5 |     1.55 |              1 |     0.00
| - typeck_tables_of                        |              5 |     1.55 |             19 |    94.74
| - dropck_outlives                         |              2 |     0.62 |              1 |     0.00
| - layout_raw                              |              1 |     0.31 |            668 |    87.87
| Linking                                   |             48 |    14.91 |             43 |    46.51
| - {time spent not running queries}        |             48 |    14.91 |              0 |     0.00
| Codegen                                   |             29 |     9.01 |            420 |    61.90
| - {time spent not running queries}        |             16 |     4.97 |              0 |     0.00
| - collect_and_partition_mono_items        |             11 |     3.42 |             13 |    92.31
| - mir_const                               |              1 |     0.31 |              1 |     0.00
| - mir_validated                           |              1 |     0.31 |              3 |    66.67
| Expansion                                 |             14 |     4.35 |              0 |     0.00
| - {time spent not running queries}        |             14 |     4.35 |              0 |     0.00
| BorrowChecking                            |              1 |     0.31 |             12 |    41.67
| - borrowck                                |              1 |     0.31 |              2 |    50.00
| Parsing                                   |              0 |     0.00 |              0 |     0.00

Optimization level: No
Incremental: off
```

<details>
<summary>Rendered</summary>

Self profiling results:

| Phase                                     | Time (ms)      | Time (%) | Queries        | Hits (%)
| ----------------------------------------- | -------------- | -------- | -------------- | --------
| **Other**                                     |           **177** |   **54.97** |   **8094** |  **45.47**
| - {time spent not running queries}        |            113 |    35.09 |              0 |     0.00
| - const_eval                              |             16 |     4.97 |             26 |    11.54
| - type_of                                 |              9 |     2.80 |            627 |    27.75
| - const_eval_raw                          |              8 |     2.48 |             22 |     0.00
| - adt_def                                 |              7 |     2.17 |            381 |    11.55
| - visible_parent_map                      |              7 |     2.17 |             99 |    98.99
| - item_attrs                              |              6 |     1.86 |            698 |    50.14
| - item_children                           |              5 |     1.55 |           2815 |     0.00
| - adt_dtorck_constraint                   |              4 |     1.24 |              2 |     0.00
| - adt_destructor                          |              2 |     0.62 |             15 |    86.67
| TypeChecking                              |             53 |    16.46 |           2834 |    79.89
| - trait_impls_of                          |              9 |     2.80 |             65 |    86.15
| - evaluate_obligation                     |              7 |     2.17 |             80 |     2.50
| - const_is_rvalue_promotable_to_static    |              6 |     1.86 |              1 |     0.00
| - is_copy_raw                             |              6 |     1.86 |             29 |    58.62
| - rvalue_promotable_map                   |              6 |     1.86 |              2 |    50.00
| - {time spent not running queries}        |              6 |     1.86 |              0 |     0.00
| - typeck_item_bodies                      |              5 |     1.55 |              1 |     0.00
| - typeck_tables_of                        |              5 |     1.55 |             19 |    94.74
| - dropck_outlives                         |              2 |     0.62 |              1 |     0.00
| - layout_raw                              |              1 |     0.31 |            668 |    87.87
| Linking                                   |             48 |    14.91 |             43 |    46.51
| - {time spent not running queries}        |             48 |    14.91 |              0 |     0.00
| Codegen                                   |             29 |     9.01 |            420 |    61.90
| - {time spent not running queries}        |             16 |     4.97 |              0 |     0.00
| - collect_and_partition_mono_items        |             11 |     3.42 |             13 |    92.31
| - mir_const                               |              1 |     0.31 |              1 |     0.00
| - mir_validated                           |              1 |     0.31 |              3 |    66.67
| Expansion                                 |             14 |     4.35 |              0 |     0.00
| - {time spent not running queries}        |             14 |     4.35 |              0 |     0.00
| BorrowChecking                            |              1 |     0.31 |             12 |    41.67
| - borrowck                                |              1 |     0.31 |              2 |    50.00
| Parsing                                   |              0 |     0.00 |              0 |     0.00

Optimization level: No
Incremental: off

</details>
cc @nikomatsakis @michaelwoerister @Zoxc

Fixes #54141

5 years agoAuto merge of #58103 - RalfJung:mir-shim-dump, r=eddyb
bors [Sun, 10 Feb 2019 08:52:10 +0000 (08:52 +0000)]
Auto merge of #58103 - RalfJung:mir-shim-dump, r=eddyb

Make -Zdump-mir dump shims

Fixes https://github.com/rust-lang/rust/issues/53532 by (a) making the MIR shim generation use the MIR pass infrastructure, and (b) fixing said infrastructure to handle the fallout.

Cc @eddyb @oli-obk

5 years agoRevert removed #![feature(nll)]
Taiki Endo [Sun, 10 Feb 2019 07:13:30 +0000 (16:13 +0900)]
Revert removed #![feature(nll)]

5 years agoAuto merge of #58339 - Mark-Simulacrum:embedded-book, r=Mark-Simulacrum
bors [Sun, 10 Feb 2019 04:34:12 +0000 (04:34 +0000)]
Auto merge of #58339 - Mark-Simulacrum:embedded-book, r=Mark-Simulacrum

Add EmbeddedBook to test list in bootstrap

r? @alexcrichton

5 years agoAdd EmbeddedBook to test list in bootstrap
Mark Rousskov [Sun, 10 Feb 2019 02:42:23 +0000 (19:42 -0700)]
Add EmbeddedBook to test list in bootstrap

5 years agoAuto merge of #57770 - Zoxc:no-hash-query, r=michaelwoerister
bors [Sun, 10 Feb 2019 01:33:17 +0000 (01:33 +0000)]
Auto merge of #57770 - Zoxc:no-hash-query, r=michaelwoerister

Add a query type which is always marked as red if it runs

This is useful for queries which produce results which are very likely to change if their inputs do.

I also expect this to be useful for end to end queries because 1) we don't need `HashStable` impls and 2) we avoid the overhead of hashing the result of large results like the AST or the HIR map.

r? @michaelwoerister

5 years agoAuto merge of #58065 - alexreg:refactor-smart_resolve_path_fragment, r=petrochenkov
bors [Sat, 9 Feb 2019 23:02:15 +0000 (23:02 +0000)]
Auto merge of #58065 - alexreg:refactor-smart_resolve_path_fragment, r=petrochenkov

Factor out error reporting from `smart_resolve_path_fragment` fn

This function was ridiculously monolithic before. We now have three rather-less-monolithic-and-horrifying functions.

r? @centril

5 years agooperand-to-place copies should never be overlapping
Ralf Jung [Sat, 9 Feb 2019 18:58:41 +0000 (19:58 +0100)]
operand-to-place copies should never be overlapping

5 years agoAuto merge of #57944 - estebank:unclosed-delim-the-quickening, r=oli-obk
bors [Sat, 9 Feb 2019 20:15:57 +0000 (20:15 +0000)]
Auto merge of #57944 - estebank:unclosed-delim-the-quickening, r=oli-obk

Deduplicate mismatched delimiter errors

Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently.

Second attempt at #54029, follow up to #53949. Fix #31528.

5 years agoUse ? in librustc macros
Matthew Jasper [Sat, 9 Feb 2019 16:29:31 +0000 (16:29 +0000)]
Use ? in librustc macros

5 years agoAuto merge of #57885 - arielb1:xform-probe, r=nikomatsakis
bors [Sat, 9 Feb 2019 15:11:43 +0000 (15:11 +0000)]
Auto merge of #57885 - arielb1:xform-probe, r=nikomatsakis

Avoid committing to autoderef in object method probing

This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).

Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.

r? @nikomatsakis

5 years agomiri: give non-generic functions a stable address
Ralf Jung [Sat, 9 Feb 2019 14:44:54 +0000 (15:44 +0100)]
miri: give non-generic functions a stable address

5 years agolibrustc_codegen_ssa => 2018
Taiki Endo [Sat, 9 Feb 2019 14:31:47 +0000 (23:31 +0900)]
librustc_codegen_ssa => 2018

5 years agoAuto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obk
bors [Sat, 9 Feb 2019 12:38:51 +0000 (12:38 +0000)]
Auto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obk

Make `intern_lazy_const` actually intern its argument.

Currently it just unconditionally allocates it in the arena.

For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.

For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.

Fixes #57432, fixes #57829.

5 years agofix rebase fallout
Ralf Jung [Sat, 9 Feb 2019 11:19:04 +0000 (12:19 +0100)]
fix rebase fallout

5 years agofix printing closures
Ralf Jung [Tue, 5 Feb 2019 22:40:29 +0000 (23:40 +0100)]
fix printing closures

5 years agofix node classification
Ralf Jung [Tue, 5 Feb 2019 20:49:53 +0000 (21:49 +0100)]
fix node classification

5 years agofix --emit=mir: StructCtors are functions
Ralf Jung [Sun, 3 Feb 2019 13:09:56 +0000 (14:09 +0100)]
fix --emit=mir: StructCtors are functions

5 years agodisambiguate filenames of multiple drop shims being dumped
Ralf Jung [Sun, 3 Feb 2019 12:31:50 +0000 (13:31 +0100)]
disambiguate filenames of multiple drop shims being dumped

5 years agopass full InstanceDef to run_passes
Ralf Jung [Sun, 3 Feb 2019 10:51:07 +0000 (11:51 +0100)]
pass full InstanceDef to run_passes

5 years agofix rebase fallout: AnonConsts are Consts, and Methods are functions
Ralf Jung [Sun, 3 Feb 2019 09:06:57 +0000 (10:06 +0100)]
fix rebase fallout: AnonConsts are Consts, and Methods are functions

5 years agofix dumping MIR from another crate
Ralf Jung [Sat, 2 Feb 2019 15:59:20 +0000 (16:59 +0100)]
fix dumping MIR from another crate

5 years agouse pass infrastructure for mir shims, so that they can get dumped
Ralf Jung [Thu, 22 Nov 2018 16:17:45 +0000 (17:17 +0100)]
use pass infrastructure for mir shims, so that they can get dumped

5 years agoAuto merge of #57617 - mark-i-m:multiple-matcher-bindings, r=petrochenkov
bors [Sat, 9 Feb 2019 09:48:41 +0000 (09:48 +0000)]
Auto merge of #57617 - mark-i-m:multiple-matcher-bindings, r=petrochenkov

Error on duplicate matcher bindings

fix  #57593

This should not be merged without a crater run and maybe an FCP. Discussion is ongoing at  #57593.

TODO:
- [x] write tests
- [x] crater run
- [x] ~maybe need edition gating?~ not for 1 regression /centril

r? @petrochenkov

5 years agoCleanup imports
Taiki Endo [Sat, 9 Feb 2019 08:13:39 +0000 (17:13 +0900)]
Cleanup imports