]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #58873 - GuillaumeGomez:fix-auto-hide-method-doc, r=QuietMisdreavus
kennytm [Sat, 16 Mar 2019 06:56:14 +0000 (14:56 +0800)]
Rollup merge of #58873 - GuillaumeGomez:fix-auto-hide-method-doc, r=QuietMisdreavus

Fix "Auto-hide item methods documentation" setting

Fixes #58825.

r? @QuietMisdreavus

5 years agoRollup merge of #58855 - alexcrichton:wasm-multithreaded-alloc, r=fitzgen
kennytm [Sat, 16 Mar 2019 06:56:13 +0000 (14:56 +0800)]
Rollup merge of #58855 - alexcrichton:wasm-multithreaded-alloc, r=fitzgen

std: Spin for a global malloc lock on wasm32

There's lots of comments in the code, but the main gist of this commit
is that the acquisition of the global malloc lock on the
`wasm32-unknown-unknown` target when threads are enabled will not spin
on contention rather than block.

5 years agoRollup merge of #58854 - alexcrichton:update-windows, r=Mark-Simulacrum
kennytm [Sat, 16 Mar 2019 06:56:11 +0000 (14:56 +0800)]
Rollup merge of #58854 - alexcrichton:update-windows, r=Mark-Simulacrum

appveyor: Use VS2017 for all our images

Originally added in #55935 to test build times, this was reverted
in #56201 due to a belief that it caused the exit code 259 spurious
errors. We've since learned, however, that the 259 exit code is likely
not related to this image update as we're getting it in a number of
locations now.

VS2017 looks like it may be required to compile LLVm in the near future,
notably discovered by #58408 where we attempted to update LLVM.

5 years agoAuto merge of #58556 - oli-obk:imperative_recursion, r=pnkfelix
bors [Fri, 15 Mar 2019 19:24:15 +0000 (19:24 +0000)]
Auto merge of #58556 - oli-obk:imperative_recursion, r=pnkfelix

Optimize copying large ranges of undefmask blocks

Hopefully fixes #58523

5 years agoAuto merge of #58140 - eddyb:advent-of-print, r=nikomatsakis
bors [Fri, 15 Mar 2019 13:58:03 +0000 (13:58 +0000)]
Auto merge of #58140 - eddyb:advent-of-print, r=nikomatsakis

Refactor ppaux out of existence.

A long-time coming, this PR reorganizes and rewrites the pretty-printing architecture of rustc, specifically the parts that involve the typesystem (which used to be in `rustc::util::ppaux`).

*Note: these commits used to be in #57967 before being split off.*

The new API (i.e. the `Printer` and `PrettyPrint` traits) is in `rustc::ty::print`.

Design points, roughly:
* using associated types in `Printer` to allow building e.g. an AST, not just printing as a side-effect
* several overloading points for implementers of `PrettyPrinter`, e.g. how `<...>` is printed
* for `fmt::Display` impls, the value to print is lifted to the `ty::tls` `tcx`, and everything after that stays within the `ty::print` API, which requires `'tcx` to match between values and the printer's `tcx`, without going through `fmt::Display` again

Most of the behavior is unchanged, except for a few details, which should be clear from the test changes.

r? @nikomatsakis

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

5 years agorustbuild: remove obsolete fulldeps behavior from src/test/pretty tests, and enable...
Eduard-Mihai Burtescu [Fri, 15 Mar 2019 11:24:34 +0000 (13:24 +0200)]
rustbuild: remove obsolete fulldeps behavior from src/test/pretty tests, and enable them by default.

5 years agoFix rebase fallout and address some review comments.
Eduard-Mihai Burtescu [Thu, 14 Mar 2019 17:47:24 +0000 (19:47 +0200)]
Fix rebase fallout and address some review comments.

5 years agowe can now print on entering/leaving the topmost frame, and make sure it stays that way
Ralf Jung [Thu, 7 Feb 2019 14:02:14 +0000 (15:02 +0100)]
we can now print on entering/leaving the topmost frame, and make sure it stays that way

