Merge pull request #740 from alexcrichton/catch-constructors

Fix the `constructor` and `catch` attributes combined
This commit is contained in:
Alex Crichton
2018-08-20 11:37:02 -07:00
committed by GitHub
3 changed files with 19 additions and 1 deletions

View File

@ -486,7 +486,7 @@ impl<'a> ConvertToAst<(BindgenAttrs, &'a Option<String>)> for syn::ForeignItemFn
ast::ImportFunctionKind::Method { class, ty, kind }
} else if opts.constructor() {
let class = match wasm.ret {
let class = match js_ret {
Some(ref ty) => ty,
_ => bail_span!(self, "constructor returns must be bare types"),
};