-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a comment next to #![feature(ptr_metadata,)]
silences failing doctests
#134221
Comments
The bug appears to be not that your test fails, but rather that it suceeds when you add the comment. /*!
```rust
#![feature(
foo, //
)]
```
*/ This as a sole In 1.81, this code still errored correctly, but it was accepted in 1.82 and above. |
Would be good to get a more precise bisection |
Wait on hold, @cyrgani to double-check, do you mean this as a doctest? |
searched nightlies: from nightly-2024-07-20 to nightly-2024-08-30 bisected with cargo-bisect-rustc v0.6.9Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --script=./check.sh --start=1.81.0 --end=2024-08-30 --regress=success |
cc @GuillaumeGomez as this bisects to #126245, do you know if this is intended behavior change? |
Good one. 🫠 It's true my doctest was broken but the Can't get a doctest to pass? Add a nonexistent |
See rust-lang/rust#134221 for more details.
#![feature(ptr_metadata,)]
breaks doctests#![feature(ptr_metadata,)]
silences failing doctests
#![feature(ptr_metadata,)]
silences failing doctests#![feature(ptr_metadata,)]
silences failing doctests
Great now I know how to get all my doctests to pass! |
Note that there seem to be 2 underlying problems:
//! ```rust
//! #![
//! ```
|
No it's not an intended behaviour change. ^^' Gonna check what's going on. |
Opened #134260. |
Reproduce
https://github.com/ink-feather-org/trait_cast_rs/tree/80a0a0994dfdbf5e8b6978879ce3205188401df1
1:
git clone https://github.com/ink-feather-org/trait_cast_rs.git git checkout 80a0a0994dfdbf5e8b6978879ce3205188401df1 cargo test --all-features
All tests pass!
2:
Remove the comment in line 43 of the
README.md
:Next run the tests again:
cargo test --all-features
Oh no! The test fails with
E0119
.What is going on?!? I did not expect the comment breaking anything.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: