Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.rs

6 lines
111 B
Rust
Raw Normal View History

Implement a `explicit_generic_args_with_impl_trait` feature gate When this gate is enabled, explicit generic arguments can be specified even if `impl Trait` is used in argument position. Generic arguments can only be specified for explicit generic parameters but not for the synthetic type parameters from `impl Trait`
2021-06-09 20:56:41 +01:00
fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
fn main() {
foo::<str, String>("".to_string()); //~ ERROR E0107
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1394ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API