- Consider the following code fragment. It compiles fine:
pub trait FooT {
fn foo(&self);
}
pub trait EnvT {
type SomeType: FooT;
}
pub struct Apple<Env: EnvT> {
pub some_val: Env::SomeType,
}
impl<Env: EnvT> Apple<Env> {
pub fn blah(&self) {
self.some_val.foo();
}
}
-
Now, on IntelliJ + Rust-plugin, I am getting “undefined referenced” (and color red) for the “foo” in
self.some_val.foo
-
My question: I know the plugin is not complete. If possible, I would like to adjust my programming style to make the plugin happy (to avoid false positives, so that I’ll take red-text more seriously).
-
Anyone have advice on how to make the plugin happy in this case?