Skip to content
Permalink
Browse files

Auto merge of #61394 - pietroalbini:rollup-lzugnb4, r=pietroalbini

Rollup of 11 pull requests

Successful merges:

 - #60897 (error: remove StringError from Debug output)
 - #61304 (Speed up Azure CI installing Windows dependencies)
 - #61319 (Swap order of `unsafe async fn` to `async unsafe fn`)
 - #61342 (Set ellipsis_inclusive_range_patterns lint to warn)
 - #61344 (Add regression test for const generics ICE)
 - #61359 (Fix links in Deref documentation)
 - #61363 (Stabilize iter_nth_back feature)
 - #61369 (Fixed lifetime misspelling)
 - #61372 (Migrate some books to mdbook version 0.2)
 - #61374 (Explicitly suggest 'type_ascription' feature)
 - #61382 (Fixed a typo in core::convert::AsMut)

Failed merges:

r? @ghost
  • Loading branch information...
bors committed Jun 1, 2019
2 parents 041bec8 + e32386d commit 84f729d0d4dade321210b78f56bedd88025eeff6
Showing with 227 additions and 124 deletions.
  1. +1 −1 .azure-pipelines/steps/install-clang.yml
  2. +1 −1 .azure-pipelines/steps/install-sccache.yml
  3. +3 −3 .azure-pipelines/steps/install-windows-build-deps.yml
  4. +3 −3 src/bootstrap/doc.rs
  5. +4 −4 src/doc/rustdoc/src/command-line-arguments.md
  6. +2 −2 src/doc/rustdoc/src/passes.md
  7. +1 −1 src/doc/unstable-book/src/language-features/asm.md
  8. +1 −1 src/doc/unstable-book/src/language-features/box-patterns.md
  9. +1 −1 src/doc/unstable-book/src/language-features/box-syntax.md
  10. +1 −1 src/doc/unstable-book/src/language-features/global-asm.md
  11. +1 −1 src/doc/unstable-book/src/language-features/lang-items.md
  12. +1 −1 src/doc/unstable-book/src/language-features/non-ascii-idents.md
  13. +1 −1 src/doc/unstable-book/src/language-features/plugin-registrar.md
  14. +5 −5 src/doc/unstable-book/src/language-features/plugin.md
  15. +1 −1 src/doc/unstable-book/src/language-features/unboxed-closures.md
  16. +1 −1 src/doc/unstable-book/src/library-features/fn-traits.md
  17. +1 −1 src/doc/unstable-book/src/library-features/fnbox.md
  18. +1 −1 src/doc/unstable-book/src/the-unstable-book.md
  19. +0 −1 src/liballoc/lib.rs
  20. +2 −2 src/libcore/convert.rs
  21. +1 −4 src/libcore/iter/traits/double_ended.rs
  22. +6 −6 src/libcore/ops/deref.rs
  23. +0 −1 src/libcore/tests/lib.rs
  24. +1 −1 src/librustc_codegen_ssa/README.md
  25. +1 −1 src/librustc_lint/builtin.rs
  26. +7 −1 src/libstd/error.rs
  27. +2 −2 src/libsyntax/parse/diagnostics.rs
  28. +34 −37 src/libsyntax/parse/parser.rs
  29. +14 −0 src/test/run-pass/associated-consts/associated-const-range-match-patterns.rs
  30. +6 −0 src/test/run-pass/binding/pat-ranges.rs
  31. +2 −0 src/test/run-pass/inc-range-pat.rs
  32. +1 −0 src/test/run-pass/issues/issue-15881-model-lexer-dotdotdot.rs
  33. +1 −1 src/test/run-pass/mir/mir_build_match_comparisons.rs
  34. +1 −1 src/test/ui/async-await/async-await.rs
  35. +1 −1 src/test/ui/async-await/await-macro.rs
  36. +18 −0 src/test/ui/const-generics/const-generic-array-wrapper.rs
  37. +6 −0 src/test/ui/const-generics/const-generic-array-wrapper.stderr
  38. +1 −1 src/test/ui/issues/issue-22644.stderr
  39. +1 −1 src/test/ui/issues/issue-34255-1.stderr
  40. +1 −1 src/test/ui/lifetime_starts_expressions.stderr
  41. +25 −3 src/test/ui/lint/issue-54538-unused-parens-lint.rs
  42. +44 −8 src/test/ui/lint/issue-54538-unused-parens-lint.stderr
  43. +9 −9 src/test/ui/match/match-range-fail-dominate.rs
  44. +7 −7 src/test/ui/match/match-range-fail-dominate.stderr
  45. +3 −3 src/test/ui/nll/issue-57960.rs
  46. +1 −1 src/test/ui/parser/recover-from-bad-variant.stderr
  47. +1 −1 src/test/ui/type/type-ascription-instead-of-statement-end.stderr
