]> git.lizzy.rs Git - rust.git/blob - tests/ui/ufcs/ufcs-qpath-missing-params.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / ui / ufcs / ufcs-qpath-missing-params.rs
1 use std::borrow::Cow;
2
3 pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
4     fn into_cow(self) -> Cow<'a, B>;
5 }
6
7 impl<'a> IntoCow<'a, str> for String {
8     fn into_cow(self) -> Cow<'a, str> {
9         Cow::Owned(self)
10     }
11 }
12
13 fn main() {
14     <String as IntoCow>::into_cow("foo".to_string());
15       //~^ ERROR missing generics for
16
17     <String as IntoCow>::into_cow::<str>("foo".to_string());
18     //~^ ERROR this associated function takes 0 generic arguments but 1
19     //~| ERROR missing generics for
20 }