]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / clone-on-unconstrained-borrowed-type-param.rs
1 // run-rustfix
2 fn wat<T>(t: &T) -> T {
3     t.clone() //~ ERROR E0308
4 }
5
6 struct Foo;
7
8 fn wut(t: &Foo) -> Foo {
9     t.clone() //~ ERROR E0308
10 }
11
12 fn main() {
13     wat(&42);
14     wut(&Foo);
15 }