]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #62696 - chocol4te:fix_#62194, r=estebank
Mark Rousskov [Thu, 18 Jul 2019 15:29:39 +0000 (11:29 -0400)]
Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank

Check that trait is exported or public before adding hint

Closes #62194.

This PR checks the `AccessLevels` of a trait to check whether adding the intercrate ambiguity hint is valid or not.

I am unsure of both the use of `.unwrap()` as well as removing hints for [downstream *and* [upstream](https://github.com/rust-lang/rust/blob/92b0f52584c9375505ecdefdd7855b93a5919d51/src/librustc/traits/select.rs#L112-L142).

4 years agoRollup merge of #62615 - wesleywiser:pgo_error, r=nagisa
Mark Rousskov [Thu, 18 Jul 2019 15:29:37 +0000 (11:29 -0400)]
Rollup merge of #62615 - wesleywiser:pgo_error, r=nagisa

 Only error about MSVC + PGO + unwind if we're generating code

In #61853, we changed the error when using PGO & MSVC toolchain & panic=unwind into a warning. However, in the compiler team meeting on 2019-07-11, we found that not everybody was in favor of that change because of the possibility of broken binaries.

This PR reverts that change so this is again an error. However, to work around an [issue the Firefox team is having](https://github.com/rust-lang/rust/issues/61002#issuecomment-500075739), we will only emit the error if we're actually supposed to generate a binary. If the `rustc` is invoked with `--print` arguments (which means that no binary will actually be emitted), then we won't emit the error because there is not a possibility of the issue occurring.

cc @EricRahm @nikomatsakis @pnkfelix @Centril

4 years agoRollup merge of #61926 - scottmcm:vec-vecdeque, r=Mark-Simulacrum
Mark Rousskov [Thu, 18 Jul 2019 15:29:36 +0000 (11:29 -0400)]
Rollup merge of #61926 - scottmcm:vec-vecdeque, r=Mark-Simulacrum

Fix hyperlinks in From impls between Vec and VecDeque

I'd been trying to link them, but apparently actually just added brackets: <https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#impl-From%3CVec%3CT%3E%3E>

~~This reverts commit 5168f5d220d0b30d322f254f51142931a9054056.~~

~~(I'd previously tried to make relative links, but those failed linkcheck because the types are exported at different levels.  So just skip the links -- they're already linked in the function signature anyway.)~~

This makes the links now work.

4 years agoAuto merge of #62671 - lzutao:tidy-lldb, r=alexcrichton
bors [Thu, 18 Jul 2019 08:38:56 +0000 (08:38 +0000)]
Auto merge of #62671 - lzutao:tidy-lldb, r=alexcrichton

Check for lldb existences

4 years agoAuto merge of #62669 - estebank:suggest-assoc-type, r=cramertj
bors [Thu, 18 Jul 2019 05:07:36 +0000 (05:07 +0000)]
Auto merge of #62669 - estebank:suggest-assoc-type, r=cramertj

Suggest assoc type on type not found in trait method definition

Given

```
trait A {
    type Bla;
    fn to_bla(&self) -> Bla;
}
```
suggest using `Self::Bla`:

```
error[E0412]: cannot find type `Bla` in this scope
  --> file.rs:3:25
   |
LL |     fn to_bla(&self) -> Bla;
   |                         ^^^ help: try: `Self::Bla`
```

Fix #62650.

4 years agoAuto merge of #62733 - ehuss:update-mdbook, r=alexcrichton
bors [Wed, 17 Jul 2019 23:20:20 +0000 (23:20 +0000)]
Auto merge of #62733 - ehuss:update-mdbook, r=alexcrichton

Update mdbook, cargo, books

This updates the last of the books using mdbook 0.1, finally removing it from the build.  Cargo, the reference, and the rustc book were the last to change.  This should have a noticeable impact on CI times.

I decided to remove the version switcher from the rustbook tool.  It seemed a little awkward keeping it with one version.  If we ever need it in the future, we can always add it back, it is a relatively small amount of code.  I would just like to avoid the temptation to split the versions in the future.

## cargo

12 commits in 677a180f4c8ca1dcef594f68dd0e63e4f08621f5..e3563dbdcd2e370bc4f11d080f739d82d25773fd
2019-07-08 13:43:02 +0000 to 2019-07-16 19:22:44 +0000
- Add Cirrus CI badge to manifest (rust-lang/cargo#7119)
- Update mdbook to 0.3. (rust-lang/cargo#7140)
- Remove unused feature filter. (rust-lang/cargo#7131)
- Remove now-unused `WorkspaceResolve` (rust-lang/cargo#7127)
- Fix some clippy warnings. (rust-lang/cargo#7135)
- Also ignore remap-path-prefix in metadata for `cargo rustc`. (rust-lang/cargo#7134)
- Fix some formatting for some strings. (rust-lang/cargo#7129)
- Handle activation conflicts for `[patch]` sources (rust-lang/cargo#7118)
- [BETA] Fix `cargo new` in root directory. (rust-lang/cargo#7126)
- Remove MyFnOnce (rust-lang/cargo#7125)
- Don't suppress error messages with `-q` (rust-lang/cargo#7116)
- Fix changelog date (rust-lang/cargo#7115)

## book

2 commits in 6c0d83499c8e77e06a71d28c5e1adccec278d4f3..7ddc46460f09a5cd9bd2a620565bdc20b3315ea9
2019-06-23 20:25:30 -0400 to 2019-06-27 09:50:36 -0400
- reexport to re-export
- Fixes made in final layout check

## reference

4 commits in 7a5aab5fd50d6290679beb4cf42fa5f46ed22aec..8e7d614303b0dec7492e048e63855fcd3b944ec8
2019-06-20 17:38:52 +0200 to 2019-07-16 21:02:33 +0100
- Update to mdbook 0.3. (rust-lang-nursery/reference#641)
- Remove extra parenthesis (rust-lang-nursery/reference#621)
- Correct sentence about unsized coercions (rust-lang-nursery/reference#628)
- unions: call out field offset issues (rust-lang-nursery/reference#627)

## edition-guide

4 commits in f8072acde5ce29c7570d7986180bbded2d22e287..f6c8b92d4e63edd28e862be952f33861f35956f8
2019-06-14 23:27:05 +0200 to 2019-07-06 22:10:32 +0200
- Fix syntax highlighting in macro guide (rust-lang-nursery/edition-guide#182)
- Fix error example for modern compilers. (rust-lang-nursery/edition-guide#160)
- Try cargo install-upgrade for mdbook. (rust-lang-nursery/edition-guide#181)
- correct the travis build badge URL (rust-lang-nursery/edition-guide#180)

## embedded-book

2 commits in ef27b517dcd0b990c888c0d7caeff52a5a115619..ff334e74fdb9f197e621efa6d7c3105be892e888
2019-06-18 22:59:47 +0000 to 2019-07-16 13:47:34 +0000
- use_core() is required for #![no_std] compatible generated bindings  (rust-embedded/book#197)
- concurrency: update shared resource examples  (rust-embedded/book#196)

## nomicon

7 commits in 341c221116a8b9f1010cf1eece952b80c5ec7f54..b7f0aba2f88a8feade70595efcfa3438e54e96c0
2019-06-19 09:08:47 -0700 to 2019-07-11 15:11:36 -0400
- chore: Remove redundant Eq import
- Fix link to rfc1857
- Move word "reading" out of the link to "The Book"
- update the link to `mdbook`
- re-wrap more text
- re-wrap the text to 80 columns
- Better explain how to use `mdbook`

## rust-by-example

8 commits in 62b3ff2cb44dd8b648c3ef2a9347c3706d148014..e3679e214d8db44586aca9b20aa27517007d1923
2019-06-24 09:17:21 -0300 to 2019-07-15 11:13:44 -0300
- Collection of fixes for the 'Vectors` chapter. (rust-lang/rust-by-example#1216)
- Changed mutable collected_iterator into immutable (rust-lang/rust-by-example#1219)
- Fix minor formatting inconsistencies (rust-lang/rust-by-example#1220)
- Make `use` example runnable (rust-lang/rust-by-example#1215)
- Fix: Automatically Typo (rust-lang/rust-by-example#1214)
- Collection of fixes for the `Strings` chapter. (rust-lang/rust-by-example#1212)
- Added link to russian translation (rust-lang/rust-by-example#1213)
- A couple of fixes for the `HashMap` chapter. (rust-lang/rust-by-example#1211)

4 years agoUpdate mdbook, cargo, books
Eric Huss [Mon, 8 Jul 2019 21:52:07 +0000 (14:52 -0700)]
Update mdbook, cargo, books

This updates the last of the books using mdbook 0.1, finally
removing it from the build.

4 years agoAuto merge of #62757 - pietroalbini:fix-linuxtools, r=alexcrichton
bors [Wed, 17 Jul 2019 19:40:33 +0000 (19:40 +0000)]
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

4 years agoci: include public credentials in the linuxtools pr job
Pietro Albini [Wed, 17 Jul 2019 16:15:20 +0000 (18:15 +0200)]
ci: include public credentials in the linuxtools pr job

This allows the use of sccache to compile LLVM, and should fix toolstate
not working.

4 years agoAuto merge of #62688 - topecongiro:rustfmt-1.3.3, r=alexcrichton
bors [Wed, 17 Jul 2019 16:02:09 +0000 (16:02 +0000)]
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.

4 years agoAuto merge of #61339 - jridgewell:pointer-alignment, r=BurntSushi
bors [Wed, 17 Jul 2019 12:13:36 +0000 (12:13 +0000)]
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
```

4 years agoAuto merge of #62596 - cuviper:expect_none, r=rkruppe
bors [Wed, 17 Jul 2019 08:29:02 +0000 (08:29 +0000)]
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`.

4 years agoUpdate rustfmt to the latest master
topecongiro [Tue, 16 Jul 2019 10:35:22 +0000 (19:35 +0900)]
Update rustfmt to the latest master

4 years agoUpdate rustfmt to 1.3.3
topecongiro [Mon, 15 Jul 2019 13:51:42 +0000 (22:51 +0900)]
Update rustfmt to 1.3.3

4 years agoAuto merge of #62714 - matthiaskrgr:submodule_upd, r=oli-obk
bors [Wed, 17 Jul 2019 02:49:51 +0000 (02:49 +0000)]
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
````

4 years agoAuto merge of #62592 - nikic:actually-update-llvm, r=alexcrichton
bors [Tue, 16 Jul 2019 23:05:06 +0000 (23:05 +0000)]
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

4 years agoAuto merge of #61946 - BaoshanPang:vxworks, r=alexcrichton
bors [Tue, 16 Jul 2019 19:26:53 +0000 (19:26 +0000)]
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

4 years agoAuto merge of #62723 - Mark-Simulacrum:rollup-vjdzlam, r=Mark-Simulacrum
bors [Tue, 16 Jul 2019 15:50:44 +0000 (15:50 +0000)]
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

4 years agoRollup merge of #62722 - alexcrichton:unlimit-tools, r=pietroalbini
Mark Rousskov [Tue, 16 Jul 2019 15:39:00 +0000 (11:39 -0400)]
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.

4 years agoRollup merge of #62703 - fakenine:normalize_use_of_backticks_compiler_messages_p6...
Mark Rousskov [Tue, 16 Jul 2019 15:38:58 +0000 (11:38 -0400)]
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

4 years agoRollup merge of #62702 - fakenine:normalize_use_of_backticks_compiler_messages_p5...
Mark Rousskov [Tue, 16 Jul 2019 15:38:57 +0000 (11:38 -0400)]
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

4 years agoRollup merge of #62693 - alexcrichton:rm-travis-appveyor, r=Mark-Simulacrum
Mark Rousskov [Tue, 16 Jul 2019 15:38:55 +0000 (11:38 -0400)]
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!

4 years agoRollup merge of #62683 - c410-f3r:fn-attrs-doc, r=Centril
Mark Rousskov [Tue, 16 Jul 2019 15:38:54 +0000 (11:38 -0400)]
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

4 years agoRollup merge of #62666 - estebank:preempt-ice, r=eddyb
Mark Rousskov [Tue, 16 Jul 2019 15:38:52 +0000 (11:38 -0400)]
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

4 years agoci: Bump time limit of tools builder on PRs
Alex Crichton [Tue, 16 Jul 2019 15:25:01 +0000 (08:25 -0700)]
ci: Bump time limit of tools builder on PRs

This should give it enough time to finish instead of being killed after
an hour.

4 years agoAuto merge of #62322 - wesleywiser:promoted_query, r=oli-obk
bors [Tue, 16 Jul 2019 12:19:35 +0000 (12:19 +0000)]
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

4 years agosubmodules: update clippy from b0290424 to 164310dd
Matthias Krüger [Tue, 16 Jul 2019 08:13:24 +0000 (10:13 +0200)]
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
````

4 years agoAdd supporting for vxWorks
Baoshan Pang [Tue, 16 Jul 2019 06:57:53 +0000 (23:57 -0700)]
Add supporting for vxWorks

r? @alexcrichton

4 years agoSuggested change
Ferdia McKeogh [Tue, 16 Jul 2019 05:51:13 +0000 (07:51 +0200)]
Suggested change

4 years agoCheck that trait is exported or public before adding intercrate ambiguity hint
Ferdia McKeogh [Mon, 15 Jul 2019 17:45:51 +0000 (19:45 +0200)]
Check that trait is exported or public before adding intercrate ambiguity hint

4 years agoAuto merge of #62704 - Mark-Simulacrum:rollup-oi94s2j, r=Mark-Simulacrum
bors [Tue, 16 Jul 2019 05:03:20 +0000 (05:03 +0000)]
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

4 years agoRollup merge of #62698 - jethrogb:jb/sgx-llvm-target, r=alexcrichton
Mark Rousskov [Mon, 15 Jul 2019 23:55:16 +0000 (19:55 -0400)]
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

4 years agoRollup merge of #62689 - 0e4ef622:patch-1, r=Xanewok
Mark Rousskov [Mon, 15 Jul 2019 23:55:15 +0000 (19:55 -0400)]
Rollup merge of #62689 - 0e4ef622:patch-1, r=Xanewok

Fix typo in RawWaker::new documentation

poiner -> pointer

4 years agoRollup merge of #62685 - nathanwhit:as_ref_suggest_fix, r=estebank
Mark Rousskov [Mon, 15 Jul 2019 23:55:14 +0000 (19:55 -0400)]
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.

4 years agoRollup merge of #62680 - ecstatic-morse:fix-dataflow-results-consumer, r=matthewjasper
Mark Rousskov [Mon, 15 Jul 2019 23:55:12 +0000 (19:55 -0400)]
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.

4 years agoRollup merge of #62673 - RalfJung:validity-msg, r=oli-obk
Mark Rousskov [Mon, 15 Jul 2019 23:55:11 +0000 (19:55 -0400)]
Rollup merge of #62673 - RalfJung:validity-msg, r=oli-obk

miri validation: better error messages for dangling references

Cc @oli-obk

4 years agoRollup merge of #62668 - goodmanjonathan:fix-62660, r=estebank
Mark Rousskov [Mon, 15 Jul 2019 23:55:10 +0000 (19:55 -0400)]
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.

4 years agoRollup merge of #62662 - DutchGhost:fix_space, r=sfackler
Mark Rousskov [Mon, 15 Jul 2019 23:55:08 +0000 (19:55 -0400)]
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`.

4 years agoRollup merge of #62646 - estebank:wording, r=petrochenkov
Mark Rousskov [Mon, 15 Jul 2019 23:55:07 +0000 (19:55 -0400)]
Rollup merge of #62646 - estebank:wording, r=petrochenkov

Tweak wording in feature gate errors

4 years agoRollup merge of #62639 - immunant:invariant_valistimpl, r=eddyb
Mark Rousskov [Mon, 15 Jul 2019 23:55:06 +0000 (19:55 -0400)]
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

4 years agoRollup merge of #62634 - llogiq:uninit-array-docs, r=RalfJung
Mark Rousskov [Mon, 15 Jul 2019 23:55:04 +0000 (19:55 -0400)]
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

4 years agoRollup merge of #62533 - GuillaumeGomez:missing-urls-CannotReallocInPlace, r=QuietMis...
Mark Rousskov [Mon, 15 Jul 2019 23:55:03 +0000 (19:55 -0400)]
Rollup merge of #62533 - GuillaumeGomez:missing-urls-CannotReallocInPlace, r=QuietMisdreavus

Add missing links for CannotReallocInPlace type

r? @QuietMisdreavus

4 years agoRollup merge of #62491 - GuillaumeGomez:fix-pin-urls-for-option, r=QuietMisdreavus
Mark Rousskov [Mon, 15 Jul 2019 23:55:01 +0000 (19:55 -0400)]
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

4 years agoRollup merge of #62405 - hellow554:patch-1, r=varkor
Mark Rousskov [Mon, 15 Jul 2019 23:55:00 +0000 (19:55 -0400)]
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

4 years agoRollup merge of #62103 - RalfJung:debug-assert, r=alexcrichton
Mark Rousskov [Mon, 15 Jul 2019 23:54:58 +0000 (19:54 -0400)]
Rollup merge of #62103 - RalfJung:debug-assert, r=alexcrichton

Add debug assertions to write_bytes and copy*

Looks like @nitnelave  went MIA in https://github.com/rust-lang/rust/pull/58783, so I am re-submitting their PR, tweaked just a bit. I took care to preserve commit authorship.

Cc https://github.com/rust-lang/rust/issues/53871

4 years agonormalize use of backticks in compiler messages for libsyntax/parse
Samy Kacimi [Mon, 15 Jul 2019 21:23:39 +0000 (23:23 +0200)]
normalize use of backticks in compiler messages for libsyntax/parse

https://github.com/rust-lang/rust/issues/60532

4 years agonormalize use of backticks in compiler messages for libsyntax_ext
Samy Kacimi [Mon, 15 Jul 2019 19:54:58 +0000 (21:54 +0200)]
normalize use of backticks in compiler messages for libsyntax_ext

https://github.com/rust-lang/rust/issues/60532

4 years agoSGX target: don't pretend to be GNU/Linux to LLVM
Jethro Beekman [Mon, 15 Jul 2019 18:23:39 +0000 (11:23 -0700)]
SGX target: don't pretend to be GNU/Linux to LLVM

4 years agoCompile new InstrProfilingPlatformWindows.c file
Nikita Popov [Mon, 15 Jul 2019 17:14:19 +0000 (19:14 +0200)]
Compile new InstrProfilingPlatformWindows.c file

4 years agoci: Remove Travis/AppVeyor configuration
Alex Crichton [Mon, 15 Jul 2019 16:18:32 +0000 (09:18 -0700)]
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!

4 years agoAuto merge of #62687 - gnzlbg:stdarch, r=alexcrichton
bors [Mon, 15 Jul 2019 16:00:48 +0000 (16:00 +0000)]
Auto merge of #62687 - gnzlbg:stdarch, r=alexcrichton

Update stdsimd to stdarch

The stdsimd repository no longer lives in `rust-lang-nursery/stdsimd` but now lives in `rust-lang/stdarch` instead. This PR updates the stdsimd submodule to the stdarch master branch.

4 years agoFix typo in RawWaker::new documentation
0e4ef622 [Mon, 15 Jul 2019 15:03:53 +0000 (10:03 -0500)]
Fix typo in RawWaker::new documentation

poiner -> pointer

4 years agobump compiler_builtins
Ralf Jung [Mon, 15 Jul 2019 14:58:07 +0000 (16:58 +0200)]
bump compiler_builtins

4 years agoignore some codegen tests in debug mode
Ralf Jung [Tue, 25 Jun 2019 07:40:50 +0000 (09:40 +0200)]
ignore some codegen tests in debug mode

4 years agoAdd debug assertions to write_bytes and copy*
Valentin Tolmer [Wed, 27 Feb 2019 16:10:59 +0000 (17:10 +0100)]
Add debug assertions to write_bytes and copy*

4 years agoUpdate stdarch
gnzlbg [Mon, 15 Jul 2019 14:29:12 +0000 (16:29 +0200)]
Update stdarch

4 years agoAuto merge of #62667 - petrochenkov:printattr2, r=Mark-Simulacrum
bors [Mon, 15 Jul 2019 12:29:53 +0000 (12:29 +0000)]
Auto merge of #62667 - petrochenkov:printattr2, r=Mark-Simulacrum

pprust: Improve pretty-printing of delimited token groups

The commit "Do not convert attributes into `MetaItem`s for printing" fixes https://github.com/rust-lang/rust/issues/62628.

Other commits fix regressions from abandoning `MetaItem`s, and make formatting for attributes, macro calls, macro definitions and other delimited token groups better and more consistent.

r? @Mark-Simulacrum

4 years agoAdd rtm and f16c features to libcore
gnzlbg [Mon, 15 Jul 2019 11:57:34 +0000 (13:57 +0200)]
Add rtm and f16c features to libcore

4 years agoUpdate the stdarch submodule
gnzlbg [Mon, 15 Jul 2019 11:53:44 +0000 (13:53 +0200)]
Update the stdarch submodule

4 years agoRelax checks in pgo-instrumentation codegen test
Nikita Popov [Mon, 15 Jul 2019 11:59:55 +0000 (13:59 +0200)]
Relax checks in pgo-instrumentation codegen test

Don't require a specific order for the per-function globals, and
don't require the locals to have private linkage (apparently
internal linkage is also possible).

4 years agopprust: Support `macro` macros
Vadim Petrochenkov [Sun, 14 Jul 2019 13:09:39 +0000 (16:09 +0300)]
pprust: Support `macro` macros

4 years agopprust: Fix formatting regressions from the previous commits
Vadim Petrochenkov [Sat, 13 Jul 2019 21:11:59 +0000 (00:11 +0300)]
pprust: Fix formatting regressions from the previous commits

Fix some remaining cases of bad formatting
Update some failing tests

4 years agopprust: Do not convert attributes into `MetaItem`s for printing
Vadim Petrochenkov [Sat, 13 Jul 2019 20:24:58 +0000 (23:24 +0300)]
pprust: Do not convert attributes into `MetaItem`s for printing

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

4 years agopprust: Remove the box from `print_tts`
Vadim Petrochenkov [Sat, 13 Jul 2019 20:11:04 +0000 (23:11 +0300)]
pprust: Remove the box from `print_tts`

Wrap the whole attribute into a box instead

4 years agopprust: Use `print_mac_common` for delimited token groups
Vadim Petrochenkov [Sat, 13 Jul 2019 20:08:29 +0000 (23:08 +0300)]
pprust: Use `print_mac_common` for delimited token groups

4 years agopprust: Use `print_mac_common` for attributes
Vadim Petrochenkov [Sat, 13 Jul 2019 18:01:04 +0000 (21:01 +0300)]
pprust: Use `print_mac_common` for attributes

4 years agopprust: Use `print_mac_common` for `macro_rules` definitions
Vadim Petrochenkov [Sat, 13 Jul 2019 17:35:46 +0000 (20:35 +0300)]
pprust: Use `print_mac_common` for `macro_rules` definitions

4 years agopprust: Move some methods to the `PrintState` trait
Vadim Petrochenkov [Sat, 13 Jul 2019 16:11:07 +0000 (19:11 +0300)]
pprust: Move some methods to the `PrintState` trait

So that path and macro argument printing code can be shared

4 years agoAuto merge of #62629 - matthewjasper:cleanup-borrowck-errors, r=petrochenkov
bors [Mon, 15 Jul 2019 09:05:18 +0000 (09:05 +0000)]
Auto merge of #62629 - matthewjasper:cleanup-borrowck-errors, r=petrochenkov

Cleanup borrowck errors

This removes some of the unnecessary code that allowed sharing error reporting between two borrow checkers.

closes #59193

4 years agoDon't add extra passes into the function pass manager
Nikita Popov [Sat, 13 Jul 2019 18:17:16 +0000 (20:17 +0200)]
Don't add extra passes into the function pass manager

Exception for specific cases like linting, additional passes should
be going into the module pass manager (even if they are function
passes). The separate function pass manager is only used for very
early optimization passes.

Rather than apparending passes to the MPM, use the OptimizerLast
and EnabledOnOptLevel0 pass manager builder extension hooks, which
allow adding passes directly before finalization (alias
canonicalization and name-anon-globals).

The main effect and purpose of this change is to add sanitizer
passes at the end of the pipeline, which is where they belong.
In LLVM 9 the address sanitizer can't be used as a pass in the
early function pass manager, because it has a dependence on a
module-level analysis pass.

4 years agoDisable building of LLDB
Nikita Popov [Thu, 11 Jul 2019 16:06:01 +0000 (18:06 +0200)]
Disable building of LLDB

4 years agoUpdate transparent aggregate codegen test for byval changes
Nikita Popov [Sun, 7 Jul 2019 18:19:19 +0000 (20:19 +0200)]
Update transparent aggregate codegen test for byval changes

4 years agoAuto merge of #62674 - RalfJung:miri-abi, r=eddyb
bors [Mon, 15 Jul 2019 05:40:41 +0000 (05:40 +0000)]
Auto merge of #62674 - RalfJung:miri-abi, r=eddyb

RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust

r? @eddyb

4 years agoAdd info about undefined behavior to as_ref suggestions
nathanwhit [Sun, 14 Jul 2019 19:05:25 +0000 (15:05 -0400)]
Add info about undefined behavior to as_ref suggestions

4 years agoAuto merge of #62670 - estebank:extern-fn-with-body, r=petrochenkov
bors [Mon, 15 Jul 2019 02:13:55 +0000 (02:13 +0000)]
Auto merge of #62670 - estebank:extern-fn-with-body, r=petrochenkov

Detect `fn` with a body in an `extern` block

Fix #62109.

4 years agoAdd newline
Caio [Mon, 15 Jul 2019 01:28:42 +0000 (22:28 -0300)]
Add newline

4 years agoMake VaListImpl<'f> invariant over the 'f lifetime
Andrei Homescu [Fri, 12 Jul 2019 22:32:46 +0000 (15:32 -0700)]
Make VaListImpl<'f> invariant over the 'f lifetime

4 years agoChapter for param_attrs
Caio [Mon, 15 Jul 2019 01:03:19 +0000 (22:03 -0300)]
Chapter for param_attrs

4 years agoAuto merge of #62643 - estebank:parse-recovery-type-errs, r=petrochenkov
bors [Sun, 14 Jul 2019 22:51:05 +0000 (22:51 +0000)]
Auto merge of #62643 - estebank:parse-recovery-type-errs, r=petrochenkov

Do not emit type errors after parse error in last statement of block

When recovering from a parse error inside a block, do not emit type
errors generating on that block's recovered return expression.

Fix #57383.

4 years agoActually call `visit_block_entry` in `DataflowResultsConsumer`
Dylan MacKenzie [Tue, 9 Jul 2019 21:28:02 +0000 (14:28 -0700)]
Actually call `visit_block_entry` in `DataflowResultsConsumer`

Previously, this callback was never actually called.

4 years ago`pub(crate)` -> `crate`
Matthew Jasper [Sat, 13 Jul 2019 08:37:19 +0000 (09:37 +0100)]
`pub(crate)` -> `crate`

The borrow checker code is already using `crate` extensively, so prefer
being consistent with it.

4 years agoMove suggest_ref_mut into rustc_mir::borrow_check
Matthew Jasper [Fri, 12 Jul 2019 19:42:21 +0000 (20:42 +0100)]
Move suggest_ref_mut into rustc_mir::borrow_check

4 years agoRemove BorrowckErrors trait
Matthew Jasper [Fri, 12 Jul 2019 19:37:06 +0000 (20:37 +0100)]
Remove BorrowckErrors trait

Its methods are now inherent methods of `MirBorrowckCtxt`

4 years agoRemove rustc_mir::borrowck_errors::Origin
Matthew Jasper [Fri, 12 Jul 2019 19:05:33 +0000 (20:05 +0100)]
Remove rustc_mir::borrowck_errors::Origin

4 years agoRemove unused BorrowckErrors methods
Matthew Jasper [Fri, 12 Jul 2019 18:59:25 +0000 (19:59 +0100)]
Remove unused BorrowckErrors methods

4 years agoAuto merge of #62638 - estebank:issue-62554, r=petrochenkov
bors [Sun, 14 Jul 2019 17:29:17 +0000 (17:29 +0000)]
Auto merge of #62638 - estebank:issue-62554, r=petrochenkov

Use snippet instead of pprinting statement

Fix #62554.

4 years agoAuto merge of #62610 - Stargateur:fix-miri-error-cstring-into_inner, r=RalfJung
bors [Sun, 14 Jul 2019 13:52:40 +0000 (13:52 +0000)]
Auto merge of #62610 - Stargateur:fix-miri-error-cstring-into_inner, r=RalfJung

Fix miri error in into_inner() of CString

Fix #62553

I choice to not transmute because I think it's more unsafe and in case the structure change this code should always work.

r? @RalfJung

4 years agoLess unsafe in the array example of MaybeUninit docs
Andre Bogus [Fri, 12 Jul 2019 20:13:48 +0000 (22:13 +0200)]
Less unsafe in the array example of MaybeUninit docs

4 years agoremove outdated comment
Ralf Jung [Sun, 14 Jul 2019 10:23:52 +0000 (12:23 +0200)]
remove outdated comment

4 years agoAuto merge of #62464 - GuillaumeGomez:add-missing-urls-osstr, r=QuietMisdreavus
bors [Sun, 14 Jul 2019 10:23:05 +0000 (10:23 +0000)]
Auto merge of #62464 - GuillaumeGomez:add-missing-urls-osstr, r=QuietMisdreavus

Add missing urls for osstr

r? @QuietMisdreavus

4 years agoRustIntrinsic and PlatformIntrinsic are also the same ABI as Rust
Ralf Jung [Sun, 14 Jul 2019 09:58:12 +0000 (11:58 +0200)]
RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust

4 years agomiri validation: better error messages for dangling references
Ralf Jung [Sun, 14 Jul 2019 09:39:10 +0000 (11:39 +0200)]
miri validation: better error messages for dangling references

4 years agoreview comment
Esteban Küber [Sun, 14 Jul 2019 05:25:23 +0000 (22:25 -0700)]
review comment

4 years agoAuto merge of #62331 - wesleywiser:fix_early_return_leak, r=matthewjasper
bors [Sun, 14 Jul 2019 05:25:08 +0000 (05:25 +0000)]
Auto merge of #62331 - wesleywiser:fix_early_return_leak, r=matthewjasper

Fix leak when early returning out of `box` syntax

Fixes #62289

r? @matthewjasper

4 years agoDetect `fn` with a body in an `extern` block
Esteban Küber [Sun, 14 Jul 2019 04:15:21 +0000 (21:15 -0700)]
Detect `fn` with a body in an `extern` block

4 years agoCheck for lldb existences
Lzu Tao [Sun, 14 Jul 2019 04:19:39 +0000 (04:19 +0000)]
Check for lldb existences

4 years agoSuggest assoc type on type not found in trait method definition
Esteban Küber [Sun, 14 Jul 2019 02:20:28 +0000 (19:20 -0700)]
Suggest assoc type on type not found in trait method definition

4 years agoDon't drop DiagnosticBuilder if parsing fails
Jonathan Goodman [Sun, 14 Jul 2019 00:34:06 +0000 (19:34 -0500)]
Don't drop DiagnosticBuilder if parsing fails

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.

4 years agoAuto merge of #62560 - pietroalbini:tools-builders-on-prs, r=alexcrichton
bors [Sun, 14 Jul 2019 00:20:54 +0000 (00:20 +0000)]
Auto merge of #62560 - pietroalbini:tools-builders-on-prs, r=alexcrichton

ci: add a pr builder to test tools when submodules are updated

This PR adds the x86_64-gnu-tools builders to PRs where submodules are updated.

Since it's not possible to *start* the builder only when submodule changes are detected, I opted into adding a "decider" task at the start of the job which sets the `SKIP_JOB` environment variable when submodules are not updated, and I gated the most time-consuming tasks (the actual build and artifacts upload) on the variable not being there. All of this is conditionally included in the `steps/run.yml` only when a template parameter is present, so it should only affect that builder on PRs.

The cost for this should be a dummy builder running for 2/3 minutes for each PR, and we should be able to handle it.

Fixes https://github.com/rust-lang/rust/issues/61837
r? @alexcrichton

4 years agoCancel unemitted diagnostics during error recovery
Esteban Küber [Sat, 13 Jul 2019 23:04:12 +0000 (16:04 -0700)]
Cancel unemitted diagnostics during error recovery