Merge pull request #761 from alexcrichton/more-globals

web-sys: Add support for `Global`-scope methods
This commit is contained in:
Alex Crichton
2018-08-28 18:36:53 -07:00
committed by GitHub
16 changed files with 296 additions and 202 deletions

View File

@ -514,6 +514,7 @@ impl<'a> ConvertToAst<(BindgenAttrs, &'a Option<String>)> for syn::ForeignItemFn
let shim = {
let ns = match kind {
ast::ImportFunctionKind::ScopedMethod { .. } |
ast::ImportFunctionKind::Normal => (0, "n"),
ast::ImportFunctionKind::Method { ref class, .. } => (1, &class[..]),
};