5 years agorustc: print ExistentialProjection with spaces around `=`, e.g. `dyn Foo<A = X>`.
Eduard-Mihai Burtescu [Sun, 3 Feb 2019 22:48:16 +0000 (00:48 +0200)]
rustc: print ExistentialProjection with spaces around `=`, e.g. `dyn Foo<A = X>`.

5 years agorustc: provide DisambiguatedDefPathData in ty::print.
Eduard-Mihai Burtescu [Sun, 3 Feb 2019 10:59:37 +0000 (12:59 +0200)]
rustc: provide DisambiguatedDefPathData in ty::print.

5 years agorustc: slice substs in ty::print instead of passing the full ones.
Eduard-Mihai Burtescu [Tue, 29 Jan 2019 05:21:11 +0000 (07:21 +0200)]
rustc: slice substs in ty::print instead of passing the full ones.

5 years agorustc: let ty::print::pretty's p! macro call arbitrary methods.
Eduard-Mihai Burtescu [Fri, 25 Jan 2019 10:28:43 +0000 (12:28 +0200)]
rustc: let ty::print::pretty's p! macro call arbitrary methods.

5 years agorustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.
Eduard-Mihai Burtescu [Fri, 25 Jan 2019 10:11:50 +0000 (12:11 +0200)]
rustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.

5 years agorustc: remove the ability for pretty-printers to override nesting.
Eduard-Mihai Burtescu [Fri, 25 Jan 2019 00:34:19 +0000 (02:34 +0200)]
rustc: remove the ability for pretty-printers to override nesting.

5 years agorustc: don't thread existential projections through path_generic_args.
Eduard-Mihai Burtescu [Thu, 24 Jan 2019 18:47:02 +0000 (20:47 +0200)]
rustc: don't thread existential projections through path_generic_args.

5 years agorustc: make `pretty_path_generic_args`' task as simple as possible.
Eduard-Mihai Burtescu [Thu, 24 Jan 2019 17:52:43 +0000 (19:52 +0200)]
rustc: make `pretty_path_generic_args`' task as simple as possible.

5 years agorustc: print elided regions as '_ instead of nothing, and use a separate check when...
Eduard-Mihai Burtescu [Wed, 23 Jan 2019 17:36:39 +0000 (19:36 +0200)]
rustc: print elided regions as '_ instead of nothing, and use a separate check when optional.

5 years agorustc: always hide defaulted generic args, even in verbose mode.
Eduard-Mihai Burtescu [Wed, 23 Jan 2019 16:39:05 +0000 (18:39 +0200)]
rustc: always hide defaulted generic args, even in verbose mode.

5 years agorustc: move ty::print::PrintConfig's fields to FmtPrinter.
Eduard-Mihai Burtescu [Sun, 20 Jan 2019 17:46:47 +0000 (19:46 +0200)]
rustc: move ty::print::PrintConfig's fields to FmtPrinter.

5 years agorustc: streamline the Print/fmt::Display impls in ppaux and move them to ty::print...
Eduard-Mihai Burtescu [Sun, 20 Jan 2019 12:00:39 +0000 (14:00 +0200)]
rustc: streamline the Print/fmt::Display impls in ppaux and move them to ty::print::pretty.

5 years agorustc: remove obsolete hacks from ppaux, relating to normalization under HRTB.
Eduard-Mihai Burtescu [Sun, 20 Jan 2019 02:56:48 +0000 (04:56 +0200)]
rustc: remove obsolete hacks from ppaux, relating to normalization under HRTB.

5 years agorustc: move Debug impls from ppaux to ty::structural_impls.
Eduard-Mihai Burtescu [Sat, 19 Jan 2019 04:33:44 +0000 (06:33 +0200)]
rustc: move Debug impls from ppaux to ty::structural_impls.

5 years agorustc: disconnect all the Debug functionality from ty::print.
Eduard-Mihai Burtescu [Sat, 19 Jan 2019 01:25:51 +0000 (03:25 +0200)]
rustc: disconnect all the Debug functionality from ty::print.

5 years agorustc: make util::ppaux private.
Eduard-Mihai Burtescu [Fri, 18 Jan 2019 20:14:01 +0000 (22:14 +0200)]
rustc: make util::ppaux private.

