You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(example found during hour n of chasing down doctest failures for error codes long forgotten)
$ cat repro.rs
#[inline()]
pub fn something() {}
fn main() {}
$ rustc repro.rs
error[E0534]: expected one argument
--> repro.rs:1:1
|
1 | #[inline()]
| ^^^^^^^^^^^
error: aborting due to previous error
$ cat repro.md
```compile_fail
this should fail to compile, because this text is not valid Rust code
```
```compile_fail
#[inline()]
pub fn something() {}
fn main() {}
```
$ rustdoc --test repro.md
running 2 tests
test repro.md - (line 1) ... ok
test repro.md - (line 6) ... FAILED
failures:
---- repro.md - (line 6) stdout ----
thread 'rustc' panicked at 'test compiled while it wasn't supposed to', /checkout/src/librustdoc/test.rs:263:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failures:
repro.md - (line 6)
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
The doctest output claims that the code in a compile_fail block "compiled while it wasn't supposed to," but we saw just a moment before that that code does not, in fact, compile.
After repatriating error explanations to the global registry, some lurking
doctest failures surfaced and needed to be chased down. Sadly, a few doctests
needed to be ignored due to a not-yet-understood regression in the doctest
`compile_fail` functionality (filed rust-lang#43707).
(example found during hour n of chasing down doctest failures for error codes long forgotten)
The doctest output claims that the code in a
compile_fail
block "compiled while it wasn't supposed to," but we saw just a moment before that that code does not, in fact, compile.The text was updated successfully, but these errors were encountered: