-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
Upgrading from Rust 1.86 to 1.87 causes tests that were supposed to fail not to fail anymore, but I could not find a Compatibility Note about that, so I wonder if that is intentional or a regression.
Reproduction steps
- Create a new library:
cargo new a --lib
- Modify
src/lib.rs
://! ```rust //! #[derive(Clone)] //! ```
- Run
cargo test
with 1.86 and expect a failure:error: expected statement after outer attribute --> src/lib.rs:2:1 | 3 | #[derive(Clone)] |
- Append
,compile_fail
to the first line://! ```rust,compile_fail //! #[derive(Clone)] //! ```
- Run
cargo test
with 1.86 and expect success:test src/lib.rs - (line 1) - compile fail ... ok
- Retry steps 1-3 with 1.87+, which does not fail anymore:
test src/lib.rs - (line 1) ... ok
- Retry steps 1-5 with 1.87+, which now fails:
Test compiled successfully, but it's marked `compile_fail`.
Expected result
With 1.87+, step 3 should fail and step 5 should succeed as before, or it should be mentioned in the Compatibility Notes.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
No status