5 years agorustc: remove fields from ty::print::PrintConfig available from tcx.
Eduard-Mihai Burtescu [Fri, 18 Jan 2019 19:45:13 +0000 (21:45 +0200)]
rustc: remove fields from ty::print::PrintConfig available from tcx.

5 years agorustc: split out the pretty-printing parts of ty::print into a separate module.
Eduard-Mihai Burtescu [Fri, 18 Jan 2019 19:33:31 +0000 (21:33 +0200)]
rustc: split out the pretty-printing parts of ty::print into a separate module.

5 years agorustc: move ty/print.rs to ty/print/mod.rs.
Eduard-Mihai Burtescu [Fri, 18 Jan 2019 17:18:47 +0000 (19:18 +0200)]
rustc: move ty/print.rs to ty/print/mod.rs.

5 years agorustc_codegen_utils: print all nominal types as paths, in symbol names.
Eduard-Mihai Burtescu [Mon, 14 Jan 2019 22:41:14 +0000 (00:41 +0200)]
rustc_codegen_utils: print all nominal types as paths, in symbol names.

5 years agorustc: don't pass Namespace explicitly, but rather track it in FmtPrinter.
Eduard-Mihai Burtescu [Mon, 14 Jan 2019 21:40:53 +0000 (23:40 +0200)]
rustc: don't pass Namespace explicitly, but rather track it in FmtPrinter.

5 years agorustc: introduce a ty::print::PrettyPrinter helper for printing "<...>".
Eduard-Mihai Burtescu [Mon, 14 Jan 2019 20:07:38 +0000 (22:07 +0200)]
rustc: introduce a ty::print::PrettyPrinter helper for printing "<...>".

5 years agorustc: support overriding type printing in ty::print::Printer.
Eduard-Mihai Burtescu [Mon, 14 Jan 2019 17:56:46 +0000 (19:56 +0200)]
rustc: support overriding type printing in ty::print::Printer.

5 years agorustc: support overriding region printing in ty::print::Printer.
Eduard-Mihai Burtescu [Mon, 14 Jan 2019 15:55:57 +0000 (17:55 +0200)]
rustc: support overriding region printing in ty::print::Printer.

5 years agorustc: centralize region printing in ty::RegionKind's Print impl.
Eduard-Mihai Burtescu [Mon, 14 Jan 2019 14:26:03 +0000 (16:26 +0200)]
rustc: centralize region printing in ty::RegionKind's Print impl.

5 years agorustc: don't keep RegionHighlightMode in a thread-local.
Eduard-Mihai Burtescu [Fri, 11 Jan 2019 11:07:01 +0000 (13:07 +0200)]
rustc: don't keep RegionHighlightMode in a thread-local.

5 years agorustc: pass ty::print::PrintCx by value.
Eduard-Mihai Burtescu [Thu, 10 Jan 2019 11:27:11 +0000 (13:27 +0200)]
rustc: pass ty::print::PrintCx by value.

5 years agorustc: remove the closure from ppaux's p! macro (by making ? implicit).
Eduard-Mihai Burtescu [Thu, 10 Jan 2019 12:50:36 +0000 (14:50 +0200)]
rustc: remove the closure from ppaux's p! macro (by making ? implicit).

5 years agorustc: split off most of ty::print::PrintCx's fields into a separate struct.
Eduard-Mihai Burtescu [Thu, 10 Jan 2019 11:26:35 +0000 (13:26 +0200)]
rustc: split off most of ty::print::PrintCx's fields into a separate struct.

5 years agorustc: uniformize ty::print's error handling by requiring Result.
Eduard-Mihai Burtescu [Wed, 9 Jan 2019 14:30:10 +0000 (16:30 +0200)]
rustc: uniformize ty::print's error handling by requiring Result.

5 years agorustc: rename ppaux' print macro to just p and make its cx input implicit.
Eduard-Mihai Burtescu [Wed, 9 Jan 2019 11:05:05 +0000 (13:05 +0200)]
rustc: rename ppaux' print macro to just p and make its cx input implicit.

5 years agorustc: make ppaux' print macro use only one closure.
Eduard-Mihai Burtescu [Wed, 9 Jan 2019 10:13:39 +0000 (12:13 +0200)]
rustc: make ppaux' print macro use only one closure.

