RustTest doesn't recognize tokio::test

Offen
#463 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
rust, vim
Bereich
tooling

Rechercherichtung

Start by locating the :RustTest implementation and its test coverage for recognizing Rust test functions. Compare the supported #[test] form with the reported #[tokio::test] form. Done means placing the cursor on an async Tokio test function and running :RustTest finds and runs that test.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

  • rust.vim version: Using latest via vim-plug

Steps to reproduce:

  • Put cursor on test function name
  • :RustTest

Expected vs. actual behavior:

  • Expected: runs the test
  • Actual: finds no test under cursor

Works:

#[test]
fn test() {}

Does not work:

#[tokio::test]
async fn a_test() {}

Paste debugging info from the Rust Vim plugin via one of the following
commands: :RustInfo, :RustInfoToClipboard, or :RustInfoToFile <filename>.

rust.vim Global Variables:

let g:ftplugin_rust_source_path = v:null
let g:loaded_syntastic_rust_cargo_checker = 1
let g:loaded_syntastic_rust_filetype = v:null
let g:loaded_syntastic_rust_rustc_checker = 1
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 = v:null
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 = 1
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 = ''
rustfmt 1.4.38-nightly (e90c5fb 2021-11-12)

rustc 1.58.0-nightly (e90c5fbbc 2021-11-12)

cargo 1.58.0-nightly (2e2a16e98 2021-11-08)


VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 20 2021 11:42:42)
Included patches: 1-2269
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +conceal           +folding           +menu              +packages          +startuptime       +vartabs
+arabic            +cryptv            -footer            +mksession         +path_extra        +statusline        +vertsplit
+autocmd           +cscope            +fork()            +modify_fname      +perl              -sun_workshop      +virtualedit
+autochdir         +cursorbind        +gettext           +mouse             +persistent_undo   +syntax            +visual
-autoservername    +cursorshape       -hangul_input      +mouseshape        +postscript        +tag_binary        +visualextra
+balloon_eval      +dialog_con_gui    +iconv             +mouse_dec         +printer           -tag_old_static    +viminfo
+balloon_eval_term +diff              +insert_expand     +mouse_gpm         +profile           -tag_any_white     +vreplace
+browse            +digraphs          +job               -mouse_jsbterm     -python            +tcl               +wildignore
++builtin_terms    +dnd               +jumplist          +mouse_netterm     +python3           +termguicolors     +wildmenu
+byte_offset       -ebcdic            +keymap            +mouse_sgr         +quickfix          +terminal          +windows
+channel           +emacs_tags        +lambda            -mouse_sysmouse    +reltime           +terminfo          +writebackup
+cindent           +eval              +langmap           +mouse_urxvt       +rightleft         +termresponse      +X11
+clientserver      +ex_extra          +libcall           +mouse_xterm       -ruby              +textobjects       -xfontset
+clipboard         +extra_search      +linebreak         +multi_byte        +scrollbind        +textprop          +xim
+cmdline_compl     -farsi             +lispindent        +multi_lang        +signs             +timers            +xpm
+cmdline_hist      +file_in_path      +listcmds          -mzscheme          +smartindent       +title             +xsmp_interact
+cmdline_info      +find_in_path      +localmap          +netbeans_intg     +sound             +toolbar           +xterm_clipboard
+comments          +float             +lua               +num64             +spell             +user_commands     -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-RjZCd2/vim-8.1.2269=. -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -Wl,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lcanberra -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.30/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -lpython3.8 -lcrypt -lpthread -ldl -lutil -lm -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm     
----
Info from Syntastic:
Syntastic version: 3.10.0-32 (Vim 801, Linux, GUI)
Info for filetype: rust
Global mode: active
Filetype rust is active
The current file will be checked automatically
Available checkers: cargo rustc
Currently enabled checker: cargo
Vorherrschende Sprache
Vim Script
Sterne
4.2k
Forks
323
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rust-lang/rust.vim

Alle Issues in rust-lang/rust.vim

Ähnliche Issues

Weitere Issues zu DevTools

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.