]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAssume non-git LLVM is fresh if the stamp file exists
Josh Stone [Wed, 4 Sep 2019 23:02:31 +0000 (16:02 -0700)]
Assume non-git LLVM is fresh if the stamp file exists

Rustbuild usually writes the LLVM submodule commit in a stamp file, so
we can avoid rebuilding it unnecessarily. However, for builds from a
source tarball (non-git), we were assuming a rebuild is always needed.
This can cause a lot of extra work if any environment like `CFLAGS`
changed between steps like build and install, which are often separate
in distro builds.

Now we also write an empty stamp file if the git commit is unknown, and
its presence is trusted to indicate that no rebuild is needed. An info
message reports that this is happening, along with the stamp file path
that can be deleted to force a rebuild anyway.

4 years agoAuto merge of #64125 - JohnTitor:update-clippy, r=oli-obk
bors [Wed, 4 Sep 2019 16:34:38 +0000 (16:34 +0000)]
Auto merge of #64125 - JohnTitor:update-clippy, r=oli-obk

Update Clippy

cc https://github.com/rust-lang/rust-clippy/pull/4493

r? @oli-obk

4 years agoAuto merge of #63825 - nathanwhit:check-run-results, r=Mark-Simulacrum
bors [Wed, 4 Sep 2019 11:37:37 +0000 (11:37 +0000)]
Auto merge of #63825 - nathanwhit:check-run-results, r=Mark-Simulacrum

Allow checking of run-pass execution output in compiletest

Closes #63751
Adds a `check-run-results` flag to compiletest headers, which if enabled checks the output of the execution of a run-pass test's binary against expected output.

4 years agoAuto merge of #63166 - ksqsf:master, r=alexcrichton
bors [Wed, 4 Sep 2019 07:47:08 +0000 (07:47 +0000)]
Auto merge of #63166 - ksqsf:master, r=alexcrichton

Add Result::cloned{,_err} and Result::copied{,_err}

This is a little nice addition to `Result`.

1. I'm not sure how useful are `cloned_err` and `copied_err`, but for the sake of completeness they are here.
2. Naming is similar to `map`/`map_err`. I thought about naming `cloned` as `cloned_ok` and add another method called `cloned` that clones both Ok and Err, but `cloned_ok` should be more prevalent than `cloned_both`.

4 years agoStrip remote-test-client output from run stdout
nathanwhit [Tue, 3 Sep 2019 15:56:08 +0000 (11:56 -0400)]
Strip remote-test-client output from run stdout

The remote-test-client outputs a message of the form "uploaded
"<build_dir>/<executable_path>", waiting for result" onto stdout when
executing a test, which is then captured in the process result. This needs to be removed when
comparing the results of the run-pass test execution.

4 years agoAuto merge of #64127 - Centril:rollup-dfgb9h8, r=Centril
bors [Tue, 3 Sep 2019 15:17:31 +0000 (15:17 +0000)]
Auto merge of #64127 - Centril:rollup-dfgb9h8, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #64049 (Emit a single error on if expr with expectation and no else clause)
 - #64056 (Account for arbitrary self types in E0599)
 - #64058 (librustc_errors: Extract sugg/subst handling into method)
 - #64071 (use just one name when parameters and fields are the same)
 - #64104 (Emit error on intrinsic to fn ptr casts)

Failed merges:

r? @ghost

4 years agoUpdate Clippy
Yuki Okushi [Tue, 3 Sep 2019 11:22:03 +0000 (20:22 +0900)]
Update Clippy

4 years agoRollup merge of #64104 - Mark-Simulacrum:intrinsic-fn-ptr-ice, r=estebank
Mazdak Farrokhzad [Tue, 3 Sep 2019 12:27:05 +0000 (14:27 +0200)]
Rollup merge of #64104 - Mark-Simulacrum:intrinsic-fn-ptr-ice, r=estebank

Emit error on intrinsic to fn ptr casts

I'm not sure if a type error is the best way of doing this but it seemed like a relatively correct place to do it, and I expect this is a pretty rare case to hit anyway.

Fixes #15694

4 years agoRollup merge of #64071 - guanqun:style-fix, r=Centril
Mazdak Farrokhzad [Tue, 3 Sep 2019 12:27:03 +0000 (14:27 +0200)]
Rollup merge of #64071 - guanqun:style-fix, r=Centril

use just one name when parameters and fields are the same

4 years agoRollup merge of #64058 - phansch:refactor_out_method, r=estebank
Mazdak Farrokhzad [Tue, 3 Sep 2019 12:27:01 +0000 (14:27 +0200)]
Rollup merge of #64058 - phansch:refactor_out_method, r=estebank

librustc_errors: Extract sugg/subst handling into method

An initial refactoring before working on #61809.

This moves the whole block into a method so that it can be reused in the
annotate-snippet emitter. The method is already used in the new emitter, but
there's no UI tests with suggestions included in this PR.

A first look at some UI tests with suggestions showed that there's some
more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the
current one, so I opted to do that in a second step.

r? @estebank

[annotate-snippet-rs]: https://github.com/rust-lang/annotate-snippets-rs

4 years agoRollup merge of #64056 - estebank:arbitrary-self-types, r=Centril
Mazdak Farrokhzad [Tue, 3 Sep 2019 12:27:00 +0000 (14:27 +0200)]
Rollup merge of #64056 - estebank:arbitrary-self-types, r=Centril

Account for arbitrary self types in E0599

Fix https://github.com/rust-lang/rust/issues/62373

4 years agoRollup merge of #64049 - estebank:if-else-type-err, r=Centril
Mazdak Farrokhzad [Tue, 3 Sep 2019 12:26:58 +0000 (14:26 +0200)]
Rollup merge of #64049 - estebank:if-else-type-err, r=Centril

Emit a single error on if expr with expectation and no else clause

Fix https://github.com/rust-lang/rust/issues/60254.

r? @Centril

4 years agoAuto merge of #63869 - GuillaumeGomez:fix-build-failure, r=Mark-Simulacrum
bors [Tue, 3 Sep 2019 04:33:08 +0000 (04:33 +0000)]
Auto merge of #63869 - GuillaumeGomez:fix-build-failure, r=Mark-Simulacrum

Fix build failure in case file doesn't exist

It fixes the following issue:

```bash
$ ./x.py test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1
Updating only changed submodules
Submodules updated in 0.05 seconds
    Finished dev [unoptimized] target(s) in 0.15s
thread 'main' panicked at 'source "/Users/imperio/rust/rust/build/x86_64-apple-darwin/doc/version_info.html" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:179:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failed to run: /Users/imperio/rust/rust/build/bootstrap/debug/bootstrap test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1
Build completed unsuccessfully in 0:00:01
```

If the file doesn't exist, it makes sense anyway to just run the command in order to generate it.

r? @Mark-Simulacrum

4 years agoAuto merge of #63561 - HeroicKatora:alloc-private-bytes, r=oli-obk
bors [Mon, 2 Sep 2019 22:07:40 +0000 (22:07 +0000)]
Auto merge of #63561 - HeroicKatora:alloc-private-bytes, r=oli-obk

Make Allocation::bytes private

Fixes #62931.

Direct immutable access to the bytes is still possible but redirected through the new method `raw_bytes_with_undef_and_ptr`, similar to `get_bytes_with_undef_and_ptr` but without requiring an interpretation context and not doing *any* relocation or bounds checks. The `size` of the allocation is stored separately which makes access as `Size` and `usize` more ergonomic.

cc: @RalfJung

4 years agoEmit error on intrinsic to fn ptr casts
Mark Rousskov [Mon, 2 Sep 2019 21:28:37 +0000 (17:28 -0400)]
Emit error on intrinsic to fn ptr casts

4 years agoIgnore check-run-results tests for wasm32-bare
nathanwhit [Mon, 2 Sep 2019 16:00:55 +0000 (12:00 -0400)]
Ignore check-run-results tests for wasm32-bare

Ignores run-pass tests with the `check-run-results` flag enabled for the
wasm32-bare ("wasm32-unknown-unknown") target, as it does not support
printing to stdout/stderr.

4 years agoAuto merge of #63692 - iluuu1994:issue-49660, r=sfackler
bors [Mon, 2 Sep 2019 15:32:08 +0000 (15:32 +0000)]
Auto merge of #63692 - iluuu1994:issue-49660, r=sfackler

Test that Wrapping arithmetic ops are implemented for all int types

Closes #49660

