Skip to content

Support compile_fail option in an example section #46

@zhiburt

Description

@zhiburt

The argument is described in https://doc.rust-lang.org/rustdoc/documentation-tests.html#attributes

This snipped is not recognized as rust code.

//! ```rust,compile_fail
//! use tabled::Tabled;
//!
//! #[derive(Tabled)]
//! struct SomeType {
//! field1: SomeOtherType,
//! }
//! 
//! struct SomeOtherType;
//! ```

The correct behavior should be the same as no_run, ignore, should_panic options has

use tabled::Tabled;

#[derive(Tabled)]
struct SomeType {
field1: SomeOtherType,
}

struct SomeOtherType;

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