Rust/intellij "unresolved reference"


#1
  1. 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();
    }
}
  1. Now, on IntelliJ + Rust-plugin, I am getting “undefined referenced” (and color red) for the “foo” in self.some_val.foo

  2. 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).

  3. Anyone have advice on how to make the plugin happy in this case?


#2

I don’t know how to make the plugin happy, but the plug-in is open sourced and you can write a question / issue here.


#3

@zrzka: Thanks. Moved to https://github.com/intellij-rust/intellij-rust/issues/3116