How to show the first few errors of rustc

Posted 金庆

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了How to show the first few errors of rustc相关的知识,希望对你有一定的参考价值。

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

以上是关于How to show the first few errors of rustc的主要内容,如果未能解决你的问题,请参考以下文章

java 将第一个字母大写。链接:https://stackoverflow.com/questions/3419521/how-to-capitalize-the-first-letter-of-t

How to do if the GM MDI cant connect with the software

How to set the bash display to not show the vim text after exit?

How to Install The Alpha Control Packages.

how to change the ruby and rails version

How to Choose the Best Way to Pass Multiple Models in ASP.NET MVC