racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

Autocompletion issues with Iron's Hello World. #63

Closed crinklywrappr closed 7 years ago

crinklywrappr commented 7 years ago

Racer fails to provide autocompletion for the following code in the listed parts.

This is the "Hello World" program on the frontpage of the Iron website here.


extern crate iron;

use iron::prelude::*;
use iron::status;

fn main() {
    fn hello_world(_: &mut Request) -> IronResult<Response> {
        Ok(Response::with((status::Ok, "Hello World!")))
    }

    let _server = Iron::new(hello_world).http("localhost:3000").unwrap();
    println!("On 3000");
}

Code compiles and runs using Rust 1.12.1 and Iron 1.4.0

emacs-racer 20161004.1950 racer 1.2.10

crinklywrappr commented 7 years ago

Just tried with 20161017.1829. Same problem.

Wilfred commented 7 years ago

Please update to the latest version of racer.el, and run M-x racer-debug. Paste the result here :)

mattiasb commented 7 years ago

I get this:

The last racer command was:

$ cd /home/mattiasb/test/racer-test/
$ export CARGO_HOME=/home/mattiasb/.cargo
$ export RUST_SRC_PATH=/home/mattiasb/Code/rust-lang/rust/src/

$ /home/mattiasb/.local/bin/racer complete 8 21 /home/mattiasb/test/racer-test/test.rs /tmp/racer174475oZ

This command terminated with exit code 0.

stdout:

PREFIX 21,21,
END

No output on stderr.

The temporary file will have been deleted. You should be able to reproduce
the same output from racer with the following command:

$ CARGO_HOME=/home/mattiasb/.cargo RUST_SRC_PATH=/home/mattiasb/Code/rust-lang/rust/src/ /home/mattiasb/.local/bin/racer complete 8 21 /home/mattiasb/test/racer-test/test.rs

Please report bugs on GitHub.

And this is with the above code with the pointer right after "Response::"

Wilfred commented 7 years ago

Thanks.

I'm afraid this looks like an issue with racer rather than racer.el -- would you mind filing a bug upstream?

crinklywrappr commented 7 years ago

Done

Wilfred commented 7 years ago

Not a racer.el issue as far as I can see, closing in favour of upstream bug.