We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb204d7 commit cd62410Copy full SHA for cd62410
src/bindgen/ir/ty.rs
@@ -270,14 +270,7 @@ impl ConstExpr {
270
let generic_path = GenericPath::load(&path.path)?;
271
Ok(ConstExpr::Name(generic_path.export_name().to_owned()))
272
}
273
- syn::Expr::Cast(ref cast) => {
274
- let expr = match *cast.expr {
275
- syn::Expr::Path(ref path) => path,
276
- _ => return Err(format!("can't handle const expression {:?}", cast)),
277
- };
278
- let generic_path = GenericPath::load(&expr.path)?;
279
- Ok(ConstExpr::Name(generic_path.export_name().to_owned()))
280
- }
+ syn::Expr::Cast(ref cast) => Ok(ConstExpr::load(&cast.expr)?),
281
_ => Err(format!("can't handle const expression {:?}", expr)),
282
283
0 commit comments