about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-17 08:27:16 +0000
committerbors <bors@rust-lang.org>2021-03-17 08:27:16 +0000
commit2c7490379d7e8854192c176039cfabf6acefe7ef (patch)
treeb3a0d6ad0fa86be3b2e4f87f3604a7c4503e92da /src
parent0c341226ad3780c11b1f29f6da8172b1d653f9ef (diff)
parent95bbcdb8c7ff8dd76b702465582e0edf5db232e1 (diff)
downloadrust-2c7490379d7e8854192c176039cfabf6acefe7ef.tar.gz
rust-2c7490379d7e8854192c176039cfabf6acefe7ef.zip
Auto merge of #83225 - JohnTitor:rollup-4hnuhb8, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #82774 (Fix bad diagnostics for anon params with ref and/or qualified paths)
 - #82826 ((std::net::parser): Fix capitalization of IP version names)
 - #83092 (More precise spans for HIR paths)
 - #83124 (Do not insert impl_trait_in_bindings opaque definitions twice.)
 - #83202 (Show details in cfg version unstable book)
 - #83203 (Don't warn about old rustdoc lint names (temporarily))
 - #83206 (Update books)
 - #83219 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
m---------src/doc/book0
m---------src/doc/embedded-book0
m---------src/doc/nomicon0
m---------src/doc/reference0
m---------src/doc/rust-by-example0
m---------src/doc/rustc-dev-guide0
-rw-r--r--src/doc/unstable-book/src/language-features/cfg-version.md7
-rw-r--r--src/librustdoc/lint.rs2
-rw-r--r--src/test/rustdoc-ui/renamed-lint-still-applies.rs3
-rw-r--r--src/test/rustdoc-ui/renamed-lint-still-applies.stderr13
-rw-r--r--src/test/rustdoc-ui/unknown-renamed-lints.rs3
-rw-r--r--src/test/rustdoc-ui/unknown-renamed-lints.stderr12
-rw-r--r--src/test/ui/anon-params/anon-params-denied-2018.rs14
-rw-r--r--src/test/ui/anon-params/anon-params-denied-2018.stderr76
-rw-r--r--src/test/ui/bad/bad-sized.rs1
-rw-r--r--src/test/ui/bad/bad-sized.stderr15
-rw-r--r--src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr2
-rw-r--r--src/test/ui/issues/issue-78622.stderr2
-rw-r--r--src/test/ui/lint/rustdoc-renamed.rs3
-rw-r--r--src/test/ui/lint/rustdoc-renamed.stderr8
-rw-r--r--src/test/ui/mir/issue-80742.stderr2
-rw-r--r--src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr2
-rw-r--r--src/test/ui/parser/lifetime-in-pattern.stderr14
-rw-r--r--src/test/ui/privacy/associated-item-privacy-inherent.stderr2
-rw-r--r--src/test/ui/privacy/private-inferred-type.stderr2
-rw-r--r--src/test/ui/regions/issue-28848.stderr2
-rw-r--r--src/test/ui/stability-attribute/generics-default-stability.stderr8
-rw-r--r--src/test/ui/structs/struct-path-associated-type.stderr4
-rw-r--r--src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr2
-rw-r--r--src/test/ui/suggestions/suggest-std-when-using-type.stderr4
-rw-r--r--src/test/ui/traits/item-privacy.stderr2
-rw-r--r--src/test/ui/unspecified-self-in-trait-ref.stderr2
-rw-r--r--src/test/ui/wf/wf-static-method.stderr2
m---------src/tools/cargo0
-rw-r--r--src/tools/clippy/tests/ui/use_self.fixed23
-rw-r--r--src/tools/clippy/tests/ui/use_self.rs23
-rw-r--r--src/tools/clippy/tests/ui/use_self.stderr16
-rw-r--r--src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr2
-rw-r--r--src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr2
39 files changed, 180 insertions, 95 deletions
diff --git a/src/doc/book b/src/doc/book
-Subproject 0f87daf683ae3de3cb725faecb11b7e7e89f0e5
+Subproject fc2f690fc16592abbead2360cfc0a42f5df7805
diff --git a/src/doc/embedded-book b/src/doc/embedded-book
-Subproject a96d096cffe5fa2c84af1b4b61e1492f839bb2e
+Subproject f61685755fad7d3b88b4645adfbf461d500563a
diff --git a/src/doc/nomicon b/src/doc/nomicon
-Subproject adca786547d08fe676b2fc7a6f08c2ed5280ca3
+Subproject 6fe476943afd53a9a6e91f38a6ea7bb48811d8f
diff --git a/src/doc/reference b/src/doc/reference
-Subproject 3b6fe80c205d2a2b5dc8a276192bbce9eeb9e9c
+Subproject e32a2f928f8b78d534bca2b9e7736413314dc55
diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example
-Subproject 3e0d98790c9126517fa1c604dc3678f396e92a2
+Subproject eead22c6c030fa4f3a167d1798658c341199e2a
diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide
-Subproject c431f8c29a41413dddcb3bfa0d71c9cabe36631
+Subproject 67ebd4b55dba44edfc351621cef6e5e758169c5
diff --git a/src/doc/unstable-book/src/language-features/cfg-version.md b/src/doc/unstable-book/src/language-features/cfg-version.md
index 2b1e50835b7..a6ec42cecba 100644
--- a/src/doc/unstable-book/src/language-features/cfg-version.md
+++ b/src/doc/unstable-book/src/language-features/cfg-version.md
@@ -7,19 +7,20 @@ The tracking issue for this feature is: [#64796]
 ------------------------
 
 The `cfg_version` feature makes it possible to execute different code
-depending on the compiler version.
+depending on the compiler version. It will return true if the compiler
+version is greater than or equal to the specified version.
 
 ## Examples
 
 ```rust
 #![feature(cfg_version)]
 
-#[cfg(version("1.42"))]
+#[cfg(version("1.42"))] // 1.42 and above
 fn a() {
     // ...
 }
 
-#[cfg(not(version("1.42")))]
+#[cfg(not(version("1.42")))] // 1.41 and below
 fn a() {
     // ...
 }
diff --git a/src/librustdoc/lint.rs b/src/librustdoc/lint.rs
index 754ec53b330..ffa2f7a47fd 100644
--- a/src/librustdoc/lint.rs
+++ b/src/librustdoc/lint.rs
@@ -181,7 +181,7 @@ crate fn register_lints(_sess: &Session, lint_store: &mut LintStore) {
     );
     for lint in &*RUSTDOC_LINTS {
         let name = lint.name_lower();
-        lint_store.register_renamed(&name.replace("rustdoc::", ""), &name);
+        lint_store.register_alias(&name.replace("rustdoc::", ""), &name);
     }
     lint_store
         .register_renamed("intra_doc_link_resolution_failure", "rustdoc::broken_intra_doc_links");
diff --git a/src/test/rustdoc-ui/renamed-lint-still-applies.rs b/src/test/rustdoc-ui/renamed-lint-still-applies.rs
index 6d4bad16aad..8c61c1ccb6a 100644
--- a/src/test/rustdoc-ui/renamed-lint-still-applies.rs
+++ b/src/test/rustdoc-ui/renamed-lint-still-applies.rs
@@ -1,5 +1,6 @@
 // compile-args: --crate-type lib
 #![deny(broken_intra_doc_links)]
-//~^ WARNING renamed
+// FIXME: the old names for rustdoc lints should warn by default once `rustdoc::` makes it to the
+// stable channel.
 //! [x]
 //~^ ERROR unresolved link
diff --git a/src/test/rustdoc-ui/renamed-lint-still-applies.stderr b/src/test/rustdoc-ui/renamed-lint-still-applies.stderr
index e14cbfa1726..8a12991558a 100644
--- a/src/test/rustdoc-ui/renamed-lint-still-applies.stderr
+++ b/src/test/rustdoc-ui/renamed-lint-still-applies.stderr
@@ -1,13 +1,5 @@
-warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
-  --> $DIR/renamed-lint-still-applies.rs:2:9
-   |
-LL | #![deny(broken_intra_doc_links)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
-   |
-   = note: `#[warn(renamed_and_removed_lints)]` on by default
-
 error: unresolved link to `x`
-  --> $DIR/renamed-lint-still-applies.rs:4:6
+  --> $DIR/renamed-lint-still-applies.rs:5:6
    |
 LL | //! [x]
    |      ^ no item named `x` in scope
@@ -17,7 +9,8 @@ note: the lint level is defined here
    |
 LL | #![deny(broken_intra_doc_links)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
+   = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(broken_intra_doc_links)]`
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
diff --git a/src/test/rustdoc-ui/unknown-renamed-lints.rs b/src/test/rustdoc-ui/unknown-renamed-lints.rs
index 9d20cb7d30d..a05c0c81168 100644
--- a/src/test/rustdoc-ui/unknown-renamed-lints.rs
+++ b/src/test/rustdoc-ui/unknown-renamed-lints.rs
@@ -10,7 +10,8 @@
 //~^ ERROR renamed to `rustdoc::broken_intra_doc_links`
 
 #![deny(non_autolinks)]
-//~^ ERROR renamed to `rustdoc::non_autolinks`
+// FIXME: the old names for rustdoc lints should warn by default once `rustdoc::` makes it to the
+// stable channel.
 
 #![deny(rustdoc)]
 //~^ ERROR removed: use `rustdoc::all` instead
diff --git a/src/test/rustdoc-ui/unknown-renamed-lints.stderr b/src/test/rustdoc-ui/unknown-renamed-lints.stderr
index 2036335e855..98bfb83c704 100644
--- a/src/test/rustdoc-ui/unknown-renamed-lints.stderr
+++ b/src/test/rustdoc-ui/unknown-renamed-lints.stderr
@@ -28,25 +28,19 @@ note: the lint level is defined here
 LL | #![deny(renamed_and_removed_lints)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: lint `non_autolinks` has been renamed to `rustdoc::non_autolinks`
-  --> $DIR/unknown-renamed-lints.rs:12:9
-   |
-LL | #![deny(non_autolinks)]
-   |         ^^^^^^^^^^^^^ help: use the new name: `rustdoc::non_autolinks`
-
 error: lint `rustdoc` has been removed: use `rustdoc::all` instead
-  --> $DIR/unknown-renamed-lints.rs:15:9
+  --> $DIR/unknown-renamed-lints.rs:16:9
    |
 LL | #![deny(rustdoc)]
    |         ^^^^^^^
 
 error: unknown lint: `rustdoc::intra_doc_link_resolution_failure`
-  --> $DIR/unknown-renamed-lints.rs:19:9
+  --> $DIR/unknown-renamed-lints.rs:20:9
    |
 LL | #![deny(rustdoc::intra_doc_link_resolution_failure)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: Compilation failed, aborting rustdoc
 
-error: aborting due to 7 previous errors
+error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/anon-params/anon-params-denied-2018.rs b/src/test/ui/anon-params/anon-params-denied-2018.rs
index 5721f5d2357..95533cf3dfb 100644
--- a/src/test/ui/anon-params/anon-params-denied-2018.rs
+++ b/src/test/ui/anon-params/anon-params-denied-2018.rs
@@ -5,6 +5,20 @@
 trait T {
     fn foo(i32); //~ expected one of `:`, `@`, or `|`, found `)`
 
+    // Also checks with `&`
+    fn foo_with_ref(&mut i32);
+    //~^ ERROR expected one of `:`, `@`, or `|`, found `)`
+
+    fn foo_with_qualified_path(<Bar as T>::Baz);
+    //~^ ERROR expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
+
+    fn foo_with_qualified_path_and_ref(&<Bar as T>::Baz);
+    //~^ ERROR expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
+
+    fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
+    //~^ ERROR expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `,`
+    //~| ERROR expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
+
     fn bar_with_default_impl(String, String) {}
     //~^ ERROR expected one of `:`
     //~| ERROR expected one of `:`
diff --git a/src/test/ui/anon-params/anon-params-denied-2018.stderr b/src/test/ui/anon-params/anon-params-denied-2018.stderr
index 840294db083..b53640cd65b 100644
--- a/src/test/ui/anon-params/anon-params-denied-2018.stderr
+++ b/src/test/ui/anon-params/anon-params-denied-2018.stderr
@@ -18,8 +18,76 @@ help: if this is a type, explicitly ignore the parameter name
 LL |     fn foo(_: i32);
    |            ^^^^^^
 
+error: expected one of `:`, `@`, or `|`, found `)`
+  --> $DIR/anon-params-denied-2018.rs:9:29
+   |
+LL |     fn foo_with_ref(&mut i32);
+   |                             ^ expected one of `:`, `@`, or `|`
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+help: if this is a `self` type, give it a parameter name
+   |
+LL |     fn foo_with_ref(self: &mut i32);
+   |                     ^^^^^^^^^^^^^^
+help: if this is a parameter name, give it a type
+   |
+LL |     fn foo_with_ref(i32: &mut TypeName);
+   |                     ^^^^^^^^^^^^^^^^^^
+help: if this is a type, explicitly ignore the parameter name
+   |
+LL |     fn foo_with_ref(_: &mut i32);
+   |                     ^^^^^^^^^^^
+
+error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
+  --> $DIR/anon-params-denied-2018.rs:12:47
+   |
+LL |     fn foo_with_qualified_path(<Bar as T>::Baz);
+   |                                               ^ expected one of 8 possible tokens
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+help: explicitly ignore the parameter name
+   |
+LL |     fn foo_with_qualified_path(_: <Bar as T>::Baz);
+   |                                ^^^^^^^^^^^^^^^^^^
+
+error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
+  --> $DIR/anon-params-denied-2018.rs:15:56
+   |
+LL |     fn foo_with_qualified_path_and_ref(&<Bar as T>::Baz);
+   |                                                        ^ expected one of 8 possible tokens
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+help: explicitly ignore the parameter name
+   |
+LL |     fn foo_with_qualified_path_and_ref(_: &<Bar as T>::Baz);
+   |                                        ^^^^^^^^^^^^^^^^^^^
+
+error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `,`
+  --> $DIR/anon-params-denied-2018.rs:18:57
+   |
+LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
+   |                                                         ^ expected one of 8 possible tokens
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+help: explicitly ignore the parameter name
+   |
+LL |     fn foo_with_multiple_qualified_paths(_: <Bar as T>::Baz, <Bar as T>::Baz);
+   |                                          ^^^^^^^^^^^^^^^^^^
+
+error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
+  --> $DIR/anon-params-denied-2018.rs:18:74
+   |
+LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
+   |                                                                          ^ expected one of 8 possible tokens
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+help: explicitly ignore the parameter name
+   |
+LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, _: <Bar as T>::Baz);
+   |                                                           ^^^^^^^^^^^^^^^^^^
+
 error: expected one of `:`, `@`, or `|`, found `,`
-  --> $DIR/anon-params-denied-2018.rs:8:36
+  --> $DIR/anon-params-denied-2018.rs:22:36
    |
 LL |     fn bar_with_default_impl(String, String) {}
    |                                    ^ expected one of `:`, `@`, or `|`
@@ -39,7 +107,7 @@ LL |     fn bar_with_default_impl(_: String, String) {}
    |                              ^^^^^^^^^
 
 error: expected one of `:`, `@`, or `|`, found `)`
-  --> $DIR/anon-params-denied-2018.rs:8:44
+  --> $DIR/anon-params-denied-2018.rs:22:44
    |
 LL |     fn bar_with_default_impl(String, String) {}
    |                                            ^ expected one of `:`, `@`, or `|`
@@ -55,7 +123,7 @@ LL |     fn bar_with_default_impl(String, _: String) {}
    |                                      ^^^^^^^^^
 
 error: expected one of `:`, `@`, or `|`, found `,`
-  --> $DIR/anon-params-denied-2018.rs:13:22
+  --> $DIR/anon-params-denied-2018.rs:27:22
    |
 LL |     fn baz(a:usize, b, c: usize) -> usize {
    |                      ^ expected one of `:`, `@`, or `|`
@@ -70,5 +138,5 @@ help: if this is a type, explicitly ignore the parameter name
 LL |     fn baz(a:usize, _: b, c: usize) -> usize {
    |                     ^^^^
 
-error: aborting due to 4 previous errors
+error: aborting due to 9 previous errors
 
diff --git a/src/test/ui/bad/bad-sized.rs b/src/test/ui/bad/bad-sized.rs
index b899c59ff2e..a1521967978 100644
--- a/src/test/ui/bad/bad-sized.rs
+++ b/src/test/ui/bad/bad-sized.rs
@@ -5,4 +5,5 @@ pub fn main() {
     //~^ ERROR only auto traits can be used as additional traits in a trait object
     //~| ERROR the size for values of type
     //~| ERROR the size for values of type
+    //~| ERROR the size for values of type
 }
diff --git a/src/test/ui/bad/bad-sized.stderr b/src/test/ui/bad/bad-sized.stderr
index 260d78b543a..768893d6e25 100644
--- a/src/test/ui/bad/bad-sized.stderr
+++ b/src/test/ui/bad/bad-sized.stderr
@@ -31,7 +31,20 @@ LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
    = help: the trait `Sized` is not implemented for `dyn Trait`
    = note: required by `Vec::<T>::new`
 
-error: aborting due to 3 previous errors
+error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
+  --> $DIR/bad-sized.rs:4:37
+   |
+LL |     let x: Vec<dyn Trait + Sized> = Vec::new();
+   |                                     ^^^ doesn't have a size known at compile-time
+   | 
+  ::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+   |
+LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
+   |                - required by this bound in `Vec`
+   |
+   = help: the trait `Sized` is not implemented for `dyn Trait`
+
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0225, E0277.
 For more information about an error, try `rustc --explain E0225`.
diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr
index 21b3a6f1f33..5f278f94b93 100644
--- a/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr
+++ b/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr
@@ -10,7 +10,7 @@ warning: use of deprecated struct `MustUseDeprecated`
   --> $DIR/cfg-attr-multi-true.rs:19:5
    |
 LL |     MustUseDeprecated::new();
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^
 
 warning: use of deprecated struct `MustUseDeprecated`
   --> $DIR/cfg-attr-multi-true.rs:13:17
diff --git a/src/test/ui/issues/issue-78622.stderr b/src/test/ui/issues/issue-78622.stderr
index f13073da0a3..f7d44f21d3b 100644
--- a/src/test/ui/issues/issue-78622.stderr
+++ b/src/test/ui/issues/issue-78622.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/issue-78622.rs:5:5
    |
 LL |     S::A::<f> {}
-   |     ^^^^^^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
+   |     ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/lint/rustdoc-renamed.rs b/src/test/ui/lint/rustdoc-renamed.rs
index 71e88bd7f54..ecd6155b769 100644
--- a/src/test/ui/lint/rustdoc-renamed.rs
+++ b/src/test/ui/lint/rustdoc-renamed.rs
@@ -11,4 +11,5 @@
 #![deny(intra_doc_link_resolution_failure)]
 //~^ ERROR removed: use `rustdoc::broken_intra_doc_links`
 #![deny(non_autolinks)]
-//~^ ERROR removed: use `rustdoc::non_autolinks`
+// FIXME: the old names for rustdoc lints should warn by default once `rustdoc::` makes it to the
+// stable channel.
diff --git a/src/test/ui/lint/rustdoc-renamed.stderr b/src/test/ui/lint/rustdoc-renamed.stderr
index a7fe3e29d5b..096e867aa16 100644
--- a/src/test/ui/lint/rustdoc-renamed.stderr
+++ b/src/test/ui/lint/rustdoc-renamed.stderr
@@ -10,11 +10,5 @@ note: the lint level is defined here
 LL | #![deny(renamed_and_removed_lints)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: lint `non_autolinks` has been removed: use `rustdoc::non_autolinks` instead
-  --> $DIR/rustdoc-renamed.rs:13:9
-   |
-LL | #![deny(non_autolinks)]
-   |         ^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
diff --git a/src/test/ui/mir/issue-80742.stderr b/src/test/ui/mir/issue-80742.stderr
index 8cbd0220e67..8400aab308e 100644
--- a/src/test/ui/mir/issue-80742.stderr
+++ b/src/test/ui/mir/issue-80742.stderr
@@ -56,7 +56,7 @@ LL | struct Inline<T>
    |               - required by this bound in `Inline`
 ...
 LL |     let dst = Inline::<dyn Debug>::new(0);
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |               ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `dyn Debug`
 help: consider relaxing the implicit `Sized` restriction
diff --git a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr b/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr
index 4b86a1fede1..a64cb82305a 100644
--- a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr
+++ b/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr
@@ -13,7 +13,7 @@ help: the lifetime requirements from the `impl` do not correspond to the require
   --> $DIR/issue-75361-mismatched-impl.rs:12:55
    |
 LL |   fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType>>;
-   |                                                       ^^^^^^^^^^^^^^ consider borrowing this type parameter in the trait
+   |                                                       ^^^^ consider borrowing this type parameter in the trait
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/parser/lifetime-in-pattern.stderr b/src/test/ui/parser/lifetime-in-pattern.stderr
index 71fd3cdf723..4ffee657cab 100644
--- a/src/test/ui/parser/lifetime-in-pattern.stderr
+++ b/src/test/ui/parser/lifetime-in-pattern.stderr
@@ -9,6 +9,20 @@ error: expected one of `:`, `@`, or `|`, found `)`
    |
 LL | fn test(&'a str) {
    |                ^ expected one of `:`, `@`, or `|`
+   |
+   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
+help: if this is a `self` type, give it a parameter name
+   |
+LL | fn test(self: &str) {
+   |         ^^^^^^^^^^
+help: if this is a parameter name, give it a type
+   |
+LL | fn test(str: &TypeName) {
+   |         ^^^^^^^^^^^^^^
+help: if this is a type, explicitly ignore the parameter name
+   |
+LL | fn test(_: &str) {
+   |         ^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/privacy/associated-item-privacy-inherent.stderr b/src/test/ui/privacy/associated-item-privacy-inherent.stderr
index 1e94e7c620d..f8585014fd6 100644
--- a/src/test/ui/privacy/associated-item-privacy-inherent.stderr
+++ b/src/test/ui/privacy/associated-item-privacy-inherent.stderr
@@ -222,7 +222,7 @@ error: type `priv_parent_substs::Priv` is private
   --> $DIR/associated-item-privacy-inherent.rs:101:9
    |
 LL |         Pub::CONST;
-   |         ^^^^^^^^^^ private type
+   |         ^^^ private type
 ...
 LL |     priv_parent_substs::mac!();
    |     --------------------------- in this macro invocation
diff --git a/src/test/ui/privacy/private-inferred-type.stderr b/src/test/ui/privacy/private-inferred-type.stderr
index 8c8163d3906..11bcb9074d0 100644
--- a/src/test/ui/privacy/private-inferred-type.stderr
+++ b/src/test/ui/privacy/private-inferred-type.stderr
@@ -56,7 +56,7 @@ error: type `Priv` is private
   --> $DIR/private-inferred-type.rs:104:5
    |
 LL |     m::Pub::INHERENT_ASSOC_CONST;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
+   |     ^^^^^^ private type
 
 error: type `Priv` is private
   --> $DIR/private-inferred-type.rs:105:5
diff --git a/src/test/ui/regions/issue-28848.stderr b/src/test/ui/regions/issue-28848.stderr
index 726844a3184..83313b34316 100644
--- a/src/test/ui/regions/issue-28848.stderr
+++ b/src/test/ui/regions/issue-28848.stderr
@@ -2,7 +2,7 @@ error[E0478]: lifetime bound not satisfied
   --> $DIR/issue-28848.rs:10:5
    |
 LL |     Foo::<'a, 'b>::xmute(u)
-   |     ^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime `'b` as defined on the function body at 9:16
   --> $DIR/issue-28848.rs:9:16
diff --git a/src/test/ui/stability-attribute/generics-default-stability.stderr b/src/test/ui/stability-attribute/generics-default-stability.stderr
index a5df70bb8b3..45194413cce 100644
--- a/src/test/ui/stability-attribute/generics-default-stability.stderr
+++ b/src/test/ui/stability-attribute/generics-default-stability.stderr
@@ -100,7 +100,7 @@ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test
   --> $DIR/generics-default-stability.rs:160:28
    |
 LL |     let _: Alias4<isize> = Alias4::Some(1);
-   |                            ^^^^^^^^^^^^
+   |                            ^^^^^^
 
 warning: use of deprecated type alias `unstable_generic_param::Alias4`: test
   --> $DIR/generics-default-stability.rs:160:12
@@ -124,7 +124,7 @@ warning: use of deprecated type alias `unstable_generic_param::Alias4`: test
   --> $DIR/generics-default-stability.rs:166:28
    |
 LL |     let _: Alias4<isize> = Alias4::Some(0);
-   |                            ^^^^^^^^^^^^
+   |                            ^^^^^^
 
 warning: use of deprecated type alias `unstable_generic_param::Alias4`: test
   --> $DIR/generics-default-stability.rs:166:12
@@ -136,7 +136,7 @@ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test
   --> $DIR/generics-default-stability.rs:171:28
    |
 LL |     let _: Alias5<isize> = Alias5::Some(1);
