Skip to content

Commit

Permalink
Merge pull request #288 from Veetaha/feat/add-rust-src-caveat-warning
Browse files Browse the repository at this point in the history
Warn about the `rust-src` component footgun in the docs
  • Loading branch information
dtolnay authored Oct 15, 2024
2 parents 2860c0f + 412e9b6 commit 3622a83
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 3622a83

Please sign in to comment.