@@ -27,7 +27,7 @@ steps:
# Original downloaded here came from
# http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
- script: |
powershell -Command "iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.exe"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.exe"
set CLANG_DIR=%CD%\citools\clang-rust
%TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR%
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe
@@ -9,7 +9,7 @@ steps:

- script: |
md sccache
powershell -Command "iwr -outf sccache\sccache.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
echo ##vso[task.prependpath]%CD%\sccache
displayName: Install sccache (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
@@ -54,9 +54,9 @@ steps:
# Note that we don't literally overwrite the gdb.exe binary because it appears
# to just use gdborig.exe, so that's the binary we deal with instead.
- script: |
powershell -Command "iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
7z x -y %MINGW_ARCHIVE% > nul
powershell -Command "iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%\bin\gdborig.exe
echo ##vso[task.prependpath]%CD%\%MINGW_DIR%\bin
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],''))
@@ -81,7 +81,7 @@ steps:
# Note that this is originally from the github releases patch of Ninja
- script: |
md ninja
powershell -Command "iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-03-15-ninja-win.zip"
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-03-15-ninja-win.zip"
7z x -oninja 2017-03-15-ninja-win.zip
del 2017-03-15-ninja-win.zip
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja
@@ -62,11 +62,11 @@ macro_rules! book {
book!(
EditionGuide, "src/doc/edition-guide", "edition-guide", RustbookVersion::MdBook2;
EmbeddedBook, "src/doc/embedded-book", "embedded-book", RustbookVersion::MdBook2;
Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook1;
Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook2;
Reference, "src/doc/reference", "reference", RustbookVersion::MdBook1;
RustByExample, "src/doc/rust-by-example", "rust-by-example", RustbookVersion::MdBook1;
RustcBook, "src/doc/rustc", "rustc", RustbookVersion::MdBook1;
RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::MdBook1;
RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::MdBook2;
);

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@@ -134,7 +134,7 @@ impl Step for UnstableBook {
target: self.target,
name: INTERNER.intern_str("unstable-book"),
src: builder.md_doc_out(self.target),
version: RustbookVersion::MdBook1,
version: RustbookVersion::MdBook2,
})
}
}
@@ -178,7 +178,7 @@ $ rustdoc src/lib.rs --passes strip-priv-imports
An argument of "list" will print a list of possible "rustdoc passes", and other
arguments will be the name of which passes to run in addition to the defaults.

For more details on passes, see [the chapter on them](passes.html).
For more details on passes, see [the chapter on them](passes.md).

See also `--no-defaults`.

@@ -194,7 +194,7 @@ By default, `rustdoc` will run several passes over your code. This
removes those defaults, allowing you to use `--passes` to specify
exactly which passes you want.

For more details on passes, see [the chapter on them](passes.html).
For more details on passes, see [the chapter on them](passes.md).

See also `--passes`.

@@ -207,7 +207,7 @@ $ rustdoc src/lib.rs --test
```

This flag will run your code examples as tests. For more, see [the chapter
on documentation tests](documentation-tests.html).
on documentation tests](documentation-tests.md).

See also `--test-args`.

@@ -220,7 +220,7 @@ $ rustdoc src/lib.rs --test --test-args ignored
```

This flag will pass options to the test runner when running documentation tests.
For more, see [the chapter on documentation tests](documentation-tests.html).
For more, see [the chapter on documentation tests](documentation-tests.md).

See also `--test`.

@@ -5,8 +5,8 @@ Rustdoc has a concept called "passes". These are transformations that

