Skip to content

Compile fails on Rust 1.38 and 1.39 #35

@taiki-e

Description

@taiki-e

cfg(doctest) implemented in Rust 1.38 as an unstable feature, and stabilized in Rust 1.40. It compiles fine on Rust 1.37 and older, but fails on Rust 1.38 and 1.39, where this feature existed as an unstable feature.

termcolor/src/lib.rs

Lines 122 to 125 in b052b61

#[cfg(doctest)]
use doc_comment::doctest;
#[cfg(doctest)]
doctest!("../README.md");

Error:

$ cargo +1.39.0 check
    Checking termcolor v1.1.1 (/Users/taiki/projects/termcolor)
error[E0658]: `cfg(doctest)` is experimental and subject to change
   --> src/lib.rs:122:7
    |
122 | #[cfg(doctest)]
    |       ^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/62210

cc #31
Related: rust-lang/regex#685

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions