IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    How to show the first few errors of rustc

    金庆发表于 2021-09-01 02:55:00
    love 0
    # 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


    金庆 2021-09-01 10:55 发表评论


沪ICP备19023445号-2号
友情链接