Closed
Description
given the follow in file other.rs
//! other
#[derive(Default, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
pub struct Foo {
}
pub trait Tr {
fn bar(&self);
}
impl Foo {
fn other() {
println!("other");
}
}
impl Tr for Foo {
fn bar(&self) {
Self::other();
}
}
and main.rs
//! main.rs
mod other;
// use other::Tr; // if uncomment this, completion fine, but a.bar() can only jump to trait declaration, can't jump to definition.
/// hello
fn main() {
use other::Tr;
let a = other::Foo::default();
a.bar();
a.b // <-- no completion tip
}
trait is use nest in fn, compile fine but a.b not have completion tip.
if use other::Tr;
at top, completion fine, but a.bar() can only jump to trait declaration, can't jump to Foo's definition.
Metadata
Metadata
Assignees
Labels
No labels