Commit Graph

96308 Commits

Author SHA1 Message Date
bors
bc2e84ca09 Auto merge of #62757 - pietroalbini:fix-linuxtools, r=alexcrichton
ci: fix LinuxTools PR builder missing environment variables

This PR includes the new `public-credentials` variables group in PR builders, hopefully fixing sccache and toolstate.

~~Do not merge this yet as I want to do a test build first.~~

r? @alexcrichton
fixes https://github.com/rust-lang/rust/issues/62754 https://github.com/rust-lang/rust/issues/62753
2019-07-17 19:40:33 +00:00
Ferdia McKeogh
14a1f7246b
Requested change 2019-07-17 19:55:44 +02:00
Pietro Albini
9926868195
ci: include public credentials in the linuxtools pr job
This allows the use of sccache to compile LLVM, and should fix toolstate
not working.
2019-07-17 18:16:44 +02:00
bors
2eb0bc5e3c Auto merge of #62688 - topecongiro:rustfmt-1.3.3, r=alexcrichton
Update rustfmt to 1.3.3

This PR updates rustfmt to 1.3.3 which fixes the bug in https://github.com/rust-lang/rust/pull/62432#issuecomment-509411620.
2019-07-17 16:02:09 +00:00
Nikita Popov
f8eb2a617e Disable Z3 in LLVM build 2019-07-17 16:59:14 +02:00
Denys Otrishko
f8681f0c05
rustc_typeck: improve diagnostics for -> _ fn return type
Closes: https://github.com/rust-lang/rust/issues/56132
2019-07-17 16:59:08 +03:00
Denys Otrishko
d9ad04a0f0
rustc_typeck: extract common placeholder type diagnostic code 2019-07-17 16:59:07 +03:00
Ferdia McKeogh
8c589bca53
Document link_section arbitrary bytes 2019-07-17 15:35:32 +02:00
bors
e34d4ae869 Auto merge of #61339 - jridgewell:pointer-alignment, r=BurntSushi
Optimize pointer alignment in utf8 validation

This uses (and reuses) the u8 arrays's inherent block alignment when checking whether the current index is block aligned.

I initially thought that this would just move the expensive `align_offset` call out of the while loop and replace it with a subtraction and bitwise AND. But it appears this optimizes much better, too...

before: https://rust.godbolt.org/z/WIPvWl
after: https://rust.godbolt.org/z/-jBPoW

## Benchmarks

https://github.com/jridgewell/faster-from_utf8/tree/pointer-alignment

```
test from_utf8_2_bytes_fast      ... bench:         310 ns/iter (+/- 42) = 1290 MB/s
test from_utf8_2_bytes_regular   ... bench:         309 ns/iter (+/- 24) = 1294 MB/s

test from_utf8_3_bytes_fast      ... bench:       1,027 ns/iter (+/- 62) = 1168 MB/s
test from_utf8_3_bytes_regular   ... bench:       1,513 ns/iter (+/- 611) = 793 MB/s

test from_utf8_4_bytes_fast      ... bench:       1,788 ns/iter (+/- 26) = 1342 MB/s
test from_utf8_4_bytes_regular   ... bench:       1,907 ns/iter (+/- 181) = 1258 MB/s

test from_utf8_all_bytes_fast    ... bench:       3,463 ns/iter (+/- 97) = 1155 MB/s
test from_utf8_all_bytes_regular ... bench:       4,083 ns/iter (+/- 89) = 979 MB/s

test from_utf8_ascii_fast        ... bench:          88 ns/iter (+/- 4) = 28988 MB/s
test from_utf8_ascii_regular     ... bench:          88 ns/iter (+/- 8) = 28988 MB/s

test from_utf8_cyr_fast          ... bench:       7,707 ns/iter (+/- 531) = 665 MB/s
test from_utf8_cyr_regular       ... bench:       8,202 ns/iter (+/- 135) = 625 MB/s

test from_utf8_enwik8_fast       ... bench:   1,135,756 ns/iter (+/- 84,450) = 8804 MB/s
test from_utf8_enwik8_regular    ... bench:   1,145,468 ns/iter (+/- 79,601) = 8730 MB/s

test from_utf8_jawik10_fast      ... bench:  12,723,844 ns/iter (+/- 473,247) = 785 MB/s
test from_utf8_jawik10_regular   ... bench:  13,384,596 ns/iter (+/- 666,997) = 747 MB/s

test from_utf8_mixed_fast        ... bench:       2,321 ns/iter (+/- 123) = 2081 MB/s
test from_utf8_mixed_regular     ... bench:       2,702 ns/iter (+/- 408) = 1788 MB/s

test from_utf8_mostlyasc_fast    ... bench:         249 ns/iter (+/- 10) = 14666 MB/s
test from_utf8_mostlyasc_regular ... bench:         276 ns/iter (+/- 5) = 13231 MB/s
```
2019-07-17 12:13:36 +00:00
bors
d56128d291 Auto merge of #62596 - cuviper:expect_none, r=rkruppe
Add Option::expect_none(msg) and unwrap_none()

These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
2019-07-17 08:29:02 +00:00
Baoshan Pang
b7939173de update data_layout and features 2019-07-17 01:06:33 -07:00
topecongiro
d8ffe7ddbf Update rustfmt to the latest master 2019-07-17 13:54:57 +09:00
topecongiro
3e9604b29e Update rustfmt to 1.3.3 2019-07-17 13:54:57 +09:00
lzutao
6471bd5f19
Add missing link to Infallible in TryFrom doc 2019-07-17 10:44:12 +07:00
bors
bf16480f9c Auto merge of #62714 - matthiaskrgr:submodule_upd, r=oli-obk
submodules: update clippy from b0290424 to 164310dd

Changes:
````
Lint
Fix float_cmp false positive when comparing signum
grep only lines, that start with 'changelog: '
Get PR number from bors commit message
Authenticate with github_api_token
Check PRs for changelog entry in the body
Deny warnings in CI
Disable dogfood on windows for faster build time on travis
Revert "Remove `CARGO_INCREMENTAL=0` from windows build"
Remove `CARGO_INCREMENTAL=0` from windows build
Test with different sysroots dependent on the OS
Build sys_root in driver with PathBuf instead of String
Don't re-set the LD_LIBRARY_PATH in base_tests.sh
Add master toolchain binaries to the PATH
Change conditional
Stop allowing failures in Travis windows build
Fix bug in `implicit_hasher` causing crashes
Avoid rustfmt bug on Windows
Add rustfmt nightly to appveyor install
Work around rustup fallback error on Windows
Update documentation to the dev fmt command
Remove format checks from CI scripts again.
Remove format checks from CI script
Improve fmt test failure message
Fix crash on `dev --limit-stderr-length`
Add dev fmt subcommand
don't strip blank lines in lint documentation
````
2019-07-17 02:49:51 +00:00
nathanwhit
04f0d309dc Remove last use of mem::uninitialized from std::io::util 2019-07-16 22:41:38 -04:00
bors
38798c6d68 Auto merge of #62592 - nikic:actually-update-llvm, r=alexcrichton
Update to LLVM 9 trunk

Following the preparatory changes in #62474, this updates the LLVM submodule to https://github.com/rust-lang/llvm-project/tree/rustc/9.0-2019-07-12 and:

 * Changes the LLVM Rust bindings to account for the new SubtargetSubTypeKV.
 * Adjusts a codegen test for the new form of the byval attribute that takes a type.
 * Makes a PGO codegen test more liberal with regard to order and linkage.
 * Builds InstrProfilingPlatformWindows.c as part of libprofiler_builtins.
 * Moves registration of additional passes (in particular sanitizers) to the end of the module pass manager.
 * Disables LLDB on builders.

r? @alexcrichton
2019-07-16 23:05:06 +00:00
Matthew Jasper
a4a7bb9a3f Make pretty-expanded-hygiene a ui test
`normalize-stdout-test` removes the need for Make, and it can be updated
with `--bless` this way
2019-07-16 21:23:29 +01:00
Matthew Jasper
03178f31c4 Change all run-pass hygiene tests to ui tests
Change some tests to `check-pass` that are only testing name resolution.
2019-07-16 21:20:39 +01:00
Dodo
9341e90b44 found more repeated wording 2019-07-16 21:57:32 +02:00
Dodo
4785311893 fix double wording 2019-07-16 21:49:01 +02:00
bors
07e0c3651c Auto merge of #61946 - BaoshanPang:vxworks, r=alexcrichton
port rust for vxWorks

The supporting for vxWorks has been enabled in this branch. Although there are still a lots of work to do, I would like to upstream the code and fix the problems later.

Please let me know if there is anything I have to do before upstream the code.

r? @alexcrichton

Thanks,
Baoshan
2019-07-16 19:26:53 +00:00
bors
96234d5363 Auto merge of #62723 - Mark-Simulacrum:rollup-vjdzlam, r=Mark-Simulacrum
Rollup of 6 pull requests

Successful merges:

 - #62666 (Cancel unemitted diagnostics during error recovery)
 - #62683 (Chapter for `param_attrs`)
 - #62693 (ci: Remove Travis/AppVeyor configuration)
 - #62702 (normalize use of backticks in compiler messages for libsyntax_ext)
 - #62703 (normalize use of backticks in compiler messages for libsyntax/parse)
 - #62722 (ci: Bump time limit of tools builder on PRs)

Failed merges:

r? @ghost
2019-07-16 15:50:44 +00:00
Mark Rousskov
51ca50ebd6
Rollup merge of #62722 - alexcrichton:unlimit-tools, r=pietroalbini
ci: Bump time limit of tools builder on PRs

This should give it enough time to finish instead of being killed after
an hour.
2019-07-16 11:39:00 -04:00
Mark Rousskov
94b16d4bd0
Rollup merge of #62703 - fakenine:normalize_use_of_backticks_compiler_messages_p6, r=eddyb
normalize use of backticks in compiler messages for libsyntax/parse

https://github.com/rust-lang/rust/issues/60532
2019-07-16 11:38:58 -04:00
Mark Rousskov
4226f14cbb
Rollup merge of #62702 - fakenine:normalize_use_of_backticks_compiler_messages_p5, r=Centril
normalize use of backticks in compiler messages for libsyntax_ext

https://github.com/rust-lang/rust/issues/60532
2019-07-16 11:38:57 -04:00
Mark Rousskov
e47cb534df
Rollup merge of #62693 - alexcrichton:rm-travis-appveyor, r=Mark-Simulacrum
ci: Remove Travis/AppVeyor configuration

Now that we've fully moved to Azure Pipelines and bors has been updated
to only gate on Azure this commit removes the remaining Travis/AppVeyor
support contained in this repository. Most of the deletions here are
related to producing better output on Travis by folding certain
sections. This isn't supported by Azure so there's no need to keep it
around, and if Azure ever adds support we can always add it back!
2019-07-16 11:38:55 -04:00
Mark Rousskov
c9be624c26
Rollup merge of #62683 - c410-f3r:fn-attrs-doc, r=Centril
Chapter for `param_attrs`

Most the information was taken from the RFC.

cc #60406
2019-07-16 11:38:54 -04:00
Mark Rousskov
ae2672340c
Rollup merge of #62666 - estebank:preempt-ice, r=eddyb
Cancel unemitted diagnostics during error recovery

Follow up to https://github.com/rust-lang/rust/pull/62604. Use @eddyb's preferred style and catch other case of the same problem.

r? @eddyb
2019-07-16 11:38:52 -04:00
Alex Crichton
7df9ad3d07 ci: Bump time limit of tools builder on PRs
This should give it enough time to finish instead of being killed after
an hour.
2019-07-16 08:25:01 -07:00
bors
d36b7f6944 Auto merge of #62322 - wesleywiser:promoted_query, r=oli-obk
Add a query to get the `promoted`s for a `mir::Body`

