]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #58238 - Mark-Simulacrum:doctest-fix, r=alexcrichton
bors [Wed, 13 Feb 2019 10:27:50 +0000 (10:27 +0000)]
Auto merge of #58238 - Mark-Simulacrum:doctest-fix, r=alexcrichton

Fixes rustdoc in stage 0, stage 1

When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).

This fixes stage 0 of https://github.com/rust-lang/rust/issues/52186 as well as being part of general workflow improvements (making stage 0 testing for std work) for rustbuild.

The stage 1 fix (second commit) completely resolves the problem, so this fixes https://github.com/rust-lang/rust/issues/52186.

5 years agoAuto merge of #58235 - jethrogb:jb/sgx-usercall-internals, r=alexcrichton
bors [Wed, 13 Feb 2019 07:46:21 +0000 (07:46 +0000)]
Auto merge of #58235 - jethrogb:jb/sgx-usercall-internals, r=alexcrichton

SGX target: simplify usercall internals

This moves logic from assembly to Rust and removes the special case for exit/panic handling, merging it with regular usercall handling.

Also, this fixes a bug in the exit usercall introduced in a75ae00. The bug would make regular exits look like panics with high probability. It would also with some probability leak information through uncleared registers.

cc @VardhanThigle

r? @alexcrichton

5 years agoAuto merge of #58415 - Centril:rollup, r=Centril
bors [Wed, 13 Feb 2019 05:14:12 +0000 (05:14 +0000)]
Auto merge of #58415 - Centril:rollup, r=Centril

Rollup of 12 pull requests

Successful merges:

 - #57693 (Doc rewording)
 - #57815 (Speed up the fast path for assert_eq! and assert_ne!)
 - #58034 (Stabilize the time_checked_add feature)
 - #58057 (Stabilize linker-plugin based LTO (aka cross-language LTO))
 - #58137 (Cleanup: rename node_id_to_type(_opt))
 - #58166 (allow shorthand syntax for deprecation reason)
 - #58200 (fix str mutating through a ptr derived from &self)
 - #58273 (Rename rustc_errors dependency in rust 2018 crates)
 - #58289 (impl iter() for dyn Error)
 - #58387 (Disallow `auto` trait alias syntax)
 - #58404 (use Ubuntu keyserver for CloudABI ports)
 - #58405 (Remove some dead code from libcore)

Failed merges:

r? @ghost

5 years agoRollup merge of #58405 - gnzlbg:remove_unused_macros, r=alexcrichton
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:09 +0000 (04:37 +0100)]
Rollup merge of #58405 - gnzlbg:remove_unused_macros, r=alexcrichton

Remove some dead code from libcore

These macros are not required to glue the `core_arch` crate anymore.

5 years agoRollup merge of #58404 - euclio:cloudabi-keyserver, r=alexcrichton
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:08 +0000 (04:37 +0100)]
Rollup merge of #58404 - euclio:cloudabi-keyserver, r=alexcrichton

use Ubuntu keyserver for CloudABI ports

The Ubuntu keyserver is more reliable than the MIT PGP server, which is
prone to going down. This commit also explicitly uses port 80 on the
keyserver for reasons outlined in #57844.

5 years agoRollup merge of #58387 - alexreg:fix-trait-alias-2, r=centril
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:07 +0000 (04:37 +0100)]
Rollup merge of #58387 - alexreg:fix-trait-alias-2, r=centril

Disallow `auto` trait alias syntax

See https://github.com/rust-lang/rust/issues/41517#issuecomment-462567679.

r? @Centril

CC @topecongiro @nikomatsakis

5 years agoRollup merge of #58289 - haraldh:master, r=sfackler
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:05 +0000 (04:37 +0100)]
Rollup merge of #58289 - haraldh:master, r=sfackler

impl iter() for dyn Error

Examples:

```rust
let next_error_type_a = err
    .iter()
    .filter_map(Error::downcast_ref::<ErrorTypeA>)
    .next();
```

```rust
let source_root_error = err.iter().last();
```

Credit for the ErrorIter goes to reddit user /u/tdiekmann (Tim Diekmann)
https://www.reddit.com/r/rust/comments/aj3lpg/is_an_iterator_impl_over_errorsource_possible/

5 years agoRollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasper
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:04 +0000 (04:37 +0100)]
Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasper

Rename rustc_errors dependency in rust 2018 crates

I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules.

Related: rust-lang/cargo#5653

cc #58099

r? @Centril

