Skip to content

plugins not working in doc tests #1512

Closed
@BurntSushi

Description

@BurntSushi

I don't know if this is a Cargo bug or a rustdoc bug, but my guess is that Cargo isn't passing the right flags to rustdoc? Not sure. Anyway, here's my Cargo.toml and src/lib.rs. And the result:

[andrew@Liger regex-macro-doc] cargo test --verbose
       Fresh regex v0.1.27
       Fresh regex_macros v0.1.15
       Fresh regex-macro-doc v0.0.1 (file:///tmp/regex-macro-doc)
     Running `/tmp/regex-macro-doc/target/debug/regex_macro_doc-68cb5f18687e3033`

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests regex-macro-doc
     Running `rustdoc --test /tmp/regex-macro-doc/src/lib.rs --crate-name regex_macro_doc -L dependency=/tmp/regex-macro-doc/target/debug/deps --extern regex=/tmp/regex-macro-doc/target/debug/deps/libregex-792c67aed9f650b7.rlib --extern regex_macro_doc=/tmp/regex-macro-doc/target/debug/libregex_macro_doc-7a0562b1795f245b.rlib`
/tmp/regex-macro-doc/src/lib.rs:2:11: 2:23 error: can't find crate for `regex_macros`
/tmp/regex-macro-doc/src/lib.rs:2 #![plugin(regex_macros)]
                                            ^~~~~~~~~~~~
error: aborting due to previous error
thread '<unnamed>' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:153
thread '<main>' panicked at 'child thread None panicked', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thread/mod.rs:703

Version info:

[andrew@Liger regex-macro-doc] mr show-default
multirust: default toolchain: nightly
multirust: default location: /home/andrew/.multirust/toolchains/nightly

rustc 1.0.0-nightly (93f7fe32d 2015-04-10) (built 2015-04-11)
cargo 0.0.1-pre-nightly (72c2e3d 2015-04-10) (built 2015-04-10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions