diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-05 09:03:13 -0800 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-07 16:01:43 -1000 |
commit | 9ac59f8ad0171dc93cced2a2d69b49fcf13f814a (patch) | |
tree | 7c65426cccebb7bcc688d6eef3effa0ad63cfb94 /libbindgen/src | |
parent | 47e4ec7477a110265117a07bc290987b532861f9 (diff) |
ir: Auto-whitelist replacements.
Diffstat (limited to 'libbindgen/src')
-rw-r--r-- | libbindgen/src/ir/context.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbindgen/src/ir/context.rs b/libbindgen/src/ir/context.rs index ebc7f10a..f832a5d2 100644 --- a/libbindgen/src/ir/context.rs +++ b/libbindgen/src/ir/context.rs @@ -947,6 +947,12 @@ impl<'ctx> BindgenContext<'ctx> { return true; } + // If this is a type that explicitly replaces another, we assume + // you know what you're doing. + if item.annotations().use_instead_of().is_some() { + return true; + } + let name = item.name(self).for_name_checking().get(); match *item.kind() { ItemKind::Module(..) => true, |