Stream: t-compiler/wg-rls-2.0

Topic: #1498


Edwin Cheng (Jan 10 2020 at 16:20, on Zulip):

@Emil Lauridsen #1498, you mentioned the following case works:

fn test(foo: String) {
    let bar: Vec<_> = vec![
        "site".into(),
        foo,
    ];
}

I would like to know which token you are hove on ?

Emil Lauridsen (Jan 10 2020 at 16:24, on Zulip):

Pretty sure it worked when I posted it, but now that you mention it I can only get hover to work on .into(), and go-to-definition on foo, but no hover on foo

Florian Diebold (Jan 10 2020 at 16:25, on Zulip):

maybe that's a different problem specific to hover

Edwin Cheng (Jan 10 2020 at 16:55, on Zulip):

Um..I know what happened now, I fixed a bug in #2760, which return a correct FileId now, however, hover implementation actually depends on this buggy behavior. ^^

Edwin Cheng (Jan 10 2020 at 17:56, on Zulip):

Submitted #2786, hopefully will fix this bug partially :speechless:

Edwin Cheng (Jan 10 2020 at 18:11, on Zulip):

@Florian Diebold in your comment in that issue, you mean :

fn bar() {}
macro_rules! foo{
    ($i:ident) => ($i)
}
fn main() {
    foo!(bar)();
}
``
Edwin Cheng (Jan 10 2020 at 18:11, on Zulip):

I even don't know it is possible ... :fear:

Florian Diebold (Jan 10 2020 at 18:14, on Zulip):

no, sorry, a method call expression: vec![1, 2, 3].into_iter()

Florian Diebold (Jan 10 2020 at 18:15, on Zulip):

but probably that is possible as well? I'd assume all places where you can put an expression can be macros, but maybe some need parentheses :thinking:

Last update: Jun 04 2020 at 18:35UTC