rustc/vendor/dyn-clone-1.0.17/tests/ui/missing-supertrait.stderr
2025-01-11 15:57:26 +01:00

92 lines
4.1 KiB
Plaintext

error[E0277]: the trait bound `dyn MyTrait: Clone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait`, which is required by `dyn MyTrait: DynClone`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
str
[T]
= note: required for `dyn MyTrait` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `dyn MyTrait + Send: Clone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait + Send`, which is required by `dyn MyTrait + Send: DynClone`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
str
[T]
= note: required for `dyn MyTrait + Send` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `dyn MyTrait + Sync: Clone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait + Sync`, which is required by `dyn MyTrait + Sync: DynClone`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
str
[T]
= note: required for `dyn MyTrait + Sync` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `dyn MyTrait + Send + Sync: Clone` is not satisfied
--> tests/ui/missing-supertrait.rs:3:1
|
3 | dyn_clone::clone_trait_object!(MyTrait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `dyn MyTrait + Send + Sync`, which is required by `dyn MyTrait + Send + Sync: DynClone`
| required by a bound introduced by this call
|
= help: the following other types implement trait `DynClone`:
str
[T]
= note: required for `dyn MyTrait + Send + Sync` to implement `DynClone`
note: required by a bound in `clone_box`
--> src/lib.rs
|
| pub fn clone_box<T>(t: &T) -> Box<T>
| --------- required by a bound in this function
| where
| T: ?Sized + DynClone,
| ^^^^^^^^ required by this bound in `clone_box`
= note: this error originates in the macro `$crate::__internal_clone_trait_object` which comes from the expansion of the macro `dyn_clone::clone_trait_object` (in Nightly builds, run with -Z macro-backtrace for more info)