Warning
This post was published 55 days ago. The information described in this article may have changed.
Hello,
Here is the problem:
#![feature(type_alias_impl_trait)]
use std::fmt::Display;
type SomeDisplay = impl Display;
fn make_it() -> SomeDisplay {
2
}
struct Example {
it: SomeDisplay,
}
impl Example {
fn make() -> Self {
Example { it: make_it() }
}
}
The error tells:
SomeDisplay
must be used in combination with a concrete type within the same crate
Thank you in advance for your help.
2 posts - 2 participants
🏷️ rust_feed