fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
640 B17 linesraw
1error[E0599]: no method named `clone` found for type parameter `T` in the current scope
2  --> $DIR/issue-95898.rs:5:7
3   |
4LL | fn foo<T:>(t: T) {
5   |        - method `clone` not found for this type parameter
6LL |     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
10help: the following trait defines an item `clone`, perhaps you need to restrict type parameter `T` with it:
11   |
12LL | fn foo<T: Clone>(t: T) {
13   |           +++++
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0599`.