Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support compile_fail option in an example section #46

Open
zhiburt opened this issue Mar 22, 2020 · 0 comments · May be fixed by #47
Open

Support compile_fail option in an example section #46

zhiburt opened this issue Mar 22, 2020 · 0 comments · May be fixed by #47

Comments

@zhiburt
Copy link

zhiburt commented Mar 22, 2020

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;
@zhiburt zhiburt linked a pull request Mar 22, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant