]> git.proxmox.com Git - rustc.git/blame - tests/ui/ufcs/ufcs-qpath-missing-params.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / ufcs / ufcs-qpath-missing-params.rs
CommitLineData
54a0048b
SL
1use std::borrow::Cow;
2
3pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
4 fn into_cow(self) -> Cow<'a, B>;
5}
6
7impl<'a> IntoCow<'a, str> for String {
8 fn into_cow(self) -> Cow<'a, str> {
9 Cow::Owned(self)
10 }
11}
223e47cc
LB
12
13fn main() {
85aaf69f 14 <String as IntoCow>::into_cow("foo".to_string());
17df50a5 15 //~^ ERROR missing generics for
5869c6ff
XL
16
17 <String as IntoCow>::into_cow::<str>("foo".to_string());
9ffffee4 18 //~^ ERROR method takes 0 generic arguments but 1
17df50a5 19 //~| ERROR missing generics for
223e47cc 20}