We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a19065 commit a5b96c7Copy full SHA for a5b96c7
extensions/bindgen/private/bindgen.bzl
@@ -221,6 +221,11 @@ def _rust_bindgen_impl(ctx):
221
222
# Configure Bindgen Arguments
223
args.add_all(ctx.attr.bindgen_flags)
224
+
225
+ rust_toolchain = ctx.toolchains[Label("@rules_rust//rust:toolchain_type")]
226
+ if "--rust-edition " not in [f.split("=")[0] for f in ctx.attr.bindgen_flags]:
227
+ args.add("--rust-edition=%s" % rust_toolchain.default_edition)
228
229
args.add(header)
230
args.add("--output", output)
231
0 commit comments