-   |                            ^^^^^^^^^^^^
+   |                            ^^^^^^
 
 warning: use of deprecated type alias `unstable_generic_param::Alias5`: test
   --> $DIR/generics-default-stability.rs:171:12
@@ -160,7 +160,7 @@ warning: use of deprecated type alias `unstable_generic_param::Alias5`: test
   --> $DIR/generics-default-stability.rs:178:28
    |
 LL |     let _: Alias5<isize> = Alias5::Some(0);
-   |                            ^^^^^^^^^^^^
+   |                            ^^^^^^
 
 warning: use of deprecated type alias `unstable_generic_param::Alias5`: test
   --> $DIR/generics-default-stability.rs:178:12
diff --git a/src/test/ui/structs/struct-path-associated-type.stderr b/src/test/ui/structs/struct-path-associated-type.stderr
index f8a2c7c6b6c..0b1b6a5e3af 100644
--- a/src/test/ui/structs/struct-path-associated-type.stderr
+++ b/src/test/ui/structs/struct-path-associated-type.stderr
@@ -14,7 +14,7 @@ error[E0071]: expected struct, variant or union type, found associated type
   --> $DIR/struct-path-associated-type.rs:14:13
    |
 LL |     let z = T::A::<u8> {};
-   |             ^^^^^^^^^^ not a struct
+   |             ^^^^ not a struct
 
 error[E0071]: expected struct, variant or union type, found associated type
   --> $DIR/struct-path-associated-type.rs:18:9
