From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../did_you_mean/replace-impl-infer-ty-from-trait.fixed | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed (limited to 'tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed') diff --git a/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed new file mode 100644 index 000000000..4963790c3 --- /dev/null +++ b/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.fixed @@ -0,0 +1,15 @@ +// run-rustfix +#![allow(unused)] + +trait Foo: Sized { + fn bar(i: i32, t: T, s: &Self) -> (T, i32); +} + +impl Foo for () { + fn bar(i: i32, t: usize, s: &()) -> (usize, i32) { + //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions + (1, 2) + } +} + +fn main() {} -- cgit v1.2.3