Edition 2015 is used if .rustfmt without edition is present
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 49/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust, vim
- Ambito
- developer-experience, tooling
Direzione di ricerca
Start by tracing the :RustFmt command and how it builds arguments for rustfmt; the report identifies .rustfmt.toml and Cargo.toml as the relevant configuration files. Check how edition is chosen when .rustfmt.toml exists without an edition key, then confirm that formatting Rust 2018 syntax uses the intended edition.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
- rust.vim version:
Latest master
commit hash:4aa69b84c8a58fcec6b6dad6fe244b916b1cf830
Steps to reproduce:
- Create a
.rustfmt.tomlwithout an explicit edition key defined. - Use any feature from the Rust 2018 edition. For example the
asynckeyword. - Run the
:RustFmtcommand
Expected behavior
The expected behavior would be that rust.vim either defaults to the edition that is specified in the Cargo.toml or the 2018 edition, like when no .rustfmt.toml file is present.
Actual behavior
The actual behavior is that no edition option is passed to rustfmt and the 2015 edition is used.
Paste debugging info from the Rust Vim plugin via one of the following
commands: :RustInfo, :RustInfoToClipboard, or :RustInfoToFile <filename>.
:RustInfo
let g:loaded_syntastic_rust_cargo_checker = v:null
let g:loaded_syntastic_rust_filetype = v:null
let g:loaded_syntastic_rust_rustc_checker = v:null
let g:rust_bang_comment_leader = v:null
let g:rust_cargo_avoid_whole_workspace = v:null
let g:rust_clip_command = v:null
let g:rust_conceal = v:null
let g:rust_conceal_mod_path = v:null
let g:rust_conceal_pub = v:null
let g:rust_fold = v:null
let g:rust_last_args = v:null
let b:rust_last_args = []
let g:rust_last_rustc_args = v:null
let b:rust_last_rustc_args = []
let g:rust_original_delimitMate_excluded_regions = v:null
let g:rust_playpen_url = v:null
let g:rust_prev_delimitMate_quotes = v:null
let g:rust_recent_nearest_cargo_tol = v:null
let g:rust_recent_root_cargo_toml = v:null
let g:rust_recommended_style = 0
let g:rust_set_conceallevel = v:null
let g:rust_set_conceallevel=1 = v:null
let g:rust_set_foldmethod = v:null
let g:rust_set_foldmethod=1 = v:null
let g:rust_shortener_url = v:null
let g:rustc_makeprg_no_percent = v:null
let g:rustc_path = v:null
let g:rustfmt_autosave = 0
let g:rustfmt_autosave_if_config_present = v:null
let g:rustfmt_command = 'rustfmt'
let g:rustfmt_emit_files = 1
let g:rustfmt_fail_silently = 0
let g:rustfmt_options = ''
let g:syntastic_extra_filetypes = ['rust']
let g:syntastic_rust_cargo_fname = v:null
rustfmt 1.4.37-stable (f1edd04 2021-11-29)
rustc 1.57.0 (f1edd0429 2021-11-29)
cargo 1.57.0 (b2e52d7ca 2021-10-21)
NVIM v0.6.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplic
it-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/bu
ild/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az65-618
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Run :checkhealth for more info
- Lingua principale
- Vim Script
- Stelle
- 4.2k
- Fork
- 323
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/rust.vim
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
-
It's Dead, Jim!Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Remove hard coded edition fallbackForse già presa @alerque l’ha presa 230 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
-
README.md syntastic to aleAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di rust-lang/rust.vim
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
mglaman/phpstan-drupal#1078 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Python mod.Box[T] annotation gets a false generic_arg edge that replaces the parameter_type one ('is' on tree-sitter nodes)Forse già presa @rohit-jsfreaky l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Graphify-Labs/graphify#5110 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
voyageurworks/launch-guard-pack#29 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
bigbio/sdrf-pipelines#372 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno