]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/issue-95898.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / issue-95898.stderr
1 error[E0599]: no method named `clone` found for type parameter `T` in the current scope
2   --> $DIR/issue-95898.rs:5:7
3    |
4 LL | fn foo<T:>(t: T) {
5    |        - method `clone` not found for this type parameter
6 LL |     t.clone();
7    |       ^^^^^ method not found in `T`
8    |
9    = help: items from traits can only be used if the type parameter is bounded by the trait
10 help: the following trait defines an item `clone`, perhaps you need to restrict type parameter `T` with it:
11    |
12 LL | fn foo<T: Clone>(t: T) {
13    |           +++++
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0599`.