@@ -38,7 +38,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:33:13
    |
 LL |     let z = S::A::<u8> {};
-   |             ^^^^^^^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
+   |             ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:35:9
diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
index 3120b739c02..b8ef230b44b 100644
--- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
+++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
@@ -11,7 +11,7 @@ error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satis
   --> $DIR/mut-borrow-needed-by-trait.rs:17:14
    |
 LL |     let fp = BufWriter::new(fp);
-   |              ^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
+   |              ^^^^^^^^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
    | 
   ::: $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
    |
diff --git a/src/test/ui/suggestions/suggest-std-when-using-type.stderr b/src/test/ui/suggestions/suggest-std-when-using-type.stderr
index 5199faa5c8e..7f4c80f50e2 100644
--- a/src/test/ui/suggestions/suggest-std-when-using-type.stderr
+++ b/src/test/ui/suggestions/suggest-std-when-using-type.stderr
@@ -2,12 +2,12 @@ error[E0223]: ambiguous associated type
   --> $DIR/suggest-std-when-using-type.rs:2:14
    |
 LL |     let pi = f32::consts::PI;
-   |              ^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^
    |
 help: you are looking for the module in `std`, not the primitive type
    |
 LL |     let pi = std::f32::consts::PI;
-   |              ^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^
 
 error[E0599]: no function or associated item named `from_utf8` found for type `str` in the current scope
   --> $DIR/suggest-std-when-using-type.rs:5:14
diff --git a/src/test/ui/traits/item-privacy.stderr b/src/test/ui/traits/item-privacy.stderr
index 6fd82142d61..b7dad54a6d3 100644
--- a/src/test/ui/traits/item-privacy.stderr
+++ b/src/test/ui/traits/item-privacy.stderr
@@ -113,7 +113,7 @@ error[E0038]: the trait `assoc_const::C` cannot be made into an object
   --> $DIR/item-privacy.rs:101:5
    |
 LL |     C::A;
-   |     ^^^^ `assoc_const::C` cannot be made into an object
+   |     ^ `assoc_const::C` cannot be made into an object
    |
    = help: consider moving `C` to another trait
    = help: consider moving `B` to another trait
diff --git a/src/test/ui/unspecified-self-in-trait-ref.stderr b/src/test/ui/unspecified-self-in-trait-ref.stderr
index 9310b3d7ede..c9518170222 100644
--- a/src/test/ui/unspecified-self-in-trait-ref.stderr
+++ b/src/test/ui/unspecified-self-in-trait-ref.stderr
@@ -31,7 +31,7 @@ LL | | }
    | |_- type parameter `A` must be specified for this
 ...
 LL |       let e = Bar::<usize>::lol();
-   |               ^^^^^^^^^^^^^^^^^ missing reference to `A`
+   |               ^^^^^^^^^^^^ missing reference to `A`
    |
    = note: because of the default `Self` reference, type parameters must be specified on object types
 
