Skip to content

Commit 7cea09c

Browse files
committed
Ignore doctests that are really C++ code samples, or aren't meant to run
1 parent 9426353 commit 7cea09c

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

src/codegen/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct CodegenResult {
4141
/// The set of generated function/var names, needed because in C/C++ is legal to
4242
/// do something like:
4343
///
44-
/// ```
44+
/// ```c++
4545
/// extern "C" {
4646
/// void foo();
4747
/// extern int bar;

src/ir/annotations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl Annotations {
8787
///
8888
/// the generated code would look something like:
8989
///
90-
/// ```rust
90+
/// ```c++
9191
/// /** <div rustbindgen replaces="Bar"></div> */
9292
/// struct Bar {
9393
/// int x;

src/ir/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ impl<'ctx> BindgenContext<'ctx> {
421421
///
422422
/// To see an example of what this handles:
423423
///
424-
/// ```
424+
/// ```c++
425425
/// template<typename T>
426426
/// class Incomplete {
427427
/// T p;

src/ir/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub trait ItemCanonicalName {
2828
///
2929
/// To contrast with canonical_name, here's an example:
3030
///
31-
/// ```
31+
/// ```c++
3232
/// namespace foo {
3333
/// const BAR = 3;
3434
/// }

src/lib.rs

-14
Original file line numberDiff line numberDiff line change
@@ -294,20 +294,6 @@ impl Bindings {
294294
}
295295
}
296296

297-
#[test]
298-
fn builder_state() {
299-
let logger = DummyLogger;
300-
let mut build = builder();
301-
{
302-
build.header("example.h");
303-
build.link_static("m");
304-
build.log(&logger);
305-
}
306-
assert!(build.logger.is_some());
307-
assert!(build.options.clang_args.binary_search(&"example.h".to_owned()).is_ok());
308-
assert!(build.options.links.binary_search(&("m".to_owned(), LinkType::Static)).is_ok());
309-
}
310-
311297
/// Determines whether the given cursor is in any of the files matched by the
312298
/// options.
313299
fn filter_builtins(ctx: &BindgenContext, cursor: &clang::Cursor) -> bool {

0 commit comments

Comments
 (0)