]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #58156 - h-michael:update-rust-installer, r=Centril
kennytm [Thu, 7 Feb 2019 05:57:43 +0000 (13:57 +0800)]
Rollup merge of #58156 - h-michael:update-rust-installer, r=Centril

update submodule: rust-installer from 27dec6c to ccdc47b

Update rust-installer cc: #58099
https://github.com/rust-lang/rust-installer/compare/27dec6c...ccdc47b

r? @Centril

5 years agoRollup merge of #58136 - abonander:doc-win-stdio-unicode, r=dtolnay
kennytm [Thu, 7 Feb 2019 05:57:41 +0000 (13:57 +0800)]
Rollup merge of #58136 - abonander:doc-win-stdio-unicode, r=dtolnay

Improve error message and docs for non-UTF-8 bytes in stdio on Windows

This should make debugging problems like abonander/multipart#106 significantly more straightforward in the future.

cc #23344, @retep998 @alexcrichton

Not sure who do r? so I'll let rust-highfive pick one.

5 years agoRollup merge of #58133 - taiki-e:libsyntax_ext-2018, r=Centril
kennytm [Thu, 7 Feb 2019 05:57:40 +0000 (13:57 +0800)]
Rollup merge of #58133 - taiki-e:libsyntax_ext-2018, r=Centril

libsyntax_ext => 2018

Transitions `libsyntax_ext` to Rust 2018; cc #58099

r? @Centril

5 years agoRollup merge of #58124 - taiki-e:libsyntax_pos-2018, r=Centril
kennytm [Thu, 7 Feb 2019 05:57:39 +0000 (13:57 +0800)]
Rollup merge of #58124 - taiki-e:libsyntax_pos-2018, r=Centril

libsyntax_pos => 2018

Transitions `libsyntax_pos` to Rust 2018; cc #58099

r? @Centril

5 years agoRollup merge of #58123 - lnicola:binary-heap-no-bounds-checks, r=sfackler
kennytm [Thu, 7 Feb 2019 05:57:38 +0000 (13:57 +0800)]
Rollup merge of #58123 - lnicola:binary-heap-no-bounds-checks, r=sfackler

Avoid some bounds checks in binary_heap::{PeekMut,Hole}

Fixes #58121.

5 years agoRollup merge of #58119 - taiki-e:libproc_macro-2018, r=petrochenkov
kennytm [Thu, 7 Feb 2019 05:57:37 +0000 (13:57 +0800)]
Rollup merge of #58119 - taiki-e:libproc_macro-2018, r=petrochenkov

libproc_macro => 2018

Transitions `libproc_macro` to Rust 2018; cc #58099

r? @Centril

5 years agoRollup merge of #58118 - h-michael:libtest-theme-2018, r=Centril
kennytm [Thu, 7 Feb 2019 05:57:35 +0000 (13:57 +0800)]
Rollup merge of #58118 - h-michael:libtest-theme-2018, r=Centril

Transition libtest to 2018 edition

Transitions libtest to Rust 2018; cc #58099
r? @Centril

5 years agoAuto merge of #58125 - taiki-e:libsyntax-2018, r=Centril
bors [Thu, 7 Feb 2019 01:41:14 +0000 (01:41 +0000)]
Auto merge of #58125 - taiki-e:libsyntax-2018, r=Centril

libsyntax => 2018

Transitions `libsyntax` to Rust 2018; cc #58099

r? @Centril

5 years agoAuto merge of #58224 - pietroalbini:revert-appveyor-debug, r=alexcrichton
bors [Wed, 6 Feb 2019 22:48:39 +0000 (22:48 +0000)]
Auto merge of #58224 - pietroalbini:revert-appveyor-debug, r=alexcrichton

Revert appveyor debug code

r? @alexcrichton

5 years agolibsyntax => 2018
Taiki Endo [Wed, 6 Feb 2019 17:33:01 +0000 (02:33 +0900)]
libsyntax => 2018

5 years agoRevert "Auto merge of #57975 - alexcrichton:debug-exit-appveyor, r=pietroalbini"
Pietro Albini [Wed, 6 Feb 2019 14:17:15 +0000 (15:17 +0100)]
Revert "Auto merge of #57975 - alexcrichton:debug-exit-appveyor, r=pietroalbini"

This reverts commit d3d0bf0e9f4d748b95ed143cc636d159bfcb4a6f, reversing
changes made to 40e6a0bd766ca7b1c582b964131400b8c3e89d76.

5 years agoRevert "Rollup merge of #58162 - pietroalbini:track-259, r=alexcrichton"
Pietro Albini [Wed, 6 Feb 2019 14:16:50 +0000 (15:16 +0100)]
Revert "Rollup merge of #58162 - pietroalbini:track-259, r=alexcrichton"

This reverts commit 4c243e2c3d8f02cdcd22fe68acf6a0b3edca2078, reversing
changes made to 64f0032a3739b18ae45387744340d9c7ce48b145.

5 years agoAuto merge of #56123 - oli-obk:import_miri_from_future, r=eddyb
bors [Wed, 6 Feb 2019 08:42:46 +0000 (08:42 +0000)]
Auto merge of #56123 - oli-obk:import_miri_from_future, r=eddyb

Add a forever unstable opt-out of const qualification checks

r? @eddyb

cc @RalfJung @Centril

basically a forever unstable way to screw with const things in horribly unsafe, unsound and incoherent ways.

Note that this does *not* affect miri except by maybe violating assumptions that miri makes. But there's no change in how miri evaluates things.

5 years agoAuto merge of #58061 - nnethercote:overhaul-syntax-Folder, r=petrochenkov
bors [Wed, 6 Feb 2019 06:01:37 +0000 (06:01 +0000)]
Auto merge of #58061 - nnethercote:overhaul-syntax-Folder, r=petrochenkov

Overhaul `syntax::fold::Folder`.

This PR changes `syntax::fold::Folder` from a functional style
(where most methods take a `T` and produce a new `T`) to a more
imperative style (where most methods take and modify a `&mut T`), and
renames it `syntax::mut_visit::MutVisitor`.

This makes the code faster and more concise.

5 years agoAuto merge of #58058 - QuietMisdreavus:use-attr, r=GuillaumeGomez
bors [Wed, 6 Feb 2019 03:07:04 +0000 (03:07 +0000)]
Auto merge of #58058 - QuietMisdreavus:use-attr, r=GuillaumeGomez

rustdoc: don't try to get a DefId for a Def that doesn't have one

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

The compiler allows you to write a `use` statement for a built-in non-macro attribute, since `use proc_macro` can apply to both the `proc_macro` crate and the `#[proc_macro]` attribute. However, if you write a use statement for something that *doesn't* have this crossover, rustdoc will try to use it the same way as anything else... which resulted in an ICE because it tried to pull a DefId for something that didn't have one. This PR makes rustdoc skip those lookups when it encounters them, allowing it to properly process and render these imports.

5 years agoRename `fold.rs` as `mut_visit.rs`.
Nicholas Nethercote [Tue, 5 Feb 2019 22:10:05 +0000 (09:10 +1100)]
Rename `fold.rs` as `mut_visit.rs`.

5 years agoAuto merge of #58131 - ehuss:update-cargo, r=alexcrichton
bors [Tue, 5 Feb 2019 22:08:47 +0000 (22:08 +0000)]
Auto merge of #58131 - ehuss:update-cargo, r=alexcrichton

Update cargo

