1 #### Note: this error code is no longer emitted by the compiler.
3 An explicit generic argument was provided when calling a function that
4 uses `impl Trait` in argument position.
6 Erroneous code example:
8 ```ignore (no longer an error)
9 fn foo<T: Copy>(a: T, b: impl Clone) {}
11 foo::<i32>(0i32, "abc".to_string());
14 Either all generic arguments should be inferred at the call site, or
15 the function definition should use an explicit generic type parameter
16 instead of `impl Trait`. Example:
19 fn foo<T: Copy>(a: T, b: impl Clone) {}
20 fn bar<T: Copy, U: Clone>(a: T, b: U) {}
22 foo(0i32, "abc".to_string());
24 bar::<i32, String>(0i32, "abc".to_string());
25 bar::<_, _>(0i32, "abc".to_string());
26 bar(0i32, "abc".to_string());