Attempt was made to import an unimportable type. This can happen when trying to import a type from a trait.
Erroneous code example:
#![feature(import_trait_associated_functions)]
mod foo {
pub trait MyTrait {
type SomeType;
}
}
use foo::MyTrait::SomeType;
// error: `SomeType` is not directly importable
fn main() {} It's invalid to directly import types belonging to a trait.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0253.html