7 commits in 245818076052dd7178f5bb7585f5aec5b6c1e03e..4e74e2fc0908524d17735c768067117d3e84ee9c
2019-01-27 15:17:26 +0000 to 2019-02-02 17:48:44 +0000
- Fix overlapping progress with stdout. (rust-lang/cargo#6618)
- Improve progress bar flickering. (rust-lang/cargo#6615)
- Add detail to multiple rename deps (rust-lang/cargo#6603)
- Fix race condition in local registry crate unpacking (rust-lang/cargo#6591)
- Revert "Make incremental compilation the default for all profiles." (rust-lang/cargo#6610)
- Fixup the docs on crate-type (rust-lang/cargo#6606)
- Document that owner --add now just invites (rust-lang/cargo#6604)

5 years agoOverhaul `syntax::fold::Folder`.
Nicholas Nethercote [Tue, 5 Feb 2019 04:20:55 +0000 (15:20 +1100)]
Overhaul `syntax::fold::Folder`.

This commit changes `syntax::fold::Folder` from a functional style
(where most methods take a `T` and produce a new `T`) to a more
imperative style (where most methods take and modify a `&mut T`), and
renames it `syntax::mut_visit::MutVisitor`.

The first benefit is speed. The functional style does not require any
reallocations, due to the use of `P::map` and
`MoveMap::move_{,flat_}map`. However, every field in the AST must be
overwritten; even those fields that are unchanged are overwritten with
the same value. This causes a lot of unnecessary memory writes. The
imperative style reduces instruction counts by 1--3% across a wide range
of workloads, particularly incremental workloads.

The second benefit is conciseness; the imperative style is usually more
concise. E.g. compare the old functional style:
```
fn fold_abc(&mut self, abc: ABC) {
    ABC {
        a: fold_a(abc.a),
        b: fold_b(abc.b),
        c: abc.c,
    }
}
```
with the imperative style:
```
fn visit_abc(&mut self, ABC { a, b, c: _ }: &mut ABC) {
    visit_a(a);
    visit_b(b);
}
```
(The reductions get larger in more complex examples.)

Overall, the patch removes over 200 lines of code -- even though the new
code has more comments -- and a lot of the remaining lines have fewer
characters.

Some notes:

- The old style used methods called `fold_*`. The new style mostly uses
  methods called `visit_*`, but there are a few methods that map a `T`
  to something other than a `T`, which are called `flat_map_*` (`T` maps
  to multiple `T`s) or `filter_map_*` (`T` maps to 0 or 1 `T`s).

- `move_map.rs`/`MoveMap`/`move_map`/`move_flat_map` are renamed
  `map_in_place.rs`/`MapInPlace`/`map_in_place`/`flat_map_in_place` to
  reflect their slightly changed signatures.

- Although this commit renames the `fold` module as `mut_visit`, it
  keeps it in the `fold.rs` file, so as not to confuse git. The next
  commit will rename the file.

5 years agoUpdate cargo
Eric Huss [Sun, 3 Feb 2019 22:42:29 +0000 (14:42 -0800)]
Update cargo

5 years agoAuto merge of #57851 - Aaron1011:fix/clean-lifetime, r=GuillaumeGomez
bors [Tue, 5 Feb 2019 19:12:11 +0000 (19:12 +0000)]
Auto merge of #57851 - Aaron1011:fix/clean-lifetime, r=GuillaumeGomez

Don't try to clean predicates involving ReErased

There's nothing to render when we have a bound involving ReErased (either
a type or region outliving it), so we don't attempt to generate a clean
WherePredicate

Fixes #57806

I haven't been able to come up with a minimized reproduction for the issue, but I've confirmed that this allows the docs to build for `parqet-rs`

5 years agoAuto merge of #58189 - kennytm:rollup, r=kennytm
bors [Tue, 5 Feb 2019 16:22:26 +0000 (16:22 +0000)]
Auto merge of #58189 - kennytm:rollup, r=kennytm

Rollup of 23 pull requests

Successful merges:

 - #58001 (proc_macro: make `TokenStream::from_streams` pre-allocate its vector.)
 - #58096 (Transition linkchecker to 2018 edition)
 - #58097 (Transition remote test to Rust 2018)
 - #58106 (libfmt_macros => 2018)
 - #58107 (libgraphviz => 2018)
 - #58108 (Add NVPTX target to a build manifest)
 - #58109 (librustc_privacy => 2018)
 - #58112 (libpanic_abort => 2018)
 - #58113 (Transition build-manifest to 2018 edition)
 - #58114 (Transition tidy and unstable-book-gen to 2018 edition)
 - #58116 (Include the span of attributes of the lhs to the span of the assignment expression)
 - #58117 (Transition rustdoc-theme to 2018 edition)
 - #58128 (libunwind => 2018)
 - #58138 (Fix #58101)
 - #58139 (hir: add more HirId methods)
 - #58141 (Remove weasel word in docs for iter's take_while())
 - #58142 (Remove stray FIXME)
 - #58145 (Add #[must_use] to core::task::Poll)
 - #58162 (Add more debugging code to track down appveyor 259 exit code)
 - #58169 (Update contributor name in .mailmap)
 - #58172 (update split docs)
 - #58182 (SGX target: handle empty user buffers correctly)
 - #58186 (Add Rustlings to the doc index)

Failed merges:

r? @ghost

5 years agoRollup merge of #58186 - komaeda:docs/integrate-rustlings, r=steveklabnik
kennytm [Tue, 5 Feb 2019 15:29:21 +0000 (00:29 +0900)]
Rollup merge of #58186 - komaeda:docs/integrate-rustlings, r=steveklabnik

Add Rustlings to the doc index

r? @steveklabnik

5 years agoRollup merge of #58182 - jethrogb:jb/sgx-bytebuffer-len-0, r=joshtriplett
kennytm [Tue, 5 Feb 2019 15:29:20 +0000 (00:29 +0900)]
Rollup merge of #58182 - jethrogb:jb/sgx-bytebuffer-len-0, r=joshtriplett

SGX target: handle empty user buffers correctly

Also, expose correct items in `os::fortanix_sgx::usercalls::alloc`

* [read_alloc documentation](https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.read_alloc)
* [Clarified ByteBuffer documentation](https://github.com/fortanix/rust-sgx/pull/94/files#diff-ca843ad9e25cacd63a80579c0f7efa56)

r? @joshtriplett

5 years agoRollup merge of #58172 - garyemerson:patch-1, r=steveklabnik
kennytm [Tue, 5 Feb 2019 15:29:19 +0000 (00:29 +0900)]
Rollup merge of #58172 - garyemerson:patch-1, r=steveklabnik

update split docs

Some confusion about split popped up at https://news.ycombinator.com/item?id=19080931 since the docs sorta sound like `&str`, `char` and closures are the only types that can be patterns.

cc @steveklabnik

5 years agoRollup merge of #58169 - boringcactus:patch-1, r=alexcrichton
kennytm [Tue, 5 Feb 2019 15:29:17 +0000 (00:29 +0900)]
Rollup merge of #58169 - boringcactus:patch-1, r=alexcrichton

Update contributor name in .mailmap

following up on email correspondence with @steveklabnik

5 years agoRollup merge of #58162 - pietroalbini:track-259, r=alexcrichton
kennytm [Tue, 5 Feb 2019 15:29:16 +0000 (00:29 +0900)]
Rollup merge of #58162 - pietroalbini:track-259, r=alexcrichton

Add more debugging code to track down appveyor 259 exit code

cc https://github.com/rust-lang/rust/issues/58160
r? @alexcrichton

5 years agoRollup merge of #58145 - taiki-e:poll, r=cramertj
kennytm [Tue, 5 Feb 2019 15:29:15 +0000 (00:29 +0900)]
Rollup merge of #58145 - taiki-e:poll, r=cramertj

Add #[must_use] to core::task::Poll

cc rust-lang/rfcs#2592

r? @withoutboats

5 years agoRollup merge of #58142 - jethrogb:jb/sgx-rwlock, r=joshtriplett
kennytm [Tue, 5 Feb 2019 15:29:13 +0000 (00:29 +0900)]
Rollup merge of #58142 - jethrogb:jb/sgx-rwlock, r=joshtriplett

Remove stray FIXME

These were copied from the WebAssembly implementation, and later commented. There is nothing to be fixed, RWLock is Send/Sync because all member fields are Send/Sync.

r? @joshtriplett

5 years agoRollup merge of #58141 - lukaslueg:patch-1, r=steveklabnik
kennytm [Tue, 5 Feb 2019 15:29:11 +0000 (00:29 +0900)]
Rollup merge of #58141 - lukaslueg:patch-1, r=steveklabnik

Remove weasel word in docs for iter's take_while()

The phrase "... or some similar thing." is very vague and contributes nothing to understanding the example. Simply removed.

5 years agoRollup merge of #58139 - ljedrz:HirIdification_phase_2.5, r=Zoxc
kennytm [Tue, 5 Feb 2019 15:29:10 +0000 (00:29 +0900)]
Rollup merge of #58139 - ljedrz:HirIdification_phase_2.5, r=Zoxc

hir: add more HirId methods

Adds a few more methods operating on `HirId` instead of `NodeId` with the intention of replacing the old ones in the near future.

r? @Zoxc

5 years agoRollup merge of #58138 - ishitatsuyuki:stability-delay, r=estebank
kennytm [Tue, 5 Feb 2019 15:29:08 +0000 (00:29 +0900)]
Rollup merge of #58138 - ishitatsuyuki:stability-delay, r=estebank

Fix #58101

5 years agoRollup merge of #58128 - taiki-e:libunwind-2018, r=Centril
kennytm [Tue, 5 Feb 2019 15:29:05 +0000 (00:29 +0900)]
Rollup merge of #58128 - taiki-e:libunwind-2018, r=Centril

libunwind => 2018

Transitions `libunwind` to Rust 2018; cc #58099

r? @Centril

5 years agoRollup merge of #58117 - h-michael:rustdoc-theme-2018, r=Centril
kennytm [Tue, 5 Feb 2019 15:29:03 +0000 (00:29 +0900)]
Rollup merge of #58117 - h-michael:rustdoc-theme-2018, r=Centril

Transition rustdoc-theme to 2018 edition

Transitions rustdoc-theme to Rust 2018; cc #58099

5 years agoRollup merge of #58116 - topecongiro:wrong-span-assignment, r=petrochenkov
kennytm [Tue, 5 Feb 2019 15:29:02 +0000 (00:29 +0900)]
Rollup merge of #58116 - topecongiro:wrong-span-assignment, r=petrochenkov

Include the span of attributes of the lhs to the span of the assignment expression

This PR adds the span of attributes of the lhs to the span of the assignment expression. Currently with the following code, `#[attr]` is not included to the span of the assignment (`foo = true`).

```rust
#[attr]
foo = true;
```
The rational behind this change is that as libsyntax user I expect the span of the parent node includes every span of child nodes.

cc https://github.com/rust-lang/rustfmt/issues/3313, https://github.com/rust-lang/rust/issues/15701.

5 years agoRollup merge of #58114 - h-michael:tidy-unstable-book-gen-2018, r=Centril
kennytm [Tue, 5 Feb 2019 15:29:00 +0000 (00:29 +0900)]
Rollup merge of #58114 - h-michael:tidy-unstable-book-gen-2018, r=Centril

Transition tidy and unstable-book-gen to 2018 edition

Transitions tidy and unstable-book-gen to Rust 2018; cc #58099

5 years agoRollup merge of #58113 - h-michael:build-manifest-2018, r=alexcrichton
kennytm [Tue, 5 Feb 2019 15:28:58 +0000 (00:28 +0900)]
Rollup merge of #58113 - h-michael:build-manifest-2018, r=alexcrichton

Transition build-manifest to 2018 edition

#58099

5 years agoRollup merge of #58112 - Centril:libpanic_abort-2018, r=oli-obk
kennytm [Tue, 5 Feb 2019 15:28:57 +0000 (00:28 +0900)]
Rollup merge of #58112 - Centril:libpanic_abort-2018, r=oli-obk

libpanic_abort => 2018

Transitions `libpanic_abort` to Rust 2018; cc #58099

r? @oli-obk

5 years agoRollup merge of #58109 - Centril:librustc_privacy-2018, r=oli-obk
kennytm [Tue, 5 Feb 2019 15:28:56 +0000 (00:28 +0900)]
Rollup merge of #58109 - Centril:librustc_privacy-2018, r=oli-obk

librustc_privacy => 2018

Transitions `librustc_privacy` to Rust 2018; cc #58099

r? @oli-obk

5 years agoRollup merge of #58108 - denzp:nvptx-manifest, r=alexcrichton
kennytm [Tue, 5 Feb 2019 15:28:54 +0000 (00:28 +0900)]
Rollup merge of #58108 - denzp:nvptx-manifest, r=alexcrichton

Add NVPTX target to a build manifest

Include `nvptx64-nvidia-cuda` target to a build manifest. I forgot this step at my first take on adding the target (#57937).

Hopefully, this is the only reason why `rustup target add nvptx64-nvidia-cuda` doesn't work :slightly_frowning_face:

r? @alexcrichton

5 years agoRollup merge of #58107 - Centril:libgraphviz-2018, r=oli-obk
kennytm [Tue, 5 Feb 2019 15:28:53 +0000 (00:28 +0900)]
Rollup merge of #58107 - Centril:libgraphviz-2018, r=oli-obk

libgraphviz => 2018

Transitions `libgraphviz` to Rust 2018; cc #58099

r? @oli-obk

5 years agoRollup merge of #58106 - Centril:libfmt_macros-2018, r=oli-obk
kennytm [Tue, 5 Feb 2019 15:28:52 +0000 (00:28 +0900)]
Rollup merge of #58106 - Centril:libfmt_macros-2018, r=oli-obk

libfmt_macros => 2018

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

r? @oli-obk

5 years agoRollup merge of #58097 - h-michael:remote-test-2018, r=alexcrichton
kennytm [Tue, 5 Feb 2019 15:28:50 +0000 (00:28 +0900)]
Rollup merge of #58097 - h-michael:remote-test-2018, r=alexcrichton

Transition remote test to Rust 2018

Only updating Cargo.toml

5 years agoRollup merge of #58096 - h-michael:linkchecker-2018, r=Centril
kennytm [Tue, 5 Feb 2019 15:28:49 +0000 (00:28 +0900)]
Rollup merge of #58096 - h-michael:linkchecker-2018, r=Centril

Transition linkchecker to 2018 edition

Transition `src/tools/linkchecker` to Rust 2018.

#58099

5 years agoRollup merge of #58001 - pnkfelix:issue-57735-proc-macro-with-large-tokenstream-slow...
kennytm [Tue, 5 Feb 2019 15:28:46 +0000 (00:28 +0900)]
Rollup merge of #58001 - pnkfelix:issue-57735-proc-macro-with-large-tokenstream-slow, r=eddyb

proc_macro: make `TokenStream::from_streams` pre-allocate its vector.

This requires a pre-pass over the input streams. But that is cheap compared to the quadratic blowup associated with reallocating the accumulating vector on-the-fly.

Fix #57735

5 years agoAdd Rustlings to the doc index
liv [Tue, 5 Feb 2019 14:32:59 +0000 (15:32 +0100)]
Add Rustlings to the doc index

5 years agoExpose correct items in `os::fortanix_sgx::usercalls::alloc`
Jethro Beekman [Tue, 5 Feb 2019 10:49:20 +0000 (16:19 +0530)]
Expose correct items in `os::fortanix_sgx::usercalls::alloc`

5 years agoSGX target: handle empty user buffers correctly
Jethro Beekman [Tue, 5 Feb 2019 10:49:05 +0000 (16:19 +0530)]
SGX target: handle empty user buffers correctly

5 years agoadd even more debugging code to track down appveyor 259 exit code
Pietro Albini [Tue, 5 Feb 2019 07:47:52 +0000 (08:47 +0100)]
add even more debugging code to track down appveyor 259 exit code

5 years agoAuto merge of #57973 - davidtwco:issue-52891, r=estebank
bors [Tue, 5 Feb 2019 05:14:15 +0000 (05:14 +0000)]
Auto merge of #57973 - davidtwco:issue-52891, r=estebank

Add suggestion for duplicated import.

Fixes #52891.

This PR adds a suggestion when a import is duplicated (ie. the same name
is used twice trying to import the same thing) to remove the second
import.

5 years agoVarious improvements in `Folder` impls.
Nicholas Nethercote [Tue, 5 Feb 2019 04:18:29 +0000 (15:18 +1100)]
Various improvements in `Folder` impls.

5 years agoStreamline `Folder` some more.
Nicholas Nethercote [Tue, 5 Feb 2019 04:13:12 +0000 (15:13 +1100)]
Streamline `Folder` some more.

By eliminating some unnecessary methods, and moving/renaming some
functions that look like they might be methods but aren't.

5 years agoNeaten up `fold_crate`.
Nicholas Nethercote [Tue, 5 Feb 2019 04:12:15 +0000 (15:12 +1100)]
Neaten up `fold_crate`.

5 years agoChange `fold_qpath` to `fold_qself`.
Nicholas Nethercote [Tue, 5 Feb 2019 04:11:52 +0000 (15:11 +1100)]
Change `fold_qpath` to `fold_qself`.

It's simpler that way.

5 years agoSimplify `fold_attribute`.
Nicholas Nethercote [Tue, 5 Feb 2019 04:11:27 +0000 (15:11 +1100)]
Simplify `fold_attribute`.

It doesn't need to return an `Option`.

5 years agoFold some overlooked spans.
Nicholas Nethercote [Tue, 5 Feb 2019 04:11:10 +0000 (15:11 +1100)]
Fold some overlooked spans.

5 years agoStreamline `Folder`.
Nicholas Nethercote [Tue, 5 Feb 2019 04:10:04 +0000 (15:10 +1100)]
Streamline `Folder`.

Specifically:

- Remove dead methods: fold_usize, fold_meta_items, fold_opt_bounds.

- Remove useless methods: fold_global_asm, fold_range_end.

- Inline and remove unnecessary methods: fold_item_simple,
  fold_foreign_item_simple.

5 years agoRemove some unnecessary `ast::` and `fold::` qualifiers.
Nicholas Nethercote [Tue, 5 Feb 2019 04:09:23 +0000 (15:09 +1100)]
Remove some unnecessary `ast::` and `fold::` qualifiers.

5 years agoRemove unncessary return statement
Hirokazu Hata [Tue, 5 Feb 2019 01:59:18 +0000 (10:59 +0900)]
Remove unncessary return statement

5 years agoUse derive feature of serde
Hirokazu Hata [Tue, 5 Feb 2019 01:51:47 +0000 (10:51 +0900)]
Use derive feature of serde

5 years agoAuto merge of #56291 - jamesmunns:upstream-embedded-book, r=steveklabnik
bors [Tue, 5 Feb 2019 01:40:13 +0000 (01:40 +0000)]
Auto merge of #56291 - jamesmunns:upstream-embedded-book, r=steveklabnik

Initial addition of the Embedded Rust Book

This PR adds the Embedded Rust Book to the bookshelf as a submodule, and adds text for the bookshelf page. I have added a new section after "Master Rust" called "Specialize Rust", with the plan that future domain WG books can also reside here. This now extends the titles down to H3, where formerly only H1 and H2 were used.

The added submodule tracks the master branch of the Embedded WG repo.

If there are additional steps necessary to make this work in CI (perhaps adding this to `src/ci/docker/x86_64-gnu-tools/checktools.sh:32` or so?), please let me know.

CC @steveklabnik @japaric

Also CC issue https://github.com/rust-embedded/wg/issues/257

5 years agoRemove macro_use
Hirokazu Hata [Mon, 4 Feb 2019 16:11:08 +0000 (01:11 +0900)]
Remove macro_use

5 years agoTransition build-manifest to 2018 edition
Hirokazu Hata [Sun, 3 Feb 2019 15:05:53 +0000 (00:05 +0900)]
Transition build-manifest to 2018 edition

5 years agoupdate split docs
garyemerson [Mon, 4 Feb 2019 23:26:33 +0000 (15:26 -0800)]
update split docs

Some confusion about split popped up at https://news.ycombinator.com/item?id=19080931 since the docs sorta sound like `&str`, `char` and closures are the only types that can be patterns.

cc @steveklabnik

5 years agoUpdate contributor name in .mailmap
Melody Horn [Mon, 4 Feb 2019 21:43:30 +0000 (14:43 -0700)]
Update contributor name in .mailmap

5 years agoadd more debugging code to track down appveyor 259 exit code
Pietro Albini [Mon, 4 Feb 2019 18:27:43 +0000 (19:27 +0100)]
add more debugging code to track down appveyor 259 exit code

5 years agoupdate rust-installer from 27dec6c to ccdc47b
Hirokazu Hata [Mon, 4 Feb 2019 16:21:07 +0000 (01:21 +0900)]
update rust-installer from 27dec6c to ccdc47b

5 years agohir: more HirId methods
ljedrz [Mon, 4 Feb 2019 10:09:32 +0000 (11:09 +0100)]
hir: more HirId methods

5 years agoAdd #[must_use] to core::task::Poll
Taiki Endo [Mon, 4 Feb 2019 13:41:39 +0000 (22:41 +0900)]
Add #[must_use] to core::task::Poll

5 years agolibsyntax_ext => 2018
Taiki Endo [Mon, 4 Feb 2019 12:49:54 +0000 (21:49 +0900)]
libsyntax_ext => 2018

5 years agoUpdate embedded book dependency
James Munns [Mon, 4 Feb 2019 10:34:50 +0000 (11:34 +0100)]
Update embedded book dependency

5 years agoRemove stray FIXME
Jethro Beekman [Mon, 4 Feb 2019 10:32:54 +0000 (16:02 +0530)]
Remove stray FIXME

5 years agoAdd test
ishitatsuyuki [Mon, 4 Feb 2019 10:26:46 +0000 (19:26 +0900)]
Add test

5 years agoRemove weasel word in docs for iter's take_while()
lukaslueg [Mon, 4 Feb 2019 10:21:39 +0000 (11:21 +0100)]
Remove weasel word in docs for iter's take_while()

The phrase "... or some similar thing." is very vague and contributes nothing to understanding the example. Simply removed.

5 years agoAdd embedded book
James Munns [Sat, 19 Jan 2019 03:52:39 +0000 (04:52 +0100)]
Add embedded book

5 years agoFix #58101
Tatsuyuki Ishi [Mon, 4 Feb 2019 09:04:33 +0000 (18:04 +0900)]
Fix #58101

5 years agoImprove error message and docs for non-UTF-8 bytes in stdio on Windows
Austin Bonander [Mon, 4 Feb 2019 06:38:43 +0000 (22:38 -0800)]
Improve error message and docs for non-UTF-8 bytes in stdio on Windows

cc #23344

5 years agoAuto merge of #58095 - h-michael:cargotest-2018, r=Centril
bors [Mon, 4 Feb 2019 05:16:11 +0000 (05:16 +0000)]
Auto merge of #58095 - h-michael:cargotest-2018, r=Centril

Transition cargotest to Rust 2018

Only updating Cargo.toml

#58099

5 years agoAuto merge of #58090 - ljedrz:HirIdification_phase_2, r=Zoxc
bors [Mon, 4 Feb 2019 01:06:25 +0000 (01:06 +0000)]
Auto merge of #58090 - ljedrz:HirIdification_phase_2, r=Zoxc

HirIdification: add key HirId methods

This is another PR in a series dedicated to `HirId`-ification, i.e. deprecating `ast::NodeId`s after the AST > HIR lowering process. The bigger proof of concept can be seen in #57578.

**Phase 2**: add key `HirId` methods mirroring the `NodeId` ones.

These should be counterparts of the most widely used `Hir` methods using `NodeId`s. Note that this expands `hir::map::Definitions` with an additional `hir_to_def_index` map (with the intention of later removing `node_to_def_index`).

As a bonus there is also a small cleanup commit removing unnecessary calls to `node_to_hir_id` where `HirId` is already available.

r? @Zoxc
Cc @varkor

5 years agoExcute rustfmt for fixing tidy check
Hirokazu Hata [Sun, 3 Feb 2019 23:22:30 +0000 (08:22 +0900)]
Excute rustfmt for fixing tidy check

5 years agoTransition libtest to 2018 edition
Hirokazu Hata [Sun, 3 Feb 2019 15:56:16 +0000 (00:56 +0900)]
Transition libtest to 2018 edition

5 years agohir: remove Definitions::hir_to_def_index
ljedrz [Sun, 3 Feb 2019 21:27:52 +0000 (22:27 +0100)]
hir: remove Definitions::hir_to_def_index

5 years agoAuto merge of #58024 - h-michael:update-rls, r=Xanewok
bors [Sun, 3 Feb 2019 21:19:38 +0000 (21:19 +0000)]
Auto merge of #58024 - h-michael:update-rls, r=Xanewok

submodule: update rls from c9d25b to f331ff7

Update rls https://github.com/rust-lang/rls/compare/c9d25b667a...e2145d

https://github.com/rust-lang/rls/pull/1276 - h-michael:clippy, r=Xanewok
https://github.com/rust-lang/rls/pull/1269 - rust-lang:dependabot/cargo/rand-0.6.5, r=Xanewok
Remove extra backticks in contributing.md
https://github.com/rust-lang/rls/pull/1267 from h-michael/contributingmd
https://github.com/rust-lang/rls/pull/1268 from matthiaskrgr/rustup
https://github.com/rust-lang/rls/pull/1262 from rust-lang/dependabot/cargo/tokio-0.1.15
https://github.com/rust-lang/rls/pull/1264 - h-michael:pub-crate, r=alexheretic
https://github.com/rust-lang/rls/pull/1261 - rust-lang:dependabot/cargo/tokio-timer-0.2.9, r=Xanewok
https://github.com/rust-lang/rls/pull/1263 - Xanewok:update-clippy, r=Xanewok
https://github.com/rust-lang/rls/pull/1257 from Xanewok/architecture
https://github.com/rust-lang/rls/pull/1258 - rust-lang:dependabot/cargo/lsp-types-0.55.1, r=Xanewok
https://github.com/rust-lang/rls/pull/1255 - Xanewok:you-only-complete-once-fool, r=Xanewok
https://github.com/rust-lang/rls/pull/1252 - rust-lang:dependabot/cargo/cargo_metadata-0.7.0, r=alexheretic
https://github.com/rust-lang/rls/pull/1253 - rust-lang:dependabot/cargo/lsp-types-0.55.0, r=Xanewok
https://github.com/rust-lang/rls/pull/1254 - rust-lang:dependabot/cargo/serde_json-1.0.37, r=Xanewok
dependabot: Explicitly list default allowed_updates
dependabot: Add automerge strategy for clippy_lints
https://github.com/rust-lang/rls/pull/1251 - Xanewok:translate-deglob-test, r=Xanewok
https://github.com/rust-lang/rls/pull/1250 from alexheretic/master
https://github.com/rust-lang/rls/pull/1244 - Xanewok:translate-tests, r=alexheretic
https://github.com/rust-lang/rls/pull/1247 - alexheretic:register-more-clippy, r=Xanewok
https://github.com/rust-lang/rls/pull/1230 - emilio:testing-testing, r=Xanewok
https://github.com/rust-lang/rls/pull/1246 from alexheretic/did-save-manifest
Merge branch 'beta-version-bump' of https://github.com/rust-lang-nursery/rls

5 years agolibunwind => 2018
Taiki Endo [Sun, 3 Feb 2019 21:00:16 +0000 (06:00 +0900)]
libunwind => 2018

5 years agohir: add HirId methods
ljedrz [Sun, 3 Feb 2019 08:14:31 +0000 (09:14 +0100)]
hir: add HirId methods

5 years agolibproc_macro => 2018
Taiki Endo [Sun, 3 Feb 2019 18:55:40 +0000 (03:55 +0900)]
libproc_macro => 2018

5 years agolibsyntax_pos => 2018
Taiki Endo [Sun, 3 Feb 2019 18:42:27 +0000 (03:42 +0900)]
libsyntax_pos => 2018

5 years agoAuto merge of #58081 - Centril:liballoc-2018, r=oli-obk
bors [Sun, 3 Feb 2019 18:40:23 +0000 (18:40 +0000)]
Auto merge of #58081 - Centril:liballoc-2018, r=oli-obk

Transition liballoc to Rust 2018

This transitions liballoc to Rust 2018 edition and applies relevant idiom lints.
I also did a small bit of drive-by cleanup along the way.

r? @oli-obk

I started with liballoc since it seemed easiest. In particular, adding `edition = "2018"` to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.

5 years agoAvoid some bounds checks in binary_heap::{PeekMut,Hole}
Laurențiu Nicola [Sun, 3 Feb 2019 16:24:05 +0000 (18:24 +0200)]
Avoid some bounds checks in binary_heap::{PeekMut,Hole}

5 years agoAuto merge of #58093 - h-michael:clippy, r=Xanewok
bors [Sun, 3 Feb 2019 16:06:55 +0000 (16:06 +0000)]
Auto merge of #58093 - h-michael:clippy, r=Xanewok

submodule: update clippy from 6ce78d1 to 3bda548

https://github.com/rust-lang/rust-clippy/compare/6ce78d1...3bda548

Rustup: unused trim result
Auto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr  …
Travis: Don't run integration tests on every PR commit  …
Auto merge of #3726 - phansch:some_renaming, r=oli-obk  …
Fix ICE in vec_box lint and add run-rustfix  …
Make vec_box MachineApplicable
Remove conditionals from base builds  …
Adding lint for too many lines.
Updating number of lines for the failing test to be > 100.  …
Running util/dev to update README/CHANGELOG
Reworking function logic, and adding doc example.  …
Moving tests to ui-toml to make use of clippy.toml
rustfmt
Adding back tests, but also reducing threshold by 1
Updating to just warn for one test.
Fix test broken by removing comment.
Skipping check if in external macro.
Adding lint for too many lines.
Updating number of lines for the failing test to be > 100.  …
Moving tests to ui-toml to make use of clippy.toml
rustfmt
Adding back tests, but also reducing threshold by 1
Updating to just warn for one test.
Fix test broken by removing comment.
Changing single character string to a character match.
Updated readme.
Updating code to ignore rustfmt issue.
phansch and avborhanian
Update clippy_lints/src/types.rs  …
Update clippy_lints/src/types.rs  …
Auto merge of #3732 - phansch:fix_ice_3720, r=oli-obk  …
Auto merge of #3731 - phansch:travis, r=phansch  …
Auto merge of #2857 - avborhanian:master, r=phansch  …
Fix breakage due to rust-lang/rust#58079  …
Auto merge of #3736 - mikerite:fix-build-20190203, r=phansch  …

related with: #58024

5 years agoTransition rustdoc-theme to 2018 edition
Hirokazu Hata [Sun, 3 Feb 2019 15:45:42 +0000 (00:45 +0900)]
Transition rustdoc-theme to 2018 edition

5 years agoAdd the span of attributes of the lhs to the span of the assignment expression
topecongiro [Sun, 3 Feb 2019 15:35:12 +0000 (00:35 +0900)]
Add the span of attributes of the lhs to the span of the assignment expression

5 years agoTransition tidy and unstable-book-gento 2018 edition
Hirokazu Hata [Sun, 3 Feb 2019 15:34:55 +0000 (00:34 +0900)]
Transition tidy and unstable-book-gento 2018 edition

5 years agolibrustc_privacy => 2018
Mazdak Farrokhzad [Sun, 3 Feb 2019 02:58:25 +0000 (03:58 +0100)]
librustc_privacy => 2018

5 years agolibpanic_abort => 2018
Mazdak Farrokhzad [Sat, 2 Feb 2019 17:42:38 +0000 (18:42 +0100)]
libpanic_abort => 2018

5 years agoAdd NVPTX target into `build-manifest`
Denys Zariaiev [Sun, 3 Feb 2019 14:47:15 +0000 (15:47 +0100)]
Add NVPTX target into `build-manifest`

5 years agolibgraphviz => 2018
Mazdak Farrokhzad [Sat, 2 Feb 2019 17:29:08 +0000 (18:29 +0100)]
libgraphviz => 2018

5 years agolibfmt_macros => 2018
Mazdak Farrokhzad [Sat, 2 Feb 2019 17:18:39 +0000 (18:18 +0100)]
libfmt_macros => 2018

5 years agoTransition linkchecker to 2018 edition
Hirokazu Hata [Sun, 3 Feb 2019 12:37:08 +0000 (21:37 +0900)]
Transition linkchecker to 2018 edition

5 years agoUse 2018 edition for cargotest
Hirokazu Hata [Sun, 3 Feb 2019 12:32:59 +0000 (21:32 +0900)]
Use 2018 edition for cargotest

5 years agoAuto merge of #57922 - davidtwco:issue-57410, r=petrochenkov
bors [Sun, 3 Feb 2019 13:35:15 +0000 (13:35 +0000)]
Auto merge of #57922 - davidtwco:issue-57410, r=petrochenkov

Update visibility of intermediate use items.

Fixes #57410 and fixes #53925 and fixes #47816.

Currently, the target of a use statement will be updated with
the visibility of the use statement itself (if the use statement was
visible).

This PR ensures that if the path to the target item is via another
use statement then that intermediate use statement will also have the
visibility updated like the target. This silences incorrect
`unreachable_pub` lints with inactionable suggestions.