diff options
author | Nick Fitzgerald <fitzgen@gmail.com> | 2016-10-17 15:08:50 -0700 |
---|---|---|
committer | Nick Fitzgerald <fitzgen@gmail.com> | 2016-10-18 13:17:33 -0700 |
commit | 7cea09c3a03bc058125e5a4476e92381b94e00d5 (patch) | |
tree | 209e00c2b66fb6e215344537f5f59190360fcd7c /src | |
parent | 9426353cba332098c1343c0388e8a922f46e43bd (diff) |
Ignore doctests that are really C++ code samples, or aren't meant to run
Diffstat (limited to 'src')
-rw-r--r-- | src/codegen/mod.rs | 2 | ||||
-rw-r--r-- | src/ir/annotations.rs | 2 | ||||
-rw-r--r-- | src/ir/context.rs | 2 | ||||
-rw-r--r-- | src/ir/item.rs | 2 | ||||
-rwxr-xr-x | src/lib.rs | 14 |
5 files changed, 4 insertions, 18 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index a5159c98..5688065f 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -41,7 +41,7 @@ struct CodegenResult { /// The set of generated function/var names, needed because in C/C++ is legal to /// do something like: /// - /// ``` + /// ```c++ /// extern "C" { /// void foo(); /// extern int bar; diff --git a/src/ir/annotations.rs b/src/ir/annotations.rs index cc61dbfd..64ab255d 100644 --- a/src/ir/annotations.rs +++ b/src/ir/annotations.rs @@ -87,7 +87,7 @@ impl Annotations { /// /// the generated code would look something like: /// - /// ```rust + /// ```c++ /// /** <div rustbindgen replaces="Bar"></div> */ /// struct Bar { /// int x; diff --git a/src/ir/context.rs b/src/ir/context.rs index e6659697..da5f334f 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -421,7 +421,7 @@ impl<'ctx> BindgenContext<'ctx> { /// /// To see an example of what this handles: /// - /// ``` + /// ```c++ /// template<typename T> /// class Incomplete { /// T p; diff --git a/src/ir/item.rs b/src/ir/item.rs index 5b6297bd..4808806b 100644 --- a/src/ir/item.rs +++ b/src/ir/item.rs @@ -28,7 +28,7 @@ pub trait ItemCanonicalName { /// /// To contrast with canonical_name, here's an example: /// -/// ``` +/// ```c++ /// namespace foo { /// const BAR = 3; /// } @@ -294,20 +294,6 @@ impl Bindings { } } -#[test] -fn builder_state() { - let logger = DummyLogger; - let mut build = builder(); - { - build.header("example.h"); - build.link_static("m"); - build.log(&logger); - } - assert!(build.logger.is_some()); - assert!(build.options.clang_args.binary_search(&"example.h".to_owned()).is_ok()); - assert!(build.options.links.binary_search(&("m".to_owned(), LinkType::Static)).is_ok()); -} - /// Determines whether the given cursor is in any of the files matched by the /// options. fn filter_builtins(ctx: &BindgenContext, cursor: &clang::Cursor) -> bool { |