Skip to content

Commit

Permalink
Warn about the rust-src component footgun
Browse files Browse the repository at this point in the history
  • Loading branch information
Veetaha committed Oct 14, 2024
1 parent 2860c0f commit 412e9b6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ to catch. If the compiler changes something that makes error messages that we
care about substantially worse, it is also important to catch and report as a
compiler issue.

## CI

Make sure `rust-src` component is installed on CI, otherwise error messages
on CI will not include snippets of code from the standard library. This will
make sure the output on CI is the same as on your local machine.

```bash
rustup component add rust-src
```

<br>

#### License
Expand Down
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@
//! important for a test suite to catch. If the compiler changes something that
//! makes error messages that we care about substantially worse, it is also
//! important to catch and report as a compiler issue.
//!
//! # CI
//!
//! Make sure `rust-src` component is installed on CI, otherwise error messages
//! on CI will not include snippets of code from the standard library. This will
//! make sure the output on CI is the same as on your local machine.
//!
//! ```bash
//! rustup component add rust-src
//! ```

#![doc(html_root_url = "https://docs.rs/trybuild/1.0.99")]
#![allow(
Expand Down

0 comments on commit 412e9b6

Please sign in to comment.