diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pydantic-core')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-pydantic-core/atomic.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pydantic-core/atomic.patch b/meta-python/recipes-devtools/python/python3-pydantic-core/atomic.patch new file mode 100644 index 0000000000..1a6a55737c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pydantic-core/atomic.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | Fix ambiguous import of marker::Atomic crate | ||
| 2 | |||
| 3 | The problem is that Atomic is being imported from two different places: | ||
| 4 | |||
| 5 | As a type alias from sync::atomic::* | ||
| 6 | As a trait from crate::marker::* | ||
| 7 | |||
| 8 | This creates ambiguity when the code tries to use T: Atomic + PartialEq as a trait bound. | ||
| 9 | adds explicit imports to radium-1.1.0/src/lib.rs | ||
| 10 | |||
| 11 | Fixes | ||
| 12 | error[E0404]: expected trait, found type alias `Atomic` | ||
| 13 | error[E0659]: `Atomic` is ambiguous | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | |||
| 18 | Index: radium-1.1.0/src/lib.rs | ||
| 19 | =================================================================== | ||
| 20 | --- radium-1.1.0.orig/src/lib.rs | ||
| 21 | +++ radium-1.1.0/src/lib.rs | ||
| 22 | @@ -12,6 +12,8 @@ use core::{ | ||
| 23 | }; | ||
| 24 | |||
| 25 | use crate::marker::*; | ||
| 26 | +use crate::marker::Atomic as AtomicTrait; | ||
| 27 | + | ||
| 28 | pub use crate::types::{ | ||
| 29 | Atom, | ||
| 30 | Isotope, | ||
| 31 | @@ -801,7 +803,7 @@ radium! { | ||
| 32 | |||
| 33 | unsafe impl<T> Radium for Atom<T> | ||
| 34 | where | ||
| 35 | - T: Atomic + PartialEq, | ||
| 36 | + T: AtomicTrait + PartialEq, | ||
| 37 | T::Atom: Radium<Item = T>, | ||
| 38 | { | ||
| 39 | type Item = T; | ||
