about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-23 10:40:41 +0000
committerbors <bors@rust-lang.org>2022-07-23 10:40:41 +0000
commit2e43d068ced2162bc57da332094c06604bc1b191 (patch)
tree3105db86886fcb1aade7fabb9ea641e26118ae54 /src
parent47ba93596586783efd41df7b8ea84f4f1e37f923 (diff)
parent7c5df1f425ef87c0f8c6bfc44df28ec0d6cc4fca (diff)
downloadrust-2e43d068ced2162bc57da332094c06604bc1b191.tar.gz
rust-2e43d068ced2162bc57da332094c06604bc1b191.zip
Auto merge of #99636 - matthiaskrgr:rollup-yg0xxkx, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #99580 (Don't suggest unnameable generic arguments)
 - #99617 (Update mdbook)
 - #99631 (Use span_bug in case of unexpected rib kind)
 - #99632 (Fix typo/grammar in locator.rs doc comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/closures/issue-99565.rs7
-rw-r--r--src/test/ui/closures/issue-99565.stderr14
-rw-r--r--src/test/ui/issues/issue-23041.stderr2
-rw-r--r--src/test/ui/issues/issue-24013.stderr2
-rw-r--r--src/tools/rustbook/Cargo.toml2
5 files changed, 24 insertions, 3 deletions
diff --git a/src/test/ui/closures/issue-99565.rs b/src/test/ui/closures/issue-99565.rs
new file mode 100644
index 00000000000..3a30d2ee034
--- /dev/null
+++ b/src/test/ui/closures/issue-99565.rs
@@ -0,0 +1,7 @@
+#![crate_type = "lib"]
+
+fn foo<T, U>(_: U) {}
+
+fn bar() {
+    foo(|| {}); //~ ERROR type annotations needed
+}
diff --git a/src/test/ui/closures/issue-99565.stderr b/src/test/ui/closures/issue-99565.stderr
new file mode 100644
index 00000000000..0d940aa9a2f
--- /dev/null
+++ b/src/test/ui/closures/issue-99565.stderr
@@ -0,0 +1,14 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-99565.rs:6:5
+   |
+LL |     foo(|| {});
+   |     ^^^ cannot infer type of the type parameter `T` declared on the function `foo`
+   |
+help: consider specifying the generic arguments
+   |
+LL |     foo::<T, _>(|| {});
+   |        ++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/src/test/ui/issues/issue-23041.stderr b/src/test/ui/issues/issue-23041.stderr
index 7b9a1634a0d..6592b76a39f 100644
--- a/src/test/ui/issues/issue-23041.stderr
+++ b/src/test/ui/issues/issue-23041.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     b.downcast_ref::<fn(_)->_>();
    |       ^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the associated function `downcast_ref`
    |
-help: consider specifying the generic arguments
+help: consider specifying the generic argument
    |
 LL |     b.downcast_ref::<fn(_) -> _>();
    |                   ~~~~~~~~~~~~~~
diff --git a/src/test/ui/issues/issue-24013.stderr b/src/test/ui/issues/issue-24013.stderr
index 863993f4509..995dce552e3 100644
--- a/src/test/ui/issues/issue-24013.stderr
+++ b/src/test/ui/issues/issue-24013.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
    |             ^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `swap`
    |
-help: consider specifying the generic arguments
+help: consider specifying the generic argument
    |
 LL |     unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
    |                 ~~~~~~~~~~
diff --git a/src/tools/rustbook/Cargo.toml b/src/tools/rustbook/Cargo.toml
index bd08e0ede0b..33c05180408 100644
--- a/src/tools/rustbook/Cargo.toml
+++ b/src/tools/rustbook/Cargo.toml
@@ -9,6 +9,6 @@ clap = "3.1.1"
 env_logger = "0.7.1"
 
 [dependencies.mdbook]
-version = "0.4.18"
+version = "0.4.21"
 default-features = false
 features = ["search"]