Skip to content
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
Tracked by #983
tarka opened this issue Aug 5, 2018 · 5 comments
Closed
Tracked by #983

find-definition requires extern crate in 2018 edition #916

tarka opened this issue Aug 5, 2018 · 5 comments

Comments

@tarka
Copy link

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
Copy link
Collaborator

kngwyu commented Aug 5, 2018

Thanks!
It's just not implemented yet 😓

@kngwyu
Copy link
Collaborator

kngwyu commented Aug 27, 2018

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

bors-voyager bot added a commit to rust-lang/rls that referenced this issue Sep 10, 2018
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
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
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
Copy link

tav commented Sep 24, 2018

Is anyone planning on working on this by any chance?

@kngwyu
Copy link
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
Copy link
Collaborator

kngwyu commented Oct 27, 2018

Closed via #987

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

No branches or pull requests

3 participants