金庆的专栏

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  423 随笔 :: 0 文章 :: 454 评论 :: 0 Trackbacks
# How to show the first few errors of rustc

(Jin Qing's Column, Sep. 1, 2021)

When using VS Code to develop Rust, "cargo check" output maybe thousands of lines.
Use "cargo check --color=always 2>&1 | head -n100" to limit the output.

1. Change powershell terminal to cmd, because powershell fails to use pipe
    * Terminal -> New Terminal to open a terminal
    * Open the dropdown list by click the down arrow of "+" on the top-left of terminal
    * Select "Command Prompt"
2. Type and run command: `cargo test 2>&1 --color always | "d:\Program Files\Git\usr\bin\head.exe" -n100`
    * You should change the path of head.exe
posted on 2021-09-01 10:55 金庆 阅读(179) 评论(0)  编辑 收藏 引用 所属分类: 8. Rust

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理