5 years agorustc: replace node_path_str with uses of def_path_str.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 08:08:30 +0000 (10:08 +0200)]
rustc: replace node_path_str with uses of def_path_str.

5 years agorustc: remove `ty::print::FORCE_ABSOLUTE` altogether.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 05:27:44 +0000 (07:27 +0200)]
rustc: remove `ty::print::FORCE_ABSOLUTE` altogether.

5 years agorustc: assert `ty::print::FORCE_ABSOLUTE` isn't needed anymore.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 05:00:30 +0000 (07:00 +0200)]
rustc: assert `ty::print::FORCE_ABSOLUTE` isn't needed anymore.

5 years agorustc: move `...::<impl ...>` printing into `pretty_path_qualified`.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 04:09:22 +0000 (06:09 +0200)]
rustc: move `...::<impl ...>` printing into `pretty_path_qualified`.

5 years agorustc: move the `FORCE_IMPL_FILENAME_LINE` hack into `print_def_path`.
Eduard-Mihai Burtescu [Fri, 21 Dec 2018 18:08:01 +0000 (20:08 +0200)]
rustc: move the `FORCE_IMPL_FILENAME_LINE` hack into `print_def_path`.

5 years agorustc: move <...>-less impl path special-case to pretty_path_qualified.
Eduard-Mihai Burtescu [Fri, 21 Dec 2018 15:31:33 +0000 (17:31 +0200)]
rustc: move <...>-less impl path special-case to pretty_path_qualified.

5 years agorustc: merge PrintCx::parameterized and def_path printing.
Eduard-Mihai Burtescu [Fri, 21 Dec 2018 15:10:21 +0000 (17:10 +0200)]
rustc: merge PrintCx::parameterized and def_path printing.

5 years agorustc: integrate LocalPathPrinter's behavior into FmtPrinter.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 12:49:32 +0000 (14:49 +0200)]
rustc: integrate LocalPathPrinter's behavior into FmtPrinter.

5 years agorustc: move the contents of ty::item_path to ty::print.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 11:25:31 +0000 (13:25 +0200)]
rustc: move the contents of ty::item_path to ty::print.

5 years agorustc: rename item_path to def_path (except the module in ty).
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 10:31:35 +0000 (12:31 +0200)]
rustc: rename item_path to def_path (except the module in ty).

5 years agorustc: remove TyCtxt::parent_def_id in favor of TyCtxt::parent.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 10:20:59 +0000 (12:20 +0200)]
rustc: remove TyCtxt::parent_def_id in favor of TyCtxt::parent.

5 years agorustc_mir: adjust the type_length_limit diagnostic to be more useful.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 04:39:33 +0000 (06:39 +0200)]
rustc_mir: adjust the type_length_limit diagnostic to be more useful.

5 years agorustc: pass Option<&Substs> and Namespace around in ty::item_path.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 03:01:06 +0000 (05:01 +0200)]
rustc: pass Option<&Substs> and Namespace around in ty::item_path.

5 years agoAuto merge of #58575 - mati865:musl_toolchain, r=alexcrichton
bors [Fri, 15 Mar 2019 11:00:13 +0000 (11:00 +0000)]
Auto merge of #58575 - mati865:musl_toolchain, r=alexcrichton

Musl host toolchain

Based on https://github.com/rust-lang/rust/pull/55163 and https://github.com/rust-lang/rust/pull/57359
Depends on https://github.com/rust-lang/rust/pull/55566

CC https://github.com/rust-lang/rust/issues/57439

### How it works

Tested compiler made by `dist` on glibc and musl based distributions and verified binaries it produces:
* Ubuntu (glibc) - installed it as a target for host toolchain and observed no regressions for static (default) linking, dynamic linking apparently requires musl build libgcc so I didn't test it.
* Alpine (musl) - installed as the host toolchain, by default it links statically (executables are portable and work on glibc distributions) but with `-C target-feature=-crt-static` Rust flag it links dynamically (executables require musl built libraries).

### What's debatable