4 years agoGenerate version file if it doesn't exist
Guillaume Gomez [Sat, 24 Aug 2019 21:45:47 +0000 (23:45 +0200)]
Generate version file if it doesn't exist

4 years agoAuto merge of #63834 - andjo403:rustdoc-linker-remove, r=Mark-Simulacrum
bors [Mon, 2 Sep 2019 02:11:07 +0000 (02:11 +0000)]
Auto merge of #63834 - andjo403:rustdoc-linker-remove, r=Mark-Simulacrum

remove the unstable rustdoc parameter --linker

use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.

closes: #63816

4 years agoreview comments
Esteban Küber [Sun, 1 Sep 2019 18:20:33 +0000 (11:20 -0700)]
review comments

4 years agoAuto merge of #63870 - estebank:async-fn-call, r=oli-obk
bors [Sun, 1 Sep 2019 18:04:49 +0000 (18:04 +0000)]
Auto merge of #63870 - estebank:async-fn-call, r=oli-obk

Suggest call fn ctor passed as arg to fn with type param bounds

_Reviewer note: the relevant changes are in the second commit, the first is simple and mechanical, but verbose._

When forgetting to call a fn in an argument position to an fn that has a generic bound:

```rust
async fn foo() {}

fn bar(f: impl Future<Output=()>) {}

fn main() {
    bar(foo); // <- should be `bar(foo());`
}
```

suggest calling it:

```
error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::future::Future` is not satisfied
  --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:5
   |
LL | fn bar(f: impl Future<Output=()>) {}
   | --------------------------------- required by `bar`
...
LL |     bar(foo);
   |     ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}`
   |
   = help: it looks like you forgot to use parentheses to call the function: `foo()`
```

Fix #63100. Follow up to #63833 and #63337.

4 years agoreview comments
Esteban Küber [Sun, 1 Sep 2019 17:49:07 +0000 (10:49 -0700)]
review comments

4 years agofollowing the same style
Guanqun Lu [Sun, 1 Sep 2019 16:38:05 +0000 (00:38 +0800)]
following the same style

4 years agoAuto merge of #64057 - Centril:rollup-nwtk2fb, r=Centril
bors [Sun, 1 Sep 2019 11:46:45 +0000 (11:46 +0000)]
Auto merge of #64057 - Centril:rollup-nwtk2fb, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #63410 (Update BufWriter example to include call to flush())
 - #64029 (Account for rounding errors when deciding the diagnostic boundaries)
 - #64032 (rustdoc use -Ccodegen-units=1 by default for test compile)
 - #64039 (Update sync condvar doc style)
 - #64042 (Fix word repetition in str documentation)

Failed merges:

r? @ghost

4 years agolibrustc_errors: Extract sugg/subst handling into method
Philipp Hansch [Sun, 1 Sep 2019 10:15:33 +0000 (12:15 +0200)]
librustc_errors: Extract sugg/subst handling into method

An initial refactoring before working on #61809.

This moves the whole block into a method so that it can be reused in the
annotate-snippet output. It's already used in the new emitter, but
there's no UI tests with suggestions included in this PR.

A first look at some UI tests with suggestions showed that there's some
more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the
new output is closer to the current one.

4 years agoRollup merge of #64042 - juliangehring:string-docs, r=jonas-schievink
Mazdak Farrokhzad [Sun, 1 Sep 2019 09:39:30 +0000 (11:39 +0200)]
Rollup merge of #64042 - juliangehring:string-docs, r=jonas-schievink

Fix word repetition in str documentation

Fixes a few repetitions of "like like" in the `trim*` methods documentation of `str`.

4 years agoRollup merge of #64039 - pickfire:patch-1, r=jonas-schievink
Mazdak Farrokhzad [Sun, 1 Sep 2019 09:39:29 +0000 (11:39 +0200)]
Rollup merge of #64039 - pickfire:patch-1, r=jonas-schievink

Update sync condvar doc style

4 years agoRollup merge of #64032 - andjo403:codegen-units, r=Mark-Simulacrum
Mazdak Farrokhzad [Sun, 1 Sep 2019 09:39:28 +0000 (11:39 +0200)]
Rollup merge of #64032 - andjo403:codegen-units, r=Mark-Simulacrum

rustdoc use -Ccodegen-units=1 by default for test compile

as the test is small we do not want split up in multiple codegen units
and also as there is multiple test running at the same time this
will reduce the number of concurrent threads

