We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f5cb14 commit 2d8fe98Copy full SHA for 2d8fe98
trait-variant/examples/variant.rs
@@ -6,7 +6,7 @@
6
// option. This file may not be copied, modified, or distributed
7
// except according to those terms.
8
9
-use std::{future::Future, ops::Add};
+use std::{fmt::Display, future::Future};
10
11
#[trait_variant::make(IntFactory: Send)]
12
pub trait LocalIntFactory {
@@ -37,9 +37,10 @@ where
37
const CONST: usize = 3;
38
type F;
39
type A<const ANOTHER_CONST: u8>;
40
- type B<T>: Add<T>;
+ type B<T: Display>: FromIterator<T>;
41
42
async fn take(&self, s: S);
43
+ fn build<T: Display>(&self, items: impl Iterator<Item = T>) -> Self::B<T>;
44
}
45
46
fn main() {}
0 commit comments