It should be decided whether this toolchain should link dynamically or statically when using it on musl distribution. I believe the distributions would prefer dynamic linking but it'd be misleading because `$ARCH-unknown-linux-musl` target links statically on the other hosts.
Another problem is using `RUSTFLAGS='-C target-feature=-crt-static'` for dynamic builds which is really uncomfortable.

To address both issues I suggest leaving `$ARCH-unknown-linux-musl` static for both host and cross target and introducing "alias triple" `$ARCH-unknown-linux-dynmusl`. It'd be the same as `$ARCH-unknown-linux-musl` (and use the same libraries to avoid duplication) but it'd link dynamically.

<del>
### Why it's still WIP (help wanted)

I'm having a hard time getting all tests to pass and I'd appreciate help.

Non-verbose error:
<details>

```
Testing proc_macro stage1 (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling proc_macro v0.0.0 (/checkout/src/libproc_macro)
error[E0463]: can't find crate for `std`

error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
[RUSTC-TIMING] proc_macro test:true 0.529
[RUSTC-TIMING] proc_macro test:false 0.530
error: Could not compile `proc_macro`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `proc_macro`.

To learn more, run the command again with --verbose.

command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-musl" "-j" "16" "--release" "--locked" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-p" "proc_macro" "--"
expected success, got: exit code: 101

failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --host x86_64-unknown-linux-musl --target x86_64-unknown-linux-musl
```
</details>

Verbose error:
<details>

```
Testing proc_macro stage1 (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling proc_macro v0.0.0 (/checkout/src/libproc_macro)
     Running `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=09ddd3ecc930ab63 -C extra-filename=-09ddd3ecc930ab63 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static`
     Running `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --emit=dep-info,link -C opt-level=2 --test -C metadata=a564d363930469c8 -C extra-filename=-a564d363930469c8 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static`
error[E0463]: can't find crate for `std`
error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
[RUSTC-TIMING] proc_macro test:false 0.248
error: Could not compile `proc_macro`.

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=09ddd3ecc930ab63 -C extra-filename=-09ddd3ecc930ab63 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] proc_macro test:true 0.248
error: Could not compile `proc_macro`.

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --edition=2018 --crate-name proc_macro src/libproc_macro/lib.rs --color never --emit=dep-info,link -C opt-level=2 --test -C metadata=a564d363930469c8 -C extra-filename=-a564d363930469c8 --out-dir /checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-musl/stage1-test/release/deps -C target-feature=-crt-static` (exit code: 1)

command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-musl" "-j" "16" "--release" "--locked" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "--verbose" "-p" "proc_macro" "--"
expected success, got: exit code: 101

failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --host x86_64-unknown-linux-musl --target x86_64-unknown-linux-musl
```

</details>

Whole tests non-verbose output: [rust-tests.log](https://github.com/rust-lang/rust/files/2879945/rust-tests.log)

I think the error is because build system (correctly?) tries to use `obj/build/x86_64-unknown-linux-musl/stage1-test/x86_64-unknown-linux-musl/release/deps` which is empty but `obj/build/x86_64-unknown-linux-gnu/stage1-test/x86_64-unknown-linux-musl/release/deps` contains required libs.
</del>

5 years agorustc: move the FORCE_IMPL_FILENAME_LINE handling into LocalPathPrinter.
Eduard-Mihai Burtescu [Wed, 12 Dec 2018 16:28:29 +0000 (18:28 +0200)]
rustc: move the FORCE_IMPL_FILENAME_LINE handling into LocalPathPrinter.

5 years agorustc: explicitly pass the namespace to PrintCx::parameterized.
Eduard-Mihai Burtescu [Wed, 12 Dec 2018 13:12:48 +0000 (15:12 +0200)]
rustc: explicitly pass the namespace to PrintCx::parameterized.

5 years agorustc: move the formatter into ty::print::PrintCx.
Eduard-Mihai Burtescu [Mon, 10 Dec 2018 14:10:22 +0000 (16:10 +0200)]
rustc: move the formatter into ty::print::PrintCx.

5 years agorustc: add a ty::RegionKind::display_outputs_anything method to avoid printing to...
Eduard-Mihai Burtescu [Wed, 12 Dec 2018 07:47:45 +0000 (09:47 +0200)]
rustc: add a ty::RegionKind::display_outputs_anything method to avoid printing to a string.

5 years agorustc: always rely on '_ to be not printed by ty::Region itself.
Eduard-Mihai Burtescu [Mon, 10 Dec 2018 15:36:24 +0000 (17:36 +0200)]
rustc: always rely on '_ to be not printed by ty::Region itself.

5 years agorustc: remove ty::item_path::RootMode by moving local logic into the printer.
Eduard-Mihai Burtescu [Mon, 10 Dec 2018 10:59:08 +0000 (12:59 +0200)]
rustc: remove ty::item_path::RootMode by moving local logic into the printer.

5 years agorustc: rewrite ty::item_path to be more functional than mutation-oriented.
Eduard-Mihai Burtescu [Sun, 9 Dec 2018 19:05:22 +0000 (21:05 +0200)]
rustc: rewrite ty::item_path to be more functional than mutation-oriented.

5 years agorustc_codegen_utils: revert some symbol_names refactors (while keeping the functional...
Eduard-Mihai Burtescu [Sun, 3 Feb 2019 10:24:29 +0000 (12:24 +0200)]
rustc_codegen_utils: revert some symbol_names refactors (while keeping the functional changes).

5 years agorustc: support impl's in PrintCx::parameterized.
Eduard-Mihai Burtescu [Sun, 9 Dec 2018 15:54:18 +0000 (17:54 +0200)]
rustc: support impl's in PrintCx::parameterized.

5 years agorustc: rewrite PrintCx::parameterized to be much simpler and more general.
Eduard-Mihai Burtescu [Sat, 8 Dec 2018 09:26:34 +0000 (11:26 +0200)]
rustc: rewrite PrintCx::parameterized to be much simpler and more general.

5 years agorustc: use define_print! to implement fmt::{Display,Debug} for Kind.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 23:13:23 +0000 (01:13 +0200)]
rustc: use define_print! to implement fmt::{Display,Debug} for Kind.

5 years agorustc: tie the 'tcx between Print and PrintCx in ty::print.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 15:40:23 +0000 (17:40 +0200)]
rustc: tie the 'tcx between Print and PrintCx in ty::print.

5 years agorustc: implement fmt::{Debug,Display} on Ty instead of TyS.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 18:10:47 +0000 (20:10 +0200)]
rustc: implement fmt::{Debug,Display} on Ty instead of TyS.

5 years agorustc: remove fmt::{Debug,Display} from ty::TyKind.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 17:14:30 +0000 (19:14 +0200)]
rustc: remove fmt::{Debug,Display} from ty::TyKind.

5 years agorustc: keep a TyCtxt in PrintCx and use it instead of ty::tls.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 13:22:50 +0000 (15:22 +0200)]
rustc: keep a TyCtxt in PrintCx and use it instead of ty::tls.

5 years agorustc: rename PrintContext to PrintCx.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 14:17:44 +0000 (16:17 +0200)]
rustc: rename PrintContext to PrintCx.

5 years agorustc: don't support missing TLS TyCtxt in ty::print.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 18:04:21 +0000 (20:04 +0200)]
rustc: don't support missing TLS TyCtxt in ty::print.

5 years agorustc: don't support `tcx.lift` returning `None` in ppaux.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:35:48 +0000 (19:35 +0200)]
rustc: don't support `tcx.lift` returning `None` in ppaux.

5 years agorustc: uniformize all lift expect messages to "could not lift for printing".
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:25:17 +0000 (19:25 +0200)]
rustc: uniformize all lift expect messages to "could not lift for printing".

5 years agorustc: add a 'tcx parameter to Print.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:13:55 +0000 (19:13 +0200)]
rustc: add a 'tcx parameter to Print.

5 years agorustc: start moving util::ppaux to ty::print.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:13:37 +0000 (19:13 +0200)]
rustc: start moving util::ppaux to ty::print.

5 years agorustc: remove unnecessary extern_prelude logic from ty::item_path.
Eduard-Mihai Burtescu [Sun, 9 Dec 2018 20:42:08 +0000 (22:42 +0200)]
rustc: remove unnecessary extern_prelude logic from ty::item_path.

5 years agoAuto merge of #58710 - EdorianDark:master, r=sfackler
bors [Fri, 15 Mar 2019 06:23:21 +0000 (06:23 +0000)]
Auto merge of #58710 - EdorianDark:master, r=sfackler

Add clamp for ranges. Implements #44095

Ready for merge

5 years agoFix TARGET variable in musl-toolchain.sh
Mateusz Mikuła [Fri, 15 Mar 2019 00:19:54 +0000 (01:19 +0100)]
Fix TARGET variable in musl-toolchain.sh

5 years agoAddress final review
Mateusz Mikuła [Thu, 14 Mar 2019 15:55:47 +0000 (16:55 +0100)]
Address final review

5 years agoAuto merge of #59181 - RalfJung:miri, r=oli-obk
bors [Thu, 14 Mar 2019 15:37:26 +0000 (15:37 +0000)]
Auto merge of #59181 - RalfJung:miri, r=oli-obk

update miri

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

r? @oli-obk

5 years agoupdate miri
Ralf Jung [Thu, 14 Mar 2019 14:25:23 +0000 (15:25 +0100)]
update miri

5 years agoAuto merge of #58176 - Zoxc:lint-levels, r=oli-obk
bors [Thu, 14 Mar 2019 12:09:13 +0000 (12:09 +0000)]
Auto merge of #58176 - Zoxc:lint-levels, r=oli-obk

Only insert nodes which changes lint levels in the LintLevelMap

r? @eddyb

5 years agoAuto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoerister
bors [Thu, 14 Mar 2019 08:38:56 +0000 (08:38 +0000)]
Auto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoerister

Replace TimeLine LLVM profiling with the self profiler

5 years agoAuto merge of #59120 - alexreg:move-issue-tests-1, r=varkor
bors [Thu, 14 Mar 2019 01:28:18 +0000 (01:28 +0000)]
Auto merge of #59120 - alexreg:move-issue-tests-1, r=varkor

Moved issue tests to subdirs and normalised names

Consistency, decluttering, ease of navigation :-)

r? @Centril

5 years agoMoved issue tests to subdirs and normalised names.
Alexander Regueiro [Tue, 12 Mar 2019 00:49:17 +0000 (00:49 +0000)]
Moved issue tests to subdirs and normalised names.

5 years agoFinal cleanups
Mateusz Mikuła [Wed, 13 Mar 2019 21:18:13 +0000 (22:18 +0100)]
Final cleanups

5 years agoMove testing to test-various
Mateusz Mikuła [Tue, 12 Mar 2019 16:15:03 +0000 (17:15 +0100)]
Move testing to test-various

5 years agoDisable relax relocations again
Mateusz Mikuła [Mon, 4 Mar 2019 13:00:05 +0000 (14:00 +0100)]
Disable relax relocations again

5 years agoDrop copyright notice from musl-toolchain
Mateusz Mikuła [Sat, 10 Feb 2018 13:03:13 +0000 (14:03 +0100)]
Drop copyright notice from musl-toolchain

5 years agomusl: update LLVM to 7
Mateusz Mikuła [Fri, 11 Jan 2019 17:45:37 +0000 (18:45 +0100)]
musl: update LLVM to 7

5 years agoAddress review comments
Martell Malone [Sat, 5 Jan 2019 20:59:46 +0000 (12:59 -0800)]
Address review comments

5 years agomusl-toolchain: fix global lib paths (dont create /lib/libc.so)
Jonathan Sieber [Tue, 27 Nov 2018 19:56:34 +0000 (20:56 +0100)]
musl-toolchain: fix global lib paths (dont create /lib/libc.so)

5 years agoMake the musl dynamic loader known to the system, so it can execute target binaries
Jonathan Sieber [Fri, 19 Oct 2018 20:28:34 +0000 (20:28 +0000)]
Make the musl dynamic loader known to the system, so it can execute target binaries

5 years agobuild a proper c++-enabled musl toolchain with musl-cross-make
Jonathan Sieber [Fri, 19 Oct 2018 19:04:33 +0000 (19:04 +0000)]
build a proper c++-enabled musl toolchain with musl-cross-make

5 years agoSet RUSTFLAGS env to make dylib work
Jonathan Sieber [Thu, 18 Oct 2018 19:47:26 +0000 (21:47 +0200)]
Set RUSTFLAGS env to make dylib work

The musl-target doesn't automatically disable static linking of musl when building a dylib, and then complains it can't build a dylib.
As a workaround, disable static linking via RUSTFLAGS, to see how far the build gets.
The proper fix is to have rustc figure that out automagically.

5 years agoEnable dist-x86_64-musl as a host architexture
JonathanS [Wed, 17 Oct 2018 20:13:21 +0000 (22:13 +0200)]
Enable dist-x86_64-musl as a host architexture

5 years agoAuto merge of #59143 - ehuss:update-cargo, r=ehuss
bors [Wed, 13 Mar 2019 18:26:45 +0000 (18:26 +0000)]
Auto merge of #59143 - ehuss:update-cargo, r=ehuss

Update cargo

6 commits in 95b45eca19ac785263fed98ecefe540bb47337ac..0e35bd8af0ec72d3225c4819b330b94628f0e9d0
2019-03-06 19:24:30 +0000 to 2019-03-13 06:52:51 +0000
- Make `hg` optional for tests. (rust-lang/cargo#6739)
- Fingerprint build script deps only for path packages. (rust-lang/cargo#6734)
- Add --quiet option for `cargo test` (rust-lang/cargo#6358)
- .gitignore should end with a newline. (rust-lang/cargo#6732)
- Emit warning on misspelled environment variables (rust-lang/cargo#6694)
- Update glob requirement from 0.2.11 to 0.3.0 (rust-lang/cargo#6724)

5 years agoUpdate cargo
Eric Huss [Tue, 12 Mar 2019 20:34:47 +0000 (13:34 -0700)]
Update cargo

5 years agoAuto merge of #58349 - petrochenkov:uni201x, r=pnkfelix
bors [Wed, 13 Mar 2019 14:59:05 +0000 (14:59 +0000)]
Auto merge of #58349 - petrochenkov:uni201x, r=pnkfelix

resolve: Simplify import resolution for mixed 2015/2018 edition mode

Non-controversial part of https://github.com/rust-lang/rust/pull/57745.

Before:

| Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`)                                 | Absolute paths (`::foo`)                                 |
| ------------- |----------------|-----------------------------------------|------------------------------------------------|
| 2018          | Any            | Uniform                                 | Extern prelude                                 |
| 2015          | 2015           | Crate-relative                          | Crate-relative                                 |
| 2015          | 2018           | Crate-relative with fallback to Uniform (future-proofed to error if the result is not Crate-relative or from Extern prelude) | Crate-relative with fallback to Extern prelude |

After:

| Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`)                                 | Absolute paths (`::foo`)                                 |
| ------------- |----------------|-----------------------------------------|------------------------------------------------|
| 2018          | Any            | Uniform                                 | Extern prelude                                 |
| 2015          | 2015           | Crate-relative                          | Crate-relative                                 |
| 2015          | 2018           | Crate-relative with fallback to Extern prelude | Crate-relative with fallback to Extern prelude |

I.e. only the behavior of the mixed local-2015-global-2018 mode is changed.
This mixed mode has two goals:
- Address regressions from https://github.com/rust-lang/rust/pull/56053#issuecomment-440826397.
Both "before" and "after" variants address those regressions.
- Be retrofit-able to "full 2015" edition (https://github.com/rust-lang/rust/pull/57745).
Any more complex fallback scheme (with more candidates) than "Crate-relative with fallback to Extern prelude" will give more regressions than https://github.com/rust-lang/rust/pull/57745#issuecomment-455855089 and is therefore less retrofit-able while also being, well, more complex.
So, we can settle on "Crate-relative with fallback to Extern prelude".

(I'll hopefully proceed with https://github.com/rust-lang/rust/pull/57745 after mid-February.)

r? @Centril

5 years agoAuto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoerister
bors [Wed, 13 Mar 2019 11:36:46 +0000 (11:36 +0000)]
Auto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoerister

Use derive macro for HashStable

Blocked on https://github.com/rust-lang/rust/pull/56795