about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
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"]