Tuple is not a type?

⚓ Rust    📅 2025-07-01    👤 surdeus    👁️ 3      

surdeus

Warning

This post was published 37 days ago. The information described in this article may have changed.

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Tuple is not a type?

compile the code

struct StreamWrapper<F, T, U>(F, PhantomData<(T, U)>)

get:

rustc [E0277]: the trait bound U: std::marker::Copy is not satisfied
the trait std::marker::Copy is not implemented for U
rustc [E0277]: the trait bound T: std::marker::Copy is not satisfied
the trait std::marker::Copy is not implemented for T

but still, there is

impl<T> Copy for PhantomData<T>
where
    T: ?Sized,

in std library,

So, tuple is not a type?

4 posts - 4 participants

Read full topic

🏷️ rust_feed