Commit Graph

96381 Commits

Author SHA1 Message Date
Mark Rousskov
7fc80b6bc6
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.
2019-07-18 11:29:36 -04:00
bors
4ed008a420 Auto merge of #62682 - alessandrod:issue-58375, r=eddyb
Normalize type parameters in create_mono_items_for_default_impls.

Fix for https://github.com/rust-lang/rust/issues/58375. I've added a test in `src/tests/run-pass` to reproduce the bug, not sure that's the best place for it.

See https://github.com/rust-lang/rust/issues/58375#issuecomment-509156977 for more context.
2019-07-18 13:09:01 +00:00
Vadim Petrochenkov
1b4fbfca41 resolve: Support resolving macro paths without macro kind restrictions 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
a7726ce086 resolve: Attempt to resolve unresolved paths in macro namespace 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
3845a08a55 resolve: Move some common code into the scope visitor 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
329c05251a resolve: Visit all scopes to collect suggestion candidates for unresolved macros 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
79f0d88de8 resolve: Use feature(custom_attribute) fallback only if the feature is enabled
Normally `#![feature(...)]` shouldn't change behavior, but custom attributes in particular are in the process of retirement, and we should not produce a message telling to enable them.
It also helps with unifying diagnostics for unresolved macros.
2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
1e1b081e0e resolve: Decouple scope visiting process from visitor actions 2019-07-18 13:42:45 +03:00
Vadim Petrochenkov
b302f62cbc resolve: Rename WhereToResolve into Scope
Also move it into the crate root, it's no longer used for macros only
2019-07-18 13:42:44 +03:00
Vadim Petrochenkov
d0bcebd5c5 resolve: Move some diagnostic code into diagnostics.rs 2019-07-18 13:42:44 +03:00
Saleem Jaffer
589f6a7dc6 tries to refactor InterpError in mir 2019-07-18 14:52:30 +05:30
bors
21d5b8bf0c Auto merge of #62671 - lzutao:tidy-lldb, r=alexcrichton
Check for lldb existences
2019-07-18 08:38:56 +00:00
Jeremy Fitzhardinge
f7d53a96ca Emit artifact notifications for dependency files 2019-07-18 01:02:22 -07:00
Giles Cope
c56c5a861a Self-referencial type renamed to recursive type. 2019-07-18 07:30:51 +01:00
bors
2c3b05d90d 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.
2019-07-18 05:07:36 +00:00
Samuel Holland
60529a72de Disable simd_select_bitmask test on big endian
Per #59356 it is expected that the interpretation of the bitmask depends
on target endianness.

Closes #59356
2019-07-17 20:26:59 -05:00
bors
efb7457915 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)
2019-07-17 23:20:20 +00:00
Samy Kacimi
e5e1397adb
normalize use of backticks in compiler messages for librustc/lint
https://github.com/rust-lang/rust/issues/60532
2019-07-17 22:49:48 +02:00
Giles Cope
387b6c3e78 Test case for #62506. 2019-07-17 21:38:08 +01:00
Eric Huss
04538c680c Update mdbook, cargo, books
This updates the last of the books using mdbook 0.1, finally
removing it from the build.
2019-07-17 12:46:36 -07:00
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