diff --git a/src/test/ui/wf/wf-static-method.stderr b/src/test/ui/wf/wf-static-method.stderr
index 93d16514a50..0c98a809025 100644
--- a/src/test/ui/wf/wf-static-method.stderr
+++ b/src/test/ui/wf/wf-static-method.stderr
@@ -19,7 +19,7 @@ error[E0478]: lifetime bound not satisfied
   --> $DIR/wf-static-method.rs:26:18
    |
 LL |         let me = Self::make_me();
-   |                  ^^^^^^^^^^^^^
+   |                  ^^^^
    |
 note: lifetime parameter instantiated with the lifetime `'b` as defined on the impl at 23:10
   --> $DIR/wf-static-method.rs:23:10
diff --git a/src/tools/cargo b/src/tools/cargo
-Subproject 32da9eaa5de5be241cf8096ca6b749a157194f7
+Subproject 90691f2bfe9a50291a98983b1ed2feab51d5ca5
diff --git a/src/tools/clippy/tests/ui/use_self.fixed b/src/tools/clippy/tests/ui/use_self.fixed
index a630936e3b1..b94d5448d92 100644
--- a/src/tools/clippy/tests/ui/use_self.fixed
+++ b/src/tools/clippy/tests/ui/use_self.fixed
@@ -312,17 +312,18 @@ mod issue4140 {
         fn try_from(value: T) -> Result<Self, Error<Self::From, Self::To>>;
     }
 