tested the test time with `./x.py test src/libcore --doc`
for my 16 core 32 thread cpu i get about 6% faster execution
and my 2 core 4 thread cpu I get about 10% faster execution

cc #63638
 r? @Mark-Simulacrum

4 years agoRollup merge of #64029 - estebank:fix-miri, r=RalfJung
Mazdak Farrokhzad [Sun, 1 Sep 2019 09:39:26 +0000 (11:39 +0200)]
Rollup merge of #64029 - estebank:fix-miri, r=RalfJung

Account for rounding errors when deciding the diagnostic boundaries

Fix Miri by fixing the bug raised in https://github.com/rust-lang/rust/pull/63402#discussion_r319485328.

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

4 years agoRollup merge of #63410 - johnterickson:master, r=joshtriplett
Mazdak Farrokhzad [Sun, 1 Sep 2019 09:39:25 +0000 (11:39 +0200)]
Rollup merge of #63410 - johnterickson:master, r=joshtriplett

Update BufWriter example to include call to flush()

I was playing with a writing a Huffman encoder/decoder and was getting weird corruptions and truncations.  I finally realized it was was because `BufWriter` was swallowing write errors 😬.  I've found Rust to generally be explicit and err on the safe side, so I definitely found this unintuitive and not "rustic".

https://twitter.com/johnterickson/status/1159514988123312128

4 years agoAccount for arbitrary self types in E0599
Esteban Küber [Sun, 1 Sep 2019 09:22:42 +0000 (02:22 -0700)]
Account for arbitrary self types in E0599

4 years agoreview comment
Esteban Küber [Sun, 1 Sep 2019 07:08:44 +0000 (00:08 -0700)]
review comment

4 years agoAuto merge of #64036 - matthewjasper:kill-borrows-on-self-assign, r=estebank
bors [Sun, 1 Sep 2019 08:15:04 +0000 (08:15 +0000)]
Auto merge of #64036 - matthewjasper:kill-borrows-on-self-assign, r=estebank

Kill borrows from assignments after generating new borrows

Closes #63719

4 years agoremove the unstable rustdoc parameter --linker
Andreas Jonson [Sun, 1 Sep 2019 06:49:26 +0000 (08:49 +0200)]
remove the unstable rustdoc parameter --linker

use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.

closes: #63816

4 years agodeduplicate code
Esteban Küber [Sun, 1 Sep 2019 01:42:13 +0000 (18:42 -0700)]
deduplicate code

4 years agoEmit a single error on if expr with expectation and no else clause
Esteban Küber [Sun, 1 Sep 2019 01:34:50 +0000 (18:34 -0700)]
Emit a single error on if expr with expectation and no else clause

4 years agoUse saturating_sub
Esteban Küber [Sat, 31 Aug 2019 20:42:53 +0000 (13:42 -0700)]
Use saturating_sub

4 years agoFix nll tests
Esteban Küber [Sat, 31 Aug 2019 20:40:20 +0000 (13:40 -0700)]
Fix nll tests

4 years agoAuto merge of #63703 - tommilligan:warn-empty-doctest, r=ollie27
bors [Sat, 31 Aug 2019 20:10:20 +0000 (20:10 +0000)]
Auto merge of #63703 - tommilligan:warn-empty-doctest, r=ollie27

rustdoc: warn on empty doc test

Closes #60319.

A doc test that only contains whitespace should result in a warning.

This PR adds detection of empty doc tests to `check-code-block-syntax`, as having an invalid doc test is mutually exclusive with an empty doc test.

4 years agoReorder AllocationDefinedness members
Andreas Molzer [Sat, 31 Aug 2019 19:21:29 +0000 (21:21 +0200)]
Reorder AllocationDefinedness members

This improves the clarity of the documentation a bit since they can
reference each other when reading the member docs in sequence.

4 years agoFix word repetition in str documentation
Julian Gehring [Sat, 31 Aug 2019 16:36:55 +0000 (17:36 +0100)]
Fix word repetition in str documentation

Fixes a few repetitions of "like like" in the `trim*` methods documentation of `str`.

4 years agoAuto merge of #64025 - Wind-River:master_003, r=alexcrichton
bors [Sat, 31 Aug 2019 16:19:10 +0000 (16:19 +0000)]
Auto merge of #64025 - Wind-River:master_003, r=alexcrichton

