New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find-definition requires `extern crate` in 2018 edition #916

Closed
tarka opened this Issue Aug 5, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@tarka

tarka commented Aug 5, 2018

extern crate is no longer required in the 2018 edition preview. However, trying find-definition 3 25 on the following code fails. However if add extern crate actix_web; it works.

#![feature(rust_2018_preview)]

use actix_web::{server, App, HttpRequest};

fn index(_req: &HttpRequest) -> &'static str {
    "Hello world!"
}

fn main() {
   server::new(|| App::new().resource("/", |r| r.f(index)))
        .bind("127.0.0.1:8088")
        .unwrap()
        .run();
}

(This is built from master 22033f9, using emacs-racer, but confirmed on the commandline.)

@kngwyu

This comment has been minimized.

Collaborator

kngwyu commented Aug 5, 2018

Thanks!
It's just not implemented yet 😓

@kngwyu

This comment has been minimized.

Collaborator

kngwyu commented Aug 27, 2018

By #930 racer know current project's edition.
Next step is to know 'where the current crate is'.

@kngwyu kngwyu added the help wanted label Sep 1, 2018

bors-voyager bot added a commit to rust-lang/rls that referenced this issue Sep 10, 2018

Merge #1045
1045: Enable nightly flag for cargo r=Xanewok a=kngwyu

For #1043 
But I want to note here that racer has not yet implemented 2018 style path features completely(e.g. see racer-rust/racer#916).
So to make all things work we have to do additional works on racer side.

Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>

bors-voyager bot added a commit to rust-lang/rls that referenced this issue Sep 11, 2018

Merge #1045
1045: Enable nightly flag for cargo r=Xanewok a=kngwyu

For #1043 
But I want to note here that racer has not yet implemented 2018 style path features completely(e.g. see racer-rust/racer#916).
So to make all things work we have to do additional works on racer side.

Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>

bors-voyager bot added a commit to rust-lang/rls that referenced this issue Sep 17, 2018

Merge #1045
1045: Enable nightly flag for cargo r=Xanewok a=kngwyu

For #1043 
But I want to note here that racer has not yet implemented 2018 style path features completely(e.g. see racer-rust/racer#916).
So to make all things work we have to do additional works on racer side.

Co-authored-by: kngwyu <yuji.kngw.80s.revive@gmail.com>
@tav

This comment has been minimized.

tav commented Sep 24, 2018

Is anyone planning on working on this by any chance?

@kngwyu

This comment has been minimized.

Collaborator

kngwyu commented Sep 25, 2018

I'm worrying about the overhead of calling cargo metadata just to know what the edition is.
But, anyway, I'm going to include this in 2.2 release and any contribution is welcome.

@kngwyu

This comment has been minimized.

Collaborator

kngwyu commented Oct 27, 2018

Closed via #987

@kngwyu kngwyu closed this Oct 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment