RustTest doesn't recognize tokio::test

Ouverte
#463 3 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
rust, vim
Domaine
tooling

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

  • 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
Langage dominant
Vim Script
Étoiles
4.2k
Forks
323
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de rust-lang/rust.vim

Toutes les issues de rust-lang/rust.vim

Issues similaires

Plus d'issues DevTools

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.