remove directory libstd/sys/vxworks/backtrace which is not used any more

r? @alexcrichton
cc @n-salim

4 years agoImprove documentation around allocation accessors
Andreas Molzer [Sat, 31 Aug 2019 15:01:56 +0000 (17:01 +0200)]
Improve documentation around allocation accessors

4 years agoUpdate sync condvar doc style
Ivan Tham [Sat, 31 Aug 2019 15:09:37 +0000 (23:09 +0800)]
Update sync condvar doc style

4 years agoclarify that not all errors are observed
John Erickson [Mon, 12 Aug 2019 22:36:11 +0000 (15:36 -0700)]
clarify that not all errors are observed

4 years agoAdd in generic type to description of BufReader and BufWriter
John Erickson [Fri, 9 Aug 2019 14:36:39 +0000 (07:36 -0700)]
Add in generic type to description of BufReader and BufWriter

4 years agoUpdate BufWriter example to include call to flush()
John Erickson [Fri, 9 Aug 2019 13:49:10 +0000 (06:49 -0700)]
Update BufWriter example to include call to flush()

4 years agoKill borrows from assignments after generating new borrows
Matthew Jasper [Sat, 31 Aug 2019 14:35:20 +0000 (15:35 +0100)]
Kill borrows from assignments after generating new borrows

4 years agofix rebase
Esteban Küber [Sat, 31 Aug 2019 07:15:52 +0000 (00:15 -0700)]
fix rebase

4 years agoreview comments: reword comment
Esteban Küber [Sun, 25 Aug 2019 18:27:04 +0000 (11:27 -0700)]
review comments: reword comment

4 years agoSuggest call fn ctor passed as arg to fn with type param bounds
Esteban Küber [Sat, 24 Aug 2019 21:45:03 +0000 (14:45 -0700)]
Suggest call fn ctor passed as arg to fn with type param bounds

4 years agoUse span label instead of note for cause in E0631
Esteban Küber [Sat, 24 Aug 2019 21:44:43 +0000 (14:44 -0700)]
Use span label instead of note for cause in E0631

4 years agoAuto merge of #63991 - Centril:unique-improper-ctype, r=rkruppe
bors [Sat, 31 Aug 2019 06:38:46 +0000 (06:38 +0000)]
Auto merge of #63991 - Centril:unique-improper-ctype, r=rkruppe

`improper_ctypes`: guard against accidental change to `Unique<T>`

r? @eddyb

4 years agoTweak terminal width trimming
Esteban Küber [Sat, 31 Aug 2019 02:47:21 +0000 (19:47 -0700)]
Tweak terminal width trimming

Properly account for left margin when setting terminal width through
CLI flag and don't trim code by default if we can't get the terminal's
dimensions.

4 years agoAuto merge of #63975 - topecongiro:rustfmt-1.4.6, r=nikomatsakis
bors [Sat, 31 Aug 2019 01:35:10 +0000 (01:35 +0000)]
Auto merge of #63975 - topecongiro:rustfmt-1.4.6, r=nikomatsakis

Update rustfmt to 1.4.6

This PR updates rustfmt to 1.4.6. [CHANGELOG](https://github.com/rust-lang/rustfmt/blob/v1.4.6/CHANGELOG.md#146-2019-08-28).

4 years agoAccount for rounding errors when deciding the diagnostic boundaries
Esteban Küber [Sat, 31 Aug 2019 00:45:34 +0000 (17:45 -0700)]
Account for rounding errors when deciding the diagnostic boundaries

4 years agoimproper_ctypes: guard against accidental change to Unique<T>.
Mazdak Farrokhzad [Thu, 29 Aug 2019 03:50:39 +0000 (05:50 +0200)]
improper_ctypes: guard against accidental change to Unique<T>.

4 years agoAuto merge of #64026 - Centril:rollup-le667lp, r=Centril
bors [Fri, 30 Aug 2019 21:31:01 +0000 (21:31 +0000)]
Auto merge of #64026 - Centril:rollup-le667lp, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #62957 (Match the loop examples)
 - #63600 (Merge oli-obk mail addresses)
 - #63684 (Constify LinkedList new function)
 - #63847 ([rustdoc] Fix system theme detection)
 - #63999 (Add missing links on AsRef trait)
 - #64014 ( miri: detect too large dynamically sized objects )
 - #64015 (some const-eval test tweaks)

Failed merges:

r? @ghost

4 years agoRollup merge of #64015 - RalfJung:const-tests, r=oli-obk
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:08:07 +0000 (23:08 +0200)]
Rollup merge of #64015 - RalfJung:const-tests, r=oli-obk

