Home
last modified time | relevance | path

Searched full:clone (Results 1 – 25 of 6600) sorted by relevance

12345678910>>...264

/third_party/rust/crates/syn/src/gen/
Dclone.rs7 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
8 impl Clone for Abi {
9 fn clone(&self) -> Self { in clone() method
11 extern_token: self.extern_token.clone(), in clone()
12 name: self.name.clone(), in clone()
17 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
18 impl Clone for AngleBracketedGenericArguments {
19 fn clone(&self) -> Self { in clone() method
21 colon2_token: self.colon2_token.clone(), in clone()
22 lt_token: self.lt_token.clone(), in clone()
[all …]
/third_party/typescript/tests/verify_3rd_libs/
Dclone_all_libs.bat3 git clone https://gitee.com/openharmony-sig/material-dialogs
4 git clone https://gitee.com/openharmony-sig/arangojs
5 git clone https://gitee.com/openharmony-sig/axios
6 git clone https://gitee.com/openharmony-sig/brotli
7 git clone https://gitee.com/openharmony-sig/crypto-js
8 git clone https://gitee.com/openharmony-sig/dataORM
9 git clone https://gitee.com/openharmony-sig/fileio-extra
10 git clone https://gitee.com/openharmony-sig/ijkplayer
11 git clone https://gitee.com/openharmony-sig/ImageViewZoom
12 git clone https://gitee.com/openharmony-sig/is-png
[all …]
/third_party/rust/rust/src/tools/clippy/tests/ui/
Dtrait_duplication_in_bounds.rs7 fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) { in bad_foo()
13 T: Clone + Clone + Clone + Copy, in bad_bar()
14 U: Clone + Copy, in bad_bar()
19 fn good_bar<T: Clone + Copy, U: Clone + Copy>(arg0: T, arg1: U) { in good_bar()
25 T: Clone + Copy, in good_foo()
26 U: Clone + Copy, in good_foo()
31 trait GoodSelfTraitBound: Clone + Copy {
38 Self: Clone + Copy; in f()
41 trait BadSelfTraitBound: Clone + Clone + Clone {
48 Self: Clone + Clone + Clone; in f()
[all …]
Dderive.stderr1 error: you are implementing `Clone` explicitly on a `Copy` type
4 LL | / impl Clone for Qux {
5 LL | | fn clone(&self) -> Self {
11 note: consider deriving `Clone` or removing `Copy`
14 LL | / impl Clone for Qux {
15 LL | | fn clone(&self) -> Self {
20 = note: `-D clippy::expl-impl-clone-on-copy` implied by `-D warnings`
22 error: you are implementing `Clone` explicitly on a `Copy` type
25 LL | / impl<'a> Clone for Lt<'a> {
26 LL | | fn clone(&self) -> Self {
[all …]
Dtrait_duplication_in_bounds.fixed7 fn bad_foo<T: Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
13 T: Clone + Copy,
14 U: Clone + Copy,
19 fn good_bar<T: Clone + Copy, U: Clone + Copy>(arg0: T, arg1: U) {
25 T: Clone + Copy,
26 U: Clone + Copy,
31 trait GoodSelfTraitBound: Clone + Copy {
38 Self: Clone + Copy;
41 trait BadSelfTraitBound: Clone {
48 Self: Clone;
[all …]
Dtrait_duplication_in_bounds.stderr4 LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
16 LL | T: Clone + Clone + Clone + Copy,
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
22 LL | trait BadSelfTraitBound: Clone + Clone + Clone {
23 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
28 LL | Self: Clone + Clone + Clone;
29 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
34 LL | trait BadTraitBound<T: Clone + Clone + Clone + Copy, U: Clone + Copy> {
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
[all …]
Dincorrect_clone_impl_on_copy_type.rs9 impl Clone for A {
10 fn clone(&self) -> Self { in clone() method
15 source.clone(); in clone_from()
16 *self = source.clone(); in clone_from()
26 impl Clone for B {
27 fn clone(&self) -> Self { in clone() method
34 // do not lint derived (clone's implementation is `*self` here anyway)
36 #[derive(Clone, Copy)]
44 impl Clone for D {
45 fn clone(&self) -> Self { in clone() method
[all …]
Dderive.rs8 impl Clone for Qux {
9 fn clone(&self) -> Self { in clone() method
14 // looks like unions don't support deriving Clone for now
20 impl Clone for Union {
21 fn clone(&self) -> Self { in clone() method
32 impl<'a> Clone for Lt<'a> {
33 fn clone(&self) -> Self { in clone() method
43 impl Clone for BigArray {
44 fn clone(&self) -> Self { in clone() method
54 impl Clone for FnPtr {
[all …]
Dunnecessary_clone.stderr1 error: using `.clone()` on a ref-counted pointer
4 LL | rc.clone();
5 | ^^^^^^^^^^ help: try this: `Rc::<bool>::clone(&rc)`
7 = note: `-D clippy::clone-on-ref-ptr` implied by `-D warnings`
9 error: using `.clone()` on a ref-counted pointer
12 LL | arc.clone();
13 | ^^^^^^^^^^^ help: try this: `Arc::<bool>::clone(&arc)`
15 error: using `.clone()` on a ref-counted pointer
18 LL | rcweak.clone();
19 | ^^^^^^^^^^^^^^ help: try this: `Weak::<bool>::clone(&rcweak)`
[all …]
Dincorrect_clone_impl_on_copy_type.fixed9 impl Clone for A {
10 fn clone(&self) -> Self { *self }
21 impl Clone for B {
22 fn clone(&self) -> Self {
29 // do not lint derived (clone's implementation is `*self` here anyway)
31 #[derive(Clone, Copy)]
39 impl Clone for D {
40 fn clone(&self) -> Self {
45 source.clone();
46 *self = source.clone();
[all …]
Dclone_on_copy.stderr1 error: using `clone` on type `i32` which implements the `Copy` trait
4 LL | 42.clone();
5 | ^^^^^^^^^^ help: try removing the `clone` call: `42`
7 = note: `-D clippy::clone-on-copy` implied by `-D warnings`
9 error: using `clone` on type `i32` which implements the `Copy` trait
12 LL | (&42).clone();
15 error: using `clone` on type `i32` which implements the `Copy` trait
18 LL | rc.borrow().clone();
21 error: using `clone` on type `u32` which implements the `Copy` trait
24 LL | x.clone().rotate_left(1);
[all …]
Dredundant_clone.rs19 let _s = s.clone(); in main()
44 let _t = tup.0.clone(); in main()
47 let _s = tup_ref.0.clone(); // this `.clone()` cannot be removed in main()
53 let _x = x.clone(); // ok; `x` is borrowed by `y` in main()
59 let _ = Some(String::new()).unwrap_or_else(|| x.0.clone()); // ok; closure borrows `x` in main()
73 #[derive(Clone)]
76 if b { (a.clone(), a.clone()) } else { (Alpha, a) } in with_branch()
80 (a.clone(), a) in cannot_double_move()
93 s.x.clone() // removing this `clone()` summons E0509 in cannot_move_from_type_with_drop()
107 let _s = s.clone(); in borrower_propagation()
[all …]
/third_party/rust/rust/tests/rustdoc-ui/intra-doc/
Dweird-syntax.stderr1 error: incompatible link kind for `Clone`
4 LL | /// [`struct@Clone`]
14 LL | /// [`trait@Clone`]
17 error: incompatible link kind for `Clone`
20 LL | /// [```struct@Clone```]
25 LL | /// [```trait@Clone```]
28 error: incompatible link kind for `Clone`
31 LL | /// [ ` struct@Clone ` ]
36 LL | /// [ ` trait@Clone ` ]
39 error: unresolved link to `Clone`
[all …]
Dweird-syntax.rs14 use std::clone::Clone;
18 /// [`struct@Clone`] //~ERROR link
21 /// [```struct@Clone```] //~ERROR link
24 /// [ ` struct@Clone ` ] //~ERROR link
27 /// [ `Clone ()` ] //~ERROR link
30 /// [`Clone ()` ] //~ERROR link
33 /// [ `Clone ()`] //~ERROR link
36 /// [```Clone ()```] //~ERROR link
39 /// [```Clone \(\)```] // not URL-shaped enough
42 /// [ ``` Clone () ``` ] //~ERROR link
[all …]
/third_party/rust/rust/library/core/src/
Dclone.rs1 //! The `Clone` trait for types that cannot be 'implicitly copied'.
9 //! explicitly, by convention implementing the [`Clone`] trait and calling
10 //! the [`clone`] method.
12 //! [`clone`]: Clone::clone
17 //! let s = String::new(); // String type implements Clone
18 //! let copy = s.clone(); // so we can clone it
21 //! To easily implement the Clone trait, you can also use
22 //! `#[derive(Clone)]`. Example:
25 //! #[derive(Clone)] // we add the Clone trait to Morpheus struct
33 //! let copy = f.clone(); // and now we can clone it!
[all …]
/third_party/rust/rust/tests/ui/async-await/drop-order/
Ddrop-order-for-async-fn-parameters-by-ref-binding.rs182 let mut fut = Box::pin(f(actual_order.clone())); in assert_drop_order_after_poll()
186 g(expected_order.clone()); in assert_drop_order_after_poll()
193 assert_drop_order_after_poll(|l| foo_async(D("x", l.clone()), D("_y", l.clone())), in main()
194 |l| foo_sync(D("x", l.clone()), D("_y", l.clone()))); in main()
195 assert_drop_order_after_poll(|l| bar_async(D("x", l.clone()), D("_", l.clone())), in main()
196 |l| bar_sync(D("x", l.clone()), D("_", l.clone()))); in main()
197 assert_drop_order_after_poll(|l| baz_async((D("x", l.clone()), D("_", l.clone()))), in main()
198 |l| baz_sync((D("x", l.clone()), D("_", l.clone())))); in main()
202 D("x", l.clone()), in main()
203 (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), in main()
[all …]
Ddrop-order-for-async-fn-parameters.rs177 let mut fut = Box::pin(f(actual_order.clone())); in assert_drop_order_after_poll()
181 g(expected_order.clone()); in assert_drop_order_after_poll()
188 assert_drop_order_after_poll(|l| foo_async(D("x", l.clone()), D("_y", l.clone())), in main()
189 |l| foo_sync(D("x", l.clone()), D("_y", l.clone()))); in main()
190 assert_drop_order_after_poll(|l| bar_async(D("x", l.clone()), D("_", l.clone())), in main()
191 |l| bar_sync(D("x", l.clone()), D("_", l.clone()))); in main()
192 assert_drop_order_after_poll(|l| baz_async((D("x", l.clone()), D("_", l.clone()))), in main()
193 |l| baz_sync((D("x", l.clone()), D("_", l.clone())))); in main()
197 D("x", l.clone()), in main()
198 (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), in main()
[all …]
Ddrop-order-when-cancelled.rs199 let mut fut = Box::pin(f(actual_order.clone())); in assert_drop_order_after_cancel()
208 g(expected_order.clone()); in assert_drop_order_after_cancel()
215 |l| foo_async(D("x", l.clone()), D("_y", l.clone())), in main()
216 |l| foo_sync(D("x", l.clone()), D("_y", l.clone())), in main()
219 |l| bar_async(D("x", l.clone()), D("_", l.clone())), in main()
220 |l| bar_sync(D("x", l.clone()), D("_", l.clone())), in main()
223 |l| baz_async((D("x", l.clone()), D("_", l.clone()))), in main()
224 |l| baz_sync((D("x", l.clone()), D("_", l.clone()))), in main()
229 D("x", l.clone()), in main()
230 (D("a", l.clone()), D("_", l.clone()), D("_c", l.clone())), in main()
[all …]
/third_party/typescript/tests/baselines/reference/
DemitClassMergedWithConstNamespaceNotElided.symbols2 export namespace Clone {
3 >Clone : Symbol(Clone, Decl(enum.d.ts, 0, 0), Decl(enum.d.ts, 7, 1))
22 export class Clone {
23 >Clone : Symbol(Clone, Decl(enum.d.ts, 0, 0), Decl(enum.d.ts, 7, 1))
25 static clone(url: string): void;
26 >clone : Symbol(Clone.clone, Decl(enum.d.ts, 9, 20))
30 import {Clone} from "./enum";
31 >Clone : Symbol(Clone, Decl(usage.ts, 0, 8))
33 Clone.clone("ok");
34 >Clone.clone : Symbol(Clone.clone, Decl(enum.d.ts, 9, 20))
[all …]
DemitClassMergedWithConstNamespaceNotElided.types2 export namespace Clone {
24 export class Clone {
25 >Clone : Clone
27 static clone(url: string): void;
28 >clone : (url: string) => void
32 import {Clone} from "./enum";
33 >Clone : typeof Clone
35 Clone.clone("ok");
36 >Clone.clone("ok") : void
37 >Clone.clone : (url: string) => void
[all …]
/third_party/rust/rust/tests/ui/generator/
Dclone-impl-async.stderr1 error[E0277]: the trait bound `[async block@$DIR/clone-impl-async.rs:12:27: 16:6]: Copy` is not sat…
2 --> $DIR/clone-impl-async.rs:17:16
5 …^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `[async block@$DIR/clone-impl-async.rs:12:2…
10 --> $DIR/clone-impl-async.rs:69:18
15 error[E0277]: the trait bound `[async block@$DIR/clone-impl-async.rs:12:27: 16:6]: Clone` is not sa…
16 --> $DIR/clone-impl-async.rs:19:17
19 …| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `[async block@$DIR/clo…
24 --> $DIR/clone-impl-async.rs:70:19
26 LL | fn check_clone<T: Clone>(_x: &T) {}
29 error[E0277]: the trait bound `[async block@$DIR/clone-impl-async.rs:23:27: 25:6]: Copy` is not sat…
[all …]
Dclone-impl.stderr1 error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:3…
2 --> $DIR/clone-impl.rs:42:16
5 | ------- within this `[generator@$DIR/clone-impl.rs:36:23: 36:30]`
8 …| ^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:36:23: 36:30]`, the trait `Cop…
11 --> $DIR/clone-impl.rs:40:14
16 --> $DIR/clone-impl.rs:72:18
21 error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `[generator@$DIR/clone-impl.rs:…
22 --> $DIR/clone-impl.rs:42:16
25 | ------- within this `[generator@$DIR/clone-impl.rs:36:23: 36:30]`
28 …| ^^^^^^^^^^^^ within `[generator@$DIR/clone-impl.rs:36:23: 36:30]`, the trait `Cop…
[all …]
/third_party/rust/rust/tests/ui/associated-types/
Ddefaults-suitability.stderr1 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
4 LL | type Ty: Clone = NotClone;
5 | ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
10 LL | type Ty: Clone = NotClone;
12 help: consider annotating `NotClone` with `#[derive(Clone)]`
14 LL + #[derive(Clone)]
18 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
22 | ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
27 LL | Self::Ty: Clone,
32 help: consider annotating `NotClone` with `#[derive(Clone)]`
[all …]
Ddefaults-suitability.rs5 //! (eg. `type Assoc: Clone = NotClone`)
13 type Ty: Clone = NotClone;
14 //~^ ERROR the trait bound `NotClone: Clone` is not satisfied
20 Self::Ty: Clone,
23 //~^ ERROR the trait bound `NotClone: Clone` is not satisfied
28 type Bar: Clone = Vec<T>;
29 //~^ ERROR the trait bound `T: Clone` is not satisfied
43 Vec<Self::Assoc>: Clone,
52 Vec<Self::Assoc>: Clone,
63 // `Clone`.
[all …]
/third_party/rust/rust/tests/ui/rfcs/rfc-1857-stabilize-drop-order/
Ddrop-order.rs49 let test_tuple = (PushOnDrop::new(1, dropped_fields.clone()), in test_drop_tuple()
50 PushOnDrop::new(2, dropped_fields.clone())); in test_drop_tuple()
57 let cloned = AssertUnwindSafe(dropped_fields.clone()); in test_drop_tuple()
59 (PushOnDrop::new(2, cloned.clone()), in test_drop_tuple()
60 PushOnDrop::new(1, cloned.clone()), in test_drop_tuple()
70 x: PushOnDrop::new(1, dropped_fields.clone()), in test_drop_struct()
71 y: PushOnDrop::new(2, dropped_fields.clone()), in test_drop_struct()
72 z: PushOnDrop::new(3, dropped_fields.clone()), in test_drop_struct()
79 let test_tuple_struct = TestTupleStruct(PushOnDrop::new(1, dropped_fields.clone()), in test_drop_struct()
80 PushOnDrop::new(2, dropped_fields.clone()), in test_drop_struct()
[all …]

12345678910>>...264