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.
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)
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
````
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
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
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
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!
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
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
````
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.
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.
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
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
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
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!
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.