-    impl<F, T> TryFrom<F> for T
-    where
-        T: From<F>,
-    {
-        type From = Self;
-        type To = Self;
-
-        fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
-            Ok(From::from(value))
-        }
-    }
+    // FIXME: Suggested fix results in infinite recursion.
+    // impl<F, T> TryFrom<F> for T
+    // where
+    //     T: From<F>,
+    // {
+    //     type From = Self::From;
+    //     type To = Self::To;
+
+    //     fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
+    //         Ok(From::from(value))
+    //     }
+    // }
 
     impl From<bool> for i64 {
         type From = bool;
diff --git a/src/tools/clippy/tests/ui/use_self.rs b/src/tools/clippy/tests/ui/use_self.rs
index f3e081dd203..ac99c6d9d7b 100644
--- a/src/tools/clippy/tests/ui/use_self.rs
+++ b/src/tools/clippy/tests/ui/use_self.rs
@@ -312,17 +312,18 @@ mod issue4140 {
         fn try_from(value: T) -> Result<Self, Error<Self::From, Self::To>>;
     }
 
-    impl<F, T> TryFrom<F> for T
-    where
-        T: From<F>,
-    {
-        type From = T::From;
-        type To = T::To;
-
-        fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
-            Ok(From::from(value))
-        }
-    }
+    // FIXME: Suggested fix results in infinite recursion.
+    // impl<F, T> TryFrom<F> for T
+    // where
+    //     T: From<F>,
+    // {
+    //     type From = Self::From;
+    //     type To = Self::To;
+
+    //     fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
+    //         Ok(From::from(value))
+    //     }
+    // }
 
     impl From<bool> for i64 {
         type From = bool;
diff --git a/src/tools/clippy/tests/ui/use_self.stderr b/src/tools/clippy/tests/ui/use_self.stderr
index e1410d2e652..a32a9b9157d 100644
--- a/src/tools/clippy/tests/ui/use_self.stderr
+++ b/src/tools/clippy/tests/ui/use_self.stderr
@@ -157,22 +157,10 @@ LL |             Foo { value }
    |             ^^^ help: use the applicable keyword: `Self`
 
 error: unnecessary structure name repetition
-  --> $DIR/use_self.rs:319:21
-   |
-LL |         type From = T::From;
-   |                     ^^^^^^^ help: use the applicable keyword: `Self`
-
-error: unnecessary structure name repetition
-  --> $DIR/use_self.rs:320:19
-   |
-LL |         type To = T::To;
-   |                   ^^^^^ help: use the applicable keyword: `Self`
-
-error: unnecessary structure name repetition
-  --> $DIR/use_self.rs:453:13
+  --> $DIR/use_self.rs:454:13
    |
 LL |             A::new::<submod::B>(submod::B {})
    |             ^ help: use the applicable keyword: `Self`
 
-error: aborting due to 29 previous errors
+error: aborting due to 27 previous errors
 
diff --git a/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr b/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr
index 334d921a9af..d924f33797d 100644
--- a/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr
+++ b/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr
@@ -83,7 +83,7 @@ error: map with zero-sized value type
   --> $DIR/zero_sized_btreemap_values.rs:64:35
    |
 LL |     let _: BTreeMap<String, ()> = BTreeMap::new();
-   |                                   ^^^^^^^^^^^^^
+   |                                   ^^^^^^^^
    |
    = help: consider using a set instead
 
diff --git a/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr b/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr
index 43987b3d01d..79770bf90d7 100644
--- a/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr
+++ b/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr
@@ -83,7 +83,7 @@ error: map with zero-sized value type
   --> $DIR/zero_sized_hashmap_values.rs:64:34
    |
 LL |     let _: HashMap<String, ()> = HashMap::new();
-   |                                  ^^^^^^^^^^^^
+   |                                  ^^^^^^^
    |
    = help: consider using a set instead