Closed
Description
When running
cargo +nightly doc -Z unstable-options -Z rustdoc-scrape-examples=examples
on the ice
branch of https://github.com/mejrs/pyo3/tree/ice , I get the following error:
~/pyo3$ cargo +nightly doc -Z unstable-options -Z rustdoc-scrape-examples=examples
Compiling pyo3 v0.14.5 (/home/bruno/pyo3)
thread 'rustc' panicked at 'assertion failed: enclosing_item_span.contains(expr_span)', src/librustdoc/scrape_examples.rs:93:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
error: Unrecognized option: 'scrape-examples-output-path'
error: could not document `pyo3`
Caused by:
process didn't exit successfully: `rustdoc --edition=2018 --crate-type bin --crate-name word_count examples/word-count/src/lib.rs -o /home/bruno/pyo3/target/doc --cfg 'feature="auto-initialize"' --cfg 'feature="default"' --cfg 'feature="extension-module"' --cfg 'feature="indoc"' --cfg 'feature="macros"' --cfg 'feature="paste"' --cfg 'feature="pyo3-macros"' --cfg 'feature="unindent"' --error-format=json --json=diagnostic-rendered-ansi -C metadata=4cd6a3c2c10c880b -Zunstable-options --scrape-examples-output-path /home/bruno/pyo3/target/debug/deps/pyo3-87828202807095e6.examples --scrape-examples-target-crate pyo3-macros --scrape-examples-target-crate pyo3-macros-backend --scrape-examples-target-crate pyo3-build-config --scrape-examples-target-crate pyo3-benchmarks --scrape-examples-target-crate pyo3 --scrape-examples-target-crate pyo3-pytests --scrape-examples-target-crate maturin-starter --scrape-examples-target-crate setuptools-rust-starter --scrape-examples-target-crate word-count -L dependency=/home/bruno/pyo3/target/debug/deps --extern assert_approx_eq=/home/bruno/pyo3/target/debug/deps/libassert_approx_eq-73f29b3f801eac6d.rmeta --extern bitflags=/home/bruno/pyo3/target/debug/deps/libbitflags-c30f35abb0b74f97.rmeta --extern cfg_if=/home/bruno/pyo3/target/debug/deps/libcfg_if-88879d2dc0fa106c.rmeta --extern criterion=/home/bruno/pyo3/target/debug/deps/libcriterion-a1abf6832c975b25.rmeta --extern half=/home/bruno/pyo3/target/debug/deps/libhalf-b6e268e7a94f2f0e.rmeta --extern indoc=/home/bruno/pyo3/target/debug/deps/libindoc-7a3b6554d729eba7.rmeta --extern libc=/home/bruno/pyo3/target/debug/deps/liblibc-56b7c085aca1bd82.rmeta --extern parking_lot=/home/bruno/pyo3/target/debug/deps/libparking_lot-28e0a32b822985ad.rmeta --extern paste=/home/bruno/pyo3/target/debug/deps/libpaste-50cadf247695eb32.rmeta --extern proptest=/home/bruno/pyo3/target/debug/deps/libproptest-011787d4a2170b22.rmeta --extern pyo3=/home/bruno/pyo3/target/debug/deps/libpyo3-fd794029b70a5af7.rmeta --extern pyo3=/home/bruno/pyo3/target/debug/deps/libpyo3-fd794029b70a5af7.rmeta --extern pyo3_macros=/home/bruno/pyo3/target/debug/deps/libpyo3_macros-74b16cc6327df15f.so --extern rayon=/home/bruno/pyo3/target/debug/deps/librayon-6402c0587be315bb.rmeta --extern rustversion=/home/bruno/pyo3/target/debug/deps/librustversion-69c11d077ef44fc2.so --extern serde_json=/home/bruno/pyo3/target/debug/deps/libserde_json-28ebb15e8db233fc.rmeta --extern trybuild=/home/bruno/pyo3/target/debug/deps/libtrybuild-5db6156090fb714a.rmeta --extern unindent=/home/bruno/pyo3/target/debug/deps/libunindent-a67f785cc7bb6fd1.rmeta --crate-version 0.14.5 --cfg Py_3_6 --cfg Py_3_7 --cfg Py_3_8 --cfg 'py_sys_config="WITH_THREAD"' --cfg track_caller --cfg min_const_generics --cfg addr_of` (exit status: 1)
(this is quite a big library and I couldn't figure out a minimal example in the time I had)