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 d42f1c8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ 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.

## Troubleshooting

### CI output differs from local

Make sure `rust-src` component is installed on CI, otherwise error messages
on CI will not include snippets of code from the standard library.

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

<br>

#### License
Expand Down
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@
//! 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.
//!
//! # Troubleshooting
//!
//! ## CI output differs from local
//!
//! Make sure `rust-src` component is installed on CI, otherwise error messages
//! on CI will not include snippets of code from the standard library.
//!
//! ```bash
//! rustup component add rust-src
//! ```
#![doc(html_root_url = "https://docs.rs/trybuild/1.0.99")]
#![allow(
Expand Down

0 comments on commit d42f1c8

Please sign in to comment.