-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fails to build from source (Rust 1.41.1) #6667
Comments
My second half of the comment is collapsed in the Details section for some reason. Here it is again, for ease of reading. Version informationI'm using rustc and cargo from my distribution (Debian buster).
TheoryI suppose my rustc version is too old to build rust-analyzer from source (since the matches! macro was only stabilised in 1.42). This comment confirms that only the latest stable version of rustc is supported. It would be good to document this. The Users' manual, from which my steps above are taken, doesn't mention this; neither could I find it in the developer's docs. |
You're right, only the latest compiler version is supported. This should be checked here, I'm not sure why it's not working for you. Do you want to submit a PR (to fix the version check and/or to update the docs)? As an aside, you might be able to use the binaries available on GitHub if you don't want to use |
Filed #6961 to document this. Looks like the version check didn't work because |
Steps to reproduce
Run the following commands in a terminal.
Expected results
rust-analyzer builds successfully from source.
Actual results
The build fails with the following output.
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ungrammar-1.1.4/src/lexer.rs:122:5
|
122 | matches!(c, '\' | ''')
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ungrammar-1.1.4/src/lexer.rs:125:5
|
125 | matches!(c, ' ' | '\t' | '\n')
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ungrammar-1.1.4/src/lexer.rs:128:5
|
128 | matches!(c, 'a'..='z' | 'A'..='Z' | '_')
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ungrammar-1.1.4/src/parser.rs:68:16
|
68 | if matches!(node_data.rule, DUMMY_RULE) {
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#65721
error[E0658]: use of unstable library feature 'matches_macro'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/ungrammar-1.1.4/src/parser.rs:102:9
|
102 | if !matches!(p.grammar[node].rule, DUMMY_RULE) {
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#65721
Compiling miniz_oxide v0.4.3
error[E0658]: use of unstable library feature 'proc_macro_span'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/xshell-macros-0.1.6/src/lib.rs:161:45
|
161 | ident.set_span(ident.span().resolved_at(span).located_at(span));
| ^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#54725
error[E0658]: use of unstable library feature 'proc_macro_span'
--> /home/michael/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/xshell-macros-0.1.6/src/lib.rs:161:63
|
161 | ident.set_span(ident.span().resolved_at(span).located_at(span));
| ^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#54725
error: aborting due to 3 previous errors
For more information about this error, try
rustc --explain E0658
.error: could not compile
xshell-macros
.warning: build failed, waiting for other jobs to finish...
error: aborting due to 5 previous errors
For more information about this error, try
rustc --explain E0658
.error: could not compile
ungrammar
.warning: build failed, waiting for other jobs to finish...
error: build failed
Theory
I suppose my rustc version is too old to build rust-analyzer from source (since the matches! macro was only stabilised in 1.42). This comment confirms that only the latest stable version of rustc is supported.
It would be good to document this. The Users' manual, from which my steps above are taken, doesn't mention this; neither could I find it in the developer's docs.
The text was updated successfully, but these errors were encountered: