Description
With nightly cargo if I run cargo cmd
inside of crate that part of workspace,
it reports errors like this:
$ cargo +nightly build
Compiling foo v0.1.0 (file:///tmp/1/foo)
error: expected one of `!` or `::`, found `#`
--> foo/src/lib.rs:2:1
instead of
$ cargo +stable build
Compiling foo v0.1.0 (file:///tmp/1/foo)
error: expected one of `!` or `::`, found `#`
--> src/lib.rs:2:1
See the difference - foo/src/lib.rs
vs src/lib.rs
.
This breaks many editor/IDE I suppose. In particular it breaks functionality
press on error/warning in compilation log and jump to suitable location in file.
For example with intellij-rust/intellij-rust jump from error/warning doesn't work with nightly: https://users.rust-lang.org/t/intellij-rust-and-compile-errors/15103
It breaks cargo.el project kwrooijen/cargo.el#51 (emacs wrapper around cargo commands),
also it breaks standard emacs compilation-mode, because of compilation-mode
doesn't handle situation when cwd of compile comand is not equal to root of relative path.
I suppose this is related to #4788
Tested with
rustc 1.25.0-nightly (8ccab7eed 2018-01-31)
cargo 0.26.0-nightly (1d6dfea44 2018-01-26)
Also I attach simple workspace project to make problem clear.