some const-eval test tweaks

Best reviewed commit-by-commit.

r? @oli-obk

4 years agoRollup merge of #64014 - RalfJung:miri-slice, r=oli-obk
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:08:06 +0000 (23:08 +0200)]
Rollup merge of #64014 - RalfJung:miri-slice, r=oli-obk

 miri: detect too large dynamically sized objects

Needed to make https://github.com/rust-lang/miri/pull/929 pass.

r? @oli-obk

4 years agoRollup merge of #63999 - GuillaumeGomez:as-ref-missing-links, r=Mark-Simulacrum
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:08:04 +0000 (23:08 +0200)]
Rollup merge of #63999 - GuillaumeGomez:as-ref-missing-links, r=Mark-Simulacrum

Add missing links on AsRef trait

cc @rust-lang/docs

4 years agoRollup merge of #63847 - GuillaumeGomez:system-theme-detection, r=kinnison
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:08:03 +0000 (23:08 +0200)]
Rollup merge of #63847 - GuillaumeGomez:system-theme-detection, r=kinnison

[rustdoc] Fix system theme detection

Fixes #63830

The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue.

cc @fenhl

r? @kinnison

4 years agoRollup merge of #63684 - GrayJack:const_list_new, r=Centril
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:08:01 +0000 (23:08 +0200)]
Rollup merge of #63684 - GrayJack:const_list_new, r=Centril

Constify LinkedList new function

Change the `LinkedList::new()` function to become a const fn, allowing the use in constant context.

4 years agoRollup merge of #63600 - rust-lang:oli-obk-patch-1, r=Mark-Simulacrum
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:07:59 +0000 (23:07 +0200)]
Rollup merge of #63600 - rust-lang:oli-obk-patch-1, r=Mark-Simulacrum

Merge oli-obk mail addresses

4 years agoRollup merge of #62957 - dns2utf8:doc_loop_keyword, r=GuillaumeGomez
Mazdak Farrokhzad [Fri, 30 Aug 2019 21:07:57 +0000 (23:07 +0200)]
Rollup merge of #62957 - dns2utf8:doc_loop_keyword, r=GuillaumeGomez

Match the loop examples

The idea is to show the usefulness of the expression side by side.

4 years agoMerge pull request #11 from Wind-River/cleanup-2
Baoshan [Fri, 30 Aug 2019 20:55:54 +0000 (13:55 -0700)]
Merge pull request #11 from Wind-River/cleanup-2

remove directory libstd/sys/vxworks/backtrace which is not used any more

4 years agoremove directory libstd/sys/vxworks/backtrace which is not used any more
Baoshan Pang [Fri, 30 Aug 2019 20:44:38 +0000 (13:44 -0700)]
remove directory libstd/sys/vxworks/backtrace which is not used any more

4 years agorustdoc use -Ccodegen-units=1 by default for test compile
Andreas Jonson [Fri, 30 Aug 2019 19:26:04 +0000 (21:26 +0200)]
rustdoc use -Ccodegen-units=1 by default for test compile

as the test is small we do not want split up in multiple codegen units
and also as there is multiple test running at the same time this
will reduce the number of concurrent threads

4 years agoAuto merge of #63982 - sam09:fix-63976, r=estebank
bors [Fri, 30 Aug 2019 17:54:55 +0000 (17:54 +0000)]
Auto merge of #63982 - sam09:fix-63976, r=estebank

When accessing private field of union, do not misidentify it as a struct

Fix incorrect error message when accessing private field of union.

Fixes #63976.

4 years agoAuto merge of #64018 - flip1995:clippyup, r=oli-obk
bors [Fri, 30 Aug 2019 13:56:35 +0000 (13:56 +0000)]
Auto merge of #64018 - flip1995:clippyup, r=oli-obk

Update Clippy

cc rust-lang/rust-clippy#4475

r? @oli-obk

4 years agoadd test
Ralf Jung [Fri, 30 Aug 2019 13:04:12 +0000 (15:04 +0200)]
add test

4 years agoSkip wrapping arithmetic tests on emscripten for 128 bit integers
Ilija Tovilo [Fri, 30 Aug 2019 12:10:46 +0000 (14:10 +0200)]
Skip wrapping arithmetic tests on emscripten for 128 bit integers

4 years agoAuto merge of #63827 - andjo403:out-of-process-rustc-in-rustdoc, r=Mark-Simulacrum
bors [Fri, 30 Aug 2019 10:25:26 +0000 (10:25 +0000)]
Auto merge of #63827 - andjo403:out-of-process-rustc-in-rustdoc, r=Mark-Simulacrum

Run doctests via out-of-process rustc

closes #63638

4 years agoUpdate Clippy
flip1995 [Fri, 30 Aug 2019 07:53:42 +0000 (09:53 +0200)]
Update Clippy

4 years agoconst-eval tests: make all unions repr(C)
Ralf Jung [Fri, 30 Aug 2019 07:35:02 +0000 (09:35 +0200)]
const-eval tests: make all unions repr(C)

4 years agoexplain why REF_AS_USIZE is important
Ralf Jung [Fri, 30 Aug 2019 07:31:21 +0000 (09:31 +0200)]
explain why REF_AS_USIZE is important

4 years agotweak const-valid test
Ralf Jung [Fri, 30 Aug 2019 07:30:59 +0000 (09:30 +0200)]
tweak const-valid test

4 years agomake unions repr(C)
Ralf Jung [Fri, 30 Aug 2019 07:29:58 +0000 (09:29 +0200)]
make unions repr(C)

4 years agoAuto merge of #63402 - estebank:strip-margin, r=oli-obk
bors [Fri, 30 Aug 2019 06:49:15 +0000 (06:49 +0000)]
Auto merge of #63402 - estebank:strip-margin, r=oli-obk

Strip code to the left and right in diagnostics for long lines

Fix #62999.

4 years agomod-level doc comment for validity check
Ralf Jung [Fri, 30 Aug 2019 06:37:02 +0000 (08:37 +0200)]
mod-level doc comment for validity check

4 years agobetter variable names
Ralf Jung [Tue, 27 Aug 2019 16:36:11 +0000 (18:36 +0200)]
better variable names

4 years agomiri: detect too large dynamically sized objects
Ralf Jung [Tue, 27 Aug 2019 10:54:46 +0000 (12:54 +0200)]
miri: detect too large dynamically sized objects

4 years agoAuto merge of #60966 - oli-obk:diagnostic_items, r=eddyb
bors [Fri, 30 Aug 2019 03:09:39 +0000 (03:09 +0000)]
Auto merge of #60966 - oli-obk:diagnostic_items, r=eddyb

Add a "diagnostic item" scheme for lints referring to libstd items

fixes https://github.com/rust-lang/rust/issues/39131

r? @Manishearth @rust-lang/wg-diagnostics

4 years agoFixup remaining direct relocation field references
Andreas Molzer [Fri, 30 Aug 2019 02:19:29 +0000 (04:19 +0200)]
Fixup remaining direct relocation field references

4 years agoMove relocation range copies into allocation
Andreas Molzer [Fri, 30 Aug 2019 02:17:18 +0000 (04:17 +0200)]
Move relocation range copies into allocation

4 years agoUpdate tests
Oliver Scherer [Fri, 30 Aug 2019 00:46:25 +0000 (02:46 +0200)]
Update tests

4 years agoAdd a "diagnostic item" scheme
Oliver Scherer [Sun, 19 May 2019 18:16:04 +0000 (20:16 +0200)]
Add a "diagnostic item" scheme

This allows lints and other diagnostics to refer to items
by a unique ID instead of relying on whacky path
resolution schemes that may break when items are
relocated.

4 years agoMerge oli-obk mail addresses
Oliver Scherer [Thu, 15 Aug 2019 16:20:35 +0000 (18:20 +0200)]
Merge oli-obk mail addresses

4 years agoRun doctests via out-of-process rustc
Andreas Jonson [Thu, 29 Aug 2019 21:15:31 +0000 (23:15 +0200)]
Run doctests via out-of-process rustc

4 years agosupport rustdoc test from stdin to rustc
Andreas Jonson [Tue, 27 Aug 2019 06:07:56 +0000 (08:07 +0200)]
support rustdoc test from stdin to rustc

4 years agoFix test.
Sam Radhakrishan [Thu, 29 Aug 2019 19:27:20 +0000 (00:57 +0530)]
Fix test.

4 years agoAlso test isize and usize in wrapping arithmetics
Ilija Tovilo [Thu, 29 Aug 2019 19:23:52 +0000 (21:23 +0200)]
Also test isize and usize in wrapping arithmetics

4 years agoAuto merge of #63971 - flip1995:clippyup, r=oli-obk
bors [Thu, 29 Aug 2019 18:52:09 +0000 (18:52 +0000)]
Auto merge of #63971 - flip1995:clippyup, r=oli-obk

Update Clippy

cc rust-lang/rust-clippy#4462

r? @oli-obk @Manishearth

4 years agoMake allocation relocation field private
Andreas Molzer [Thu, 29 Aug 2019 16:02:51 +0000 (18:02 +0200)]
Make allocation relocation field private

4 years agoAuto merge of #64000 - Centril:rollup-70s9ar3, r=Centril
bors [Thu, 29 Aug 2019 15:14:47 +0000 (15:14 +0000)]
Auto merge of #64000 - Centril:rollup-70s9ar3, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #62734 (Hide trait default methods)
 - #63953 (bootstrap: allow specifying mirror for bootstrap compiler download.)
 - #63956 (rustc: Handle modules in "fat" LTO more robustly)
 - #63979 (std: Remove the `wasm_syscall` feature)

Failed merges:

r? @ghost

4 years agoRollup merge of #63979 - alexcrichton:remove-wasm-syscall, r=dtolnay
Mazdak Farrokhzad [Thu, 29 Aug 2019 15:14:03 +0000 (17:14 +0200)]
Rollup merge of #63979 - alexcrichton:remove-wasm-syscall, r=dtolnay

std: Remove the `wasm_syscall` feature

This commit removes the `wasm_syscall` feature from the
wasm32-unknown-unknown build of the standard library. This feature was
originally intended to allow an opt-in way to interact with the
operating system in a posix-like way but it was never stabilized.
Nowadays with the advent of the `wasm32-wasi` target that should
entirely replace the intentions of the `wasm_syscall` feature.

4 years agoRollup merge of #63956 - alexcrichton:fix-lto-all-cached, r=michaelwoerister
Mazdak Farrokhzad [Thu, 29 Aug 2019 15:14:01 +0000 (17:14 +0200)]
Rollup merge of #63956 - alexcrichton:fix-lto-all-cached, r=michaelwoerister

rustc: Handle modules in "fat" LTO more robustly

When performing a "fat" LTO the compiler has a whole mess of codegen
units that it links together. To do this it needs to select one module
as a "base" module and then link everything else into this module.
Previously LTO passes assume that there's at least one module in-memory
to link into, but nowadays that's not always true! With incremental
compilation modules may actually largely be cached and it may be
possible that there's no in-memory modules to work with.

This commit updates the logic of the LTO backend to handle modules a bit
more uniformly during a fat LTO. This commit immediately splits them
into two lists, one serialized and one in-memory. The in-memory list is
then searched for the largest module and failing that we simply
deserialize the first serialized module and link into that. This
refactoring avoids juggling three lists, two of which are serialized
modules and one of which is half serialized and half in-memory.

Closes #63349

4 years agoRollup merge of #63953 - crlf0710:bootstrap_mirroring, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 29 Aug 2019 15:13:59 +0000 (17:13 +0200)]
Rollup merge of #63953 - crlf0710:bootstrap_mirroring, r=Mark-Simulacrum

bootstrap: allow specifying mirror for bootstrap compiler download.

4 years agoRollup merge of #62734 - GuillaumeGomez:hide-default-methods, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 29 Aug 2019 15:13:57 +0000 (17:13 +0200)]
Rollup merge of #62734 - GuillaumeGomez:hide-default-methods, r=Mark-Simulacrum

Hide trait default methods

Fixes #62499.

However, the question remains: do we want to extend it to this point or not?

r? @QuietMisdreavus

4 years agoAdd missing links on AsRef trait
Guillaume Gomez [Thu, 29 Aug 2019 14:04:13 +0000 (16:04 +0200)]
Add missing links on AsRef trait