In addition to the passes below, check out the docs for these flags:

* [`--passes`](command-line-arguments.html#a--passes-add-more-rustdoc-passes)
* [`--no-defaults`](command-line-arguments.html#a--no-defaults-dont-run-default-passes)
* [`--passes`](command-line-arguments.md#--passes-add-more-rustdoc-passes)
* [`--no-defaults`](command-line-arguments.md#--no-defaults-dont-run-default-passes)

## Default passes

@@ -190,4 +190,4 @@ constraints, etc.
[llvm-docs]: http://llvm.org/docs/LangRef.html#inline-assembler-expressions

If you need more power and don't mind losing some of the niceties of
`asm!`, check out [global_asm](language-features/global-asm.html).
`asm!`, check out [global_asm](global-asm.md).
@@ -4,7 +4,7 @@ The tracking issue for this feature is: [#29641]

[#29641]: https://github.com/rust-lang/rust/issues/29641

See also [`box_syntax`](language-features/box-syntax.html)
See also [`box_syntax`](box-syntax.md)

------------------------

@@ -4,7 +4,7 @@ The tracking issue for this feature is: [#49733]

[#49733]: https://github.com/rust-lang/rust/issues/49733

See also [`box_patterns`](language-features/box-patterns.html)
See also [`box_patterns`](box-patterns.md)

------------------------

@@ -75,4 +75,4 @@ usages and placed the larger, single usage in the crate root.
If you don't need quite as much power and flexibility as
`global_asm!` provides, and you don't mind restricting your inline
assembly to `fn` bodies only, you might try the
[asm](language-features/asm.html) feature instead.
[asm](asm.md) feature instead.
@@ -192,7 +192,7 @@ such as "```undefined reference to `__rust_probestack'```". Using this crate
also requires enabling the library feature `compiler_builtins_lib`. You can read
more about this [here][compiler-builtins-lib].

[compiler-builtins-lib]: library-features/compiler-builtins-lib.html
[compiler-builtins-lib]: ../library-features/compiler-builtins-lib.md

## More about the language items

@@ -45,4 +45,4 @@ that does _not_ occur in the set of [strict keywords].
[`XID_start`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Start%3A%5D&abb=on&g=&i=
[`XID_continue`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Continue%3A%5D&abb=on&g=&i=
[strict keywords]: ../reference/keywords.html#strict-keywords
[strict keywords]: ../../reference/keywords.md#strict-keywords
@@ -8,6 +8,6 @@ This feature is part of "compiler plugins." It will often be used with the
[`plugin`] and `rustc_private` features as well. For more details, see
their docs.

[`plugin`]: language-features/plugin.html
[`plugin`]: plugin.md

------------------------
@@ -8,7 +8,7 @@ The tracking issue for this feature is: [#29597]
This feature is part of "compiler plugins." It will often be used with the
[`plugin_registrar`] and `rustc_private` features.

[`plugin_registrar`]: language-features/plugin-registrar.html
[`plugin_registrar`]: plugin-registrar.md

------------------------

@@ -39,7 +39,7 @@ of a library.

Plugins can extend Rust's syntax in various ways. One kind of syntax extension
is the procedural macro. These are invoked the same way as [ordinary
macros](../book/macros.html), but the expansion is performed by arbitrary Rust
macros](../../book/macros.md), but the expansion is performed by arbitrary Rust
code that manipulates syntax trees at
compile time.

@@ -130,7 +130,7 @@ The advantages over a simple `fn(&str) -> u32` are:
a way to define new literal syntax for any data type.
In addition to procedural macros, you can define new
[`derive`](../reference/attributes/derive.html)-like attributes and other kinds
[`derive`](../../reference/attributes/derive.md)-like attributes and other kinds
of extensions. See `Registry::register_syntax_extension` and the
`SyntaxExtension` enum. For a more involved macro example, see
[`regex_macros`](https://github.com/rust-lang/regex/blob/master/regex_macros/src/lib.rs).
@@ -174,7 +174,7 @@ quasiquote as an ordinary plugin library.
# Lint plugins
Plugins can extend [Rust's lint
infrastructure](../reference/attributes/diagnostics.html#lint-check-attributes) with
infrastructure](../../reference/attributes/diagnostics.md#lint-check-attributes) with
additional checks for code style, safety, etc. Now let's write a plugin
[`lint_plugin_test.rs`](https://github.com/rust-lang/rust/blob/master/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs)
that warns about any item named `lintme`.
@@ -253,7 +253,7 @@ mostly use the same infrastructure as lint plugins, and provide examples of how
to access type information.
Lints defined by plugins are controlled by the usual [attributes and compiler
flags](../reference/attributes/diagnostics.html#lint-check-attributes), e.g.
flags](../../reference/attributes/diagnostics.md#lint-check-attributes), e.g.
`#[allow(test_lint)]` or `-A test-lint`. These identifiers are derived from the
first argument to `declare_lint!`, with appropriate case and punctuation
conversion.
@@ -2,7 +2,7 @@

The tracking issue for this feature is [#29625]

See Also: [`fn_traits`](library-features/fn-traits.html)
See Also: [`fn_traits`](../library-features/fn-traits.md)

[#29625]: https://github.com/rust-lang/rust/issues/29625

@@ -2,7 +2,7 @@

The tracking issue for this feature is [#29625]

See Also: [`unboxed_closures`](language-features/unboxed-closures.html)
See Also: [`unboxed_closures`](../language-features/unboxed-closures.md)

[#29625]: https://github.com/rust-lang/rust/issues/29625

@@ -27,6 +27,6 @@ impl<A, F> Fn for &F where F: Fn<A> + ?Sized {}

Before the introduction of [`unsized_locals`][unsized_locals], we had been unable to provide the former impls. That means, unlike `&dyn Fn()` or `&mut dyn FnMut()` we could not use `Box<dyn FnOnce()>` at that time.

[unsized_locals]: language-features/unsized-locals.html
[unsized_locals]: ../language-features/unsized-locals.md

`FnBox()` is an alternative approach to `Box<dyn FnBox()>` is delegated to `FnBox::call_box` which doesn't need unsized locals. As we now have `Box<dyn FnOnce()>` working, the `fnbox` feature is going to be removed.
@@ -14,7 +14,7 @@ fn main() {

The `box_syntax` feature [has a chapter][box] describing how to use it.

[box]: language-features/box-syntax.html
[box]: language-features/box-syntax.md

Because this documentation relates to unstable features, we make no guarantees
that what is contained here is accurate or up to date. It's developed on a
@@ -112,7 +112,6 @@
#![feature(maybe_uninit_extra, maybe_uninit_slice, maybe_uninit_array)]
#![feature(alloc_layout_extra)]
#![feature(try_trait)]
#![feature(iter_nth_back)]

// Allow testing this library

@@ -177,8 +177,8 @@ pub trait AsRef<T: ?Sized> {
///
/// Using `AsMut` as trait bound for a generic function we can accept all mutable references
/// that can be converted to type `&mut T`. Because [`Box<T>`] implements `AsMut<T>` we can
/// write a function `add_one`that takes all arguments that can be converted to `&mut u64`.
/// Because [`Box<T>`] implements `AsMut<T>` `add_one` accepts arguments of type
/// write a function `add_one` that takes all arguments that can be converted to `&mut u64`.
/// Because [`Box<T>`] implements `AsMut<T>`, `add_one` accepts arguments of type
/// `&mut Box<u64>` as well:
///
/// ```
@@ -88,15 +88,13 @@ pub trait DoubleEndedIterator: Iterator {
/// Basic usage:
///
/// ```
/// #![feature(iter_nth_back)]
/// let a = [1, 2, 3];
/// assert_eq!(a.iter().nth_back(2), Some(&1));
/// ```
///
/// Calling `nth_back()` multiple times doesn't rewind the iterator:
///
/// ```
/// #![feature(iter_nth_back)]
/// let a = [1, 2, 3];
///
/// let mut iter = a.iter();
@@ -108,12 +106,11 @@ pub trait DoubleEndedIterator: Iterator {
/// Returning `None` if there are less than `n + 1` elements:
///
/// ```
/// #![feature(iter_nth_back)]
/// let a = [1, 2, 3];
/// assert_eq!(a.iter().nth_back(10), None);
/// ```
#[inline]
#[unstable(feature = "iter_nth_back", issue = "56995")]
#[stable(feature = "iter_nth_back", since = "1.37.0")]
fn nth_back(&mut self, mut n: usize) -> Option<Self::Item> {
for x in self.rev() {
if n == 0 { return Some(x) }
@@ -23,9 +23,9 @@
/// * Values of type `&T` are coerced to values of type `&U`
/// * `T` implicitly implements all the (immutable) methods of the type `U`.
///
/// For more details, visit [the chapter in *The Rust Programming Language*]
/// [book] as well as the reference sections on [the dereference operator]
/// [ref-deref-op], [method resolution] and [type coercions].
/// For more details, visit [the chapter in *The Rust Programming Language*][book]
/// as well as the reference sections on [the dereference operator][ref-deref-op],
/// [method resolution] and [type coercions].
///
/// [book]: ../../book/ch15-02-deref.html
/// [`DerefMut`]: trait.DerefMut.html
@@ -113,9 +113,9 @@ impl<T: ?Sized> Deref for &mut T {
/// * Values of type `&mut T` are coerced to values of type `&mut U`
/// * `T` implicitly implements all the (mutable) methods of the type `U`.
///
/// For more details, visit [the chapter in *The Rust Programming Language*]
/// [book] as well as the reference sections on [the dereference operator]
/// [ref-deref-op], [method resolution] and [type coercions].
/// For more details, visit [the chapter in *The Rust Programming Language*][book]
/// as well as the reference sections on [the dereference operator][ref-deref-op],
/// [method resolution] and [type coercions].
///
/// [book]: ../../book/ch15-02-deref.html
/// [`Deref`]: trait.Deref.html
@@ -10,7 +10,6 @@
#![feature(fmt_internals)]
#![feature(hashmap_internals)]
#![feature(is_sorted)]
#![feature(iter_nth_back)]
#![feature(iter_once_with)]
#![feature(pattern)]
#![feature(range_is_empty)]
@@ -26,7 +26,7 @@ While the LLVM-specific code will be left in `rustc_codegen_llvm`, all the new t

@irinagpopa started to parametrize the types of `rustc_codegen_llvm` by a generic `Value` type, implemented in LLVM by a reference `&'ll Value`. This work has been extended to all structures inside the `mir` folder and elsewhere, as well as for LLVM's `BasicBlock` and `Type` types.

The two most important structures for the LLVM codegen are `CodegenCx` and `Builder`. They are parametrized by multiple liftime parameters and the type for `Value`.
The two most important structures for the LLVM codegen are `CodegenCx` and `Builder`. They are parametrized by multiple lifetime parameters and the type for `Value`.

```rust
struct CodegenCx<'ll, 'tcx: 'll> {
@@ -1275,7 +1275,7 @@ declare_lint_pass!(

declare_lint! {
pub ELLIPSIS_INCLUSIVE_RANGE_PATTERNS,
Allow,
Warn,
"`...` range patterns are deprecated"
}

@@ -314,7 +314,6 @@ impl From<String> for Box<dyn Error + Send + Sync> {
/// mem::size_of::<Box<dyn Error + Send + Sync>>() == mem::size_of_val(&a_boxed_error))
/// ```
fn from(err: String) -> Box<dyn Error + Send + Sync> {
#[derive(Debug)]
struct StringError(String);

impl Error for StringError {
@@ -327,6 +326,13 @@ impl From<String> for Box<dyn Error + Send + Sync> {
}
}

// Purposefully skip printing "StringError(..)"
impl Debug for StringError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Debug::fmt(&self.0, f)
}
}

Box::new(StringError(err))
}
}
@@ -858,8 +858,8 @@ impl<'a> Parser<'a> {
Applicability::MaybeIncorrect,
);
} else {
err.note("type ascription is a nightly-only feature that lets \
you annotate an expression with a type: `<expr>: <type>`")
err.note("#![feature(type_ascription)] lets you annotate an \
expression with a type: `<expr>: <type>`")
.span_note(
lhs_span,
"this expression expects an ascribed type after the colon",

0 comments on commit 84f729d

Please sign in to comment.
You can’t perform that action at this time.