1
Fork 0

coverage: Extract hole spans from HIR instead of MIR

This makes it possible to treat more kinds of nested item/code as holes,
instead of being restricted to closures.
This commit is contained in:
Zalathar 2024-07-01 13:29:54 +10:00
parent 9b2c58d1fa
commit 63c04f05e6
19 changed files with 200 additions and 181 deletions

View file

@ -34,10 +34,10 @@ $DIR/doctest.rs:
LL| |//!
LL| |//! doctest returning a result:
LL| 1|//! ```
LL| 1|//! #[derive(Debug, PartialEq)]
LL| 1|//! struct SomeError {
LL| 1|//! msg: String,
LL| 1|//! }
LL| |//! #[derive(Debug, PartialEq)]
LL| |//! struct SomeError {
LL| |//! msg: String,
LL| |//! }
LL| 1|//! let mut res = Err(SomeError { msg: String::from("a message") });
LL| 1|//! if res.is_ok() {
LL| 0|//! res?;