5 years agoRollup merge of #58200 - RalfJung:str-as-mut-ptr, r=SimonSapin
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:03 +0000 (04:37 +0100)]
Rollup merge of #58200 - RalfJung:str-as-mut-ptr, r=SimonSapin

fix str mutating through a ptr derived from &self

Found by Miri: In `get_unchecked_mut` (also used by the checked variants internally) uses `str::as_ptr` to create a mutable reference, but `as_ptr` takes `&self`.  This means the mutable references we return here got created from a shared reference, which violates the shared-references-are-read-only discipline!

For this by using a newly introduced `as_mut_ptr` instead.

5 years agoRollup merge of #58166 - euclio:deprecation-shorthand, r=petrochenkov
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:02 +0000 (04:37 +0100)]
Rollup merge of #58166 - euclio:deprecation-shorthand, r=petrochenkov

allow shorthand syntax for deprecation reason

Fixes #48271.

Created based on discussion in #56896.

5 years agoRollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebank
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:37:00 +0000 (04:37 +0100)]
Rollup merge of #58137 - ljedrz:cleanup_node_id_to_type, r=estebank

Cleanup: rename node_id_to_type(_opt)

Renames `node_id_to_type(_opt)` to `hir_id_to_type(_opt)`; this makes it clear we are dealing with HIR nodes and their IDs here.

In addition, a drive-by commit removing `ty::item_path::hir_path_str` (as requested by @eddyb).

5 years agoRollup merge of #58057 - michaelwoerister:stabilize-xlto, r=alexcrichton
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:36:59 +0000 (04:36 +0100)]
Rollup merge of #58057 - michaelwoerister:stabilize-xlto, r=alexcrichton

Stabilize linker-plugin based LTO (aka cross-language LTO)

This PR stabilizes [linker plugin based LTO](https://github.com/rust-lang/rust/issues/49879), also known as "cross-language LTO" because it allows for doing inlining and other optimizations across language boundaries in mixed Rust/C/C++ projects.

As described in the tracking issue, it works by making `rustc` emit LLVM bitcode instead of machine code, the same as `clang` does. A linker with the proper plugin (like LLD) can then run (Thin)LTO across all modules.

The feature has been implemented over a number of pull requests and there are various [codegen](https://github.com/rust-lang/rust/blob/master/src/test/codegen/no-dllimport-w-cross-lang-lto.rs) and [run](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-clang)-[make](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs) [tests](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto) that make sure that it keeps working.

It also works for building big projects like [Firefox](https://treeherder.mozilla.org/#/jobs?repo=try&revision=2ce2d5ddcea6fbff790503eac406954e469b2f5d).

The PR makes the feature available under the `-C linker-plugin-lto` flag. As discussed in the tracking issue it is not cross-language specific and also not LLD specific. `-C linker-plugin-lto` is descriptive of what it does. If someone has a better name, let me know `:)`

5 years agoRollup merge of #58034 - faern:stabilize-time-checked-add, r=alexcrichton
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:36:58 +0000 (04:36 +0100)]
Rollup merge of #58034 - faern:stabilize-time-checked-add, r=alexcrichton

Stabilize the time_checked_add feature

Closes #55940

Stabilizes `checked_add` and `checked_sub` on `Instant` and `SystemTime`.

5 years agoRollup merge of #57815 - dotdash:asserts, r=sfackler
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:36:56 +0000 (04:36 +0100)]
Rollup merge of #57815 - dotdash:asserts, r=sfackler

Speed up the fast path for assert_eq! and assert_ne!

Currently, the panic!() calls directly borrow the value bindings. This
causes those bindings to always be initialized, i.e. they're initialized
even before the values are even compared. This causes noticeable
overhead in what should be a really cheap operation.

By performing a reborrow of the value in the call to panic!(), we allow
LLVM to optimize that code, so that the extra borrow only happens in the
error case.

We could achieve the same result by dereferencing the values passed to
panic!(), as the format machinery borrows them anyway, but this causes
assertions to fail to compile if one of the values is unsized, i.e. it
would be a breaking change.

5 years agoRollup merge of #57693 - king6cong:word, r=Centril
Mazdak Farrokhzad [Wed, 13 Feb 2019 03:36:55 +0000 (04:36 +0100)]
Rollup merge of #57693 - king6cong:word, r=Centril

Doc rewording

None

5 years agoAuto merge of #58051 - SimonSapin:str_escape, r=alexcrichton
bors [Tue, 12 Feb 2019 23:30:16 +0000 (23:30 +0000)]
Auto merge of #58051 - SimonSapin:str_escape, r=alexcrichton

Stabilize str::escape_* methods with new return types…

… that implement `Display` and `Iterator<Item=char>`, as proposed in FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727

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 agoFix some rebasing fallout regarding xLTO.
Michael Woerister [Tue, 12 Feb 2019 16:17:05 +0000 (17:17 +0100)]
Fix some rebasing fallout regarding xLTO.

5 years agoFix rebase fail
Taiki Endo [Sun, 10 Feb 2019 06:27:59 +0000 (15:27 +0900)]
Fix rebase fail

5 years agoCleanup imports
Taiki Endo [Sat, 9 Feb 2019 02:24:02 +0000 (11:24 +0900)]
Cleanup imports

5 years agoRename rustc_errors dependency in rust 2018 crates
Taiki Endo [Thu, 7 Feb 2019 15:56:05 +0000 (00:56 +0900)]
Rename rustc_errors dependency in rust 2018 crates

5 years agoRemove some dead code from libcore
gnzlbg [Tue, 12 Feb 2019 15:11:27 +0000 (16:11 +0100)]
Remove some dead code from libcore

These macros are not required to glue the `core_arch` crate anymore.

5 years agoAdd documentation about -Clinker-plugin-lto to rustc book.
Michael Woerister [Tue, 12 Feb 2019 14:07:04 +0000 (15:07 +0100)]
Add documentation about -Clinker-plugin-lto to rustc book.

5 years agouse Ubuntu keyserver for CloudABI ports
Andy Russell [Tue, 12 Feb 2019 04:50:31 +0000 (23:50 -0500)]
use Ubuntu keyserver for CloudABI ports

The Ubuntu keyserver is more reliable than the MIT PGP server, which is
prone to going down. This commit also explicitly uses port 80 on the
keyserver for reasons outlined in #57844.

5 years agoAdded tests.
Alexander Regueiro [Tue, 12 Feb 2019 01:50:45 +0000 (01:50 +0000)]
Added tests.

5 years agoStabilize linker-plugin based LTO.
Michael Woerister [Fri, 1 Feb 2019 14:15:43 +0000 (15:15 +0100)]
Stabilize linker-plugin based LTO.

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 agoAdd doctests for str::escape_*
Simon Sapin [Sat, 2 Feb 2019 10:25:46 +0000 (11:25 +0100)]
Add doctests for str::escape_*

5 years agoMake the prema-unstable char::escape_debug_ext method crate-private
Simon Sapin [Sat, 2 Feb 2019 09:37:40 +0000 (10:37 +0100)]
Make the prema-unstable char::escape_debug_ext method crate-private

5 years agoMove str::escape_* to libcore
Simon Sapin [Sat, 2 Feb 2019 09:34:36 +0000 (10:34 +0100)]
Move str::escape_* to libcore

5 years agoStabilize str::escape_* methods
Simon Sapin [Fri, 1 Feb 2019 12:34:07 +0000 (13:34 +0100)]
Stabilize str::escape_* methods

FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727

5 years agoNew return types for str::escape_* that impl Display and Iterator<char>
Simon Sapin [Fri, 1 Feb 2019 12:31:24 +0000 (13:31 +0100)]
New return types for str::escape_* that impl Display and Iterator<char>

As FCP’ed in the tracking issue: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727

5 years agoAdd internal impl_fn_for_zst macro for "named closure types"
Simon Sapin [Fri, 1 Feb 2019 11:43:29 +0000 (12:43 +0100)]
Add internal impl_fn_for_zst macro for "named closure types"

5 years agoDoc rewording
king6cong [Thu, 17 Jan 2019 09:34:25 +0000 (17:34 +0800)]
Doc rewording

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 agoDisallow `auto` trait alias syntax.
Alexander Regueiro [Tue, 12 Feb 2019 01:50:33 +0000 (01:50 +0000)]
Disallow `auto` trait alias syntax.

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 agoThis fixes doctests in stage 1
Mark Rousskov [Thu, 7 Feb 2019 15:20:17 +0000 (16:20 +0100)]
This fixes doctests in stage 1

The RUSTDOC_LIBDIR should be rustc_libdir, not sysroot_libdir; rustdoc
is like the compiler and should link against rustc's libdir.

Some people currently (i.e., in general, may not be on master) have doc
tests working, but no attempt to determine why has been attempted.

5 years agoNever build rustdoc in stage 0
Mark Rousskov [Wed, 6 Feb 2019 10:37:43 +0000 (11:37 +0100)]
Never build rustdoc in stage 0

When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).

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