Trying to play with feature(type_alias_impl_trait) without success
⚓ Rust 📅 2025-06-19 👤 surdeus 👁️ 12Hello,
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