This is a builidng block toward removing a lot of duplicated code
between miri and the cosnt-propagator pass.

See this thread for more info:
https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Using.20.60InterpCx.60.20more/near/169030661

r? @spastorino but feel free to hand it off to somebody else
2019-07-16 12:19:35 +00:00
Matthias Krüger
cf4de8dd75 submodules: update clippy from b0290424 to 164310dd
Changes:
````
Lint
Fix float_cmp false positive when comparing signum
grep only lines, that start with 'changelog: '
Get PR number from bors commit message
Authenticate with github_api_token
Check PRs for changelog entry in the body
Deny warnings in CI
Disable dogfood on windows for faster build time on travis
Revert "Remove `CARGO_INCREMENTAL=0` from windows build"
Remove `CARGO_INCREMENTAL=0` from windows build
Test with different sysroots dependent on the OS
Build sys_root in driver with PathBuf instead of String
Don't re-set the LD_LIBRARY_PATH in base_tests.sh
Add master toolchain binaries to the PATH
Change conditional
Stop allowing failures in Travis windows build
Fix bug in `implicit_hasher` causing crashes
Avoid rustfmt bug on Windows
Add rustfmt nightly to appveyor install
Work around rustup fallback error on Windows
Update documentation to the dev fmt command
Remove format checks from CI scripts again.
Remove format checks from CI script
Improve fmt test failure message
Fix crash on `dev --limit-stderr-length`
Add dev fmt subcommand
don't strip blank lines in lint documentation
````
2019-07-16 10:13:24 +02:00
Baoshan Pang
4c0c0f6158 Add supporting for vxWorks
r? @alexcrichton
2019-07-16 00:13:07 -07:00
Ferdia McKeogh
3c11944376
Suggested change 2019-07-16 07:53:30 +02:00
Ferdia McKeogh
2ced474e80
Check that trait is exported or public before adding intercrate ambiguity hint 2019-07-16 07:53:30 +02:00
bors
02785dabad Auto merge of #62704 - Mark-Simulacrum:rollup-oi94s2j, r=Mark-Simulacrum
Rollup of 14 pull requests

Successful merges:

 - #62103 (Add debug assertions to write_bytes and copy*)
 - #62405 (Remove never_type feature requirement for exhaustive patterns)
 - #62491 (Fix Pin urls in Option documentation)
 - #62533 (Add missing links for CannotReallocInPlace type)
 - #62634 (Less unsafe in the array example of MaybeUninit docs)
 - #62639 (Make VaListImpl<'f> invariant over the 'f lifetime)
 - #62646 (Tweak wording in feature gate errors)
 - #62662 (add spaces in front of trait requirements in libcore/cell.rs)
 - #62668 (Fix #62660)
 - #62673 (miri validation: better error messages for dangling references)
 - #62680 (Actually call `visit_block_entry` in `DataflowResultsConsumer`)
 - #62685 (Add info about undefined behavior to as_ref suggestions)
 - #62689 (Fix typo in RawWaker::new documentation)
 - #62698 (SGX target: don't pretend to be GNU/Linux to LLVM)

Failed merges:

r? @ghost
2019-07-16 05:03:20 +00:00
Limira
b7cbd4ec47 Update the help message on error for self type 2019-07-16 11:30:48 +07:00
Mark Rousskov
da0c8feba4
Rollup merge of #62698 - jethrogb:jb/sgx-llvm-target, r=alexcrichton
SGX target: don't pretend to be GNU/Linux to LLVM

See https://github.com/rust-lang/rust/pull/62592 & https://github.com/rust-lang-nursery/compiler-builtins/issues/303

r? @alexcrichton
2019-07-15 19:55:16 -04:00
Mark Rousskov
ba3deeb01a
Rollup merge of #62689 - 0e4ef622:patch-1, r=Xanewok
Fix typo in RawWaker::new documentation

poiner -> pointer
2019-07-15 19:55:15 -04:00
Mark Rousskov
40a74438ad
Rollup merge of #62685 - nathanwhit:as_ref_suggest_fix, r=estebank
Add info about undefined behavior to as_ref suggestions

Fixes #61786. A very small fix, but suggestions on wording/content are welcomed.
2019-07-15 19:55:14 -04:00
Mark Rousskov
83ead58917
Rollup merge of #62680 - ecstatic-morse:fix-dataflow-results-consumer, r=matthewjasper
Actually call `visit_block_entry` in `DataflowResultsConsumer`

This fixes a trivial bug in `DataflowResultsConsumer`: `visit_block_entry` is never called when visiting dataflow results.

A previous version of #62547 used this API and included this fix, but it has since switched to `DataflowResultsCursor` making this commit irrelevant.
2019-07-15 19:55:12 -04:00
Mark Rousskov
879c610557
Rollup merge of #62673 - RalfJung:validity-msg, r=oli-obk
miri validation: better error messages for dangling references

Cc @oli-obk
2019-07-15 19:55:11 -04:00
Mark Rousskov
f9576a6fce
Rollup merge of #62668 - goodmanjonathan:fix-62660, r=estebank
Fix #62660

If the explicitly given type of a `self` parameter fails to parse correctly, we need to propagate the error rather than dropping it and causing an ICE.

Fixes #62660.
2019-07-15 19:55:10 -04:00
Mark Rousskov
aa480100b3
Rollup merge of #62662 - DutchGhost:fix_space, r=sfackler
add spaces in front of trait requirements in libcore/cell.rs

Adds spaces before trait requirements in `libcore/cell.rs`.
2019-07-15 19:55:08 -04:00
Mark Rousskov
4efdff7dbb
Rollup merge of #62646 - estebank:wording, r=petrochenkov
Tweak wording in feature gate errors
2019-07-15 19:55:07 -04:00
Mark Rousskov
ee8194002e
Rollup merge of #62639 - immunant:invariant_valistimpl, r=eddyb
Make VaListImpl<'f> invariant over the 'f lifetime

After doing some research on variance and going back to look at `VaList` and `VaListImpl`, I realized that `VaList<'a, 'f>` is invariant over the `'f` lifetime (and covariant over `'a`), but `VaListImpl<'f>` isn't invariant but probably should be. This patch makes `VaListImpl<'f>` invariant over `'f`.

r? @eddyb
cc @dlrobertson
2019-07-15 19:55:06 -04:00
Mark Rousskov
caf10b5ffe
Rollup merge of #62634 - llogiq:uninit-array-docs, r=RalfJung
Less unsafe in the array example of MaybeUninit docs

I believe this is an acceptable way to initialize elements of `[MaybeUninit<T>; _]` arrays. Miri agrees. Conceptually, we are working at the array level, above the `MaybeUninit`, and as we are replacing it wholesale, this should pose no problem to soundness. And the code is easier to read.

r? @RalfJung
2019-07-15 19:55:04 -04:00
Mark Rousskov
64ceba73af
Rollup merge of #62533 - GuillaumeGomez:missing-urls-CannotReallocInPlace, r=QuietMisdreavus
Add missing links for CannotReallocInPlace type

r? @QuietMisdreavus
2019-07-15 19:55:03 -04:00
Mark Rousskov
d6f0c0c47d
Rollup merge of #62491 - GuillaumeGomez:fix-pin-urls-for-option, r=QuietMisdreavus
Fix Pin urls in Option documentation

Fixes the following situation:

![Screenshot from 2019-07-08 13-24-59](https://user-images.githubusercontent.com/3050060/60806822-55dfdc00-a184-11e9-9ee3-279e82fc92bd.png)

r? @QuietMisdreavus
2019-07-15 19:55:01 -04:00
Mark Rousskov
99e7328d13
Rollup merge of #62405 - hellow554:patch-1, r=varkor
Remove never_type feature requirement for exhaustive patterns

I **think** this resolves #51221
At least for me, it doesn't ICE anymore and all tests are still passing, so LGTM
2019-07-15 19:55:00 -04:00