From ce1235e2a2c3cb295d29ca26b85c676bc0e965e0 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 29 Aug 2023 09:21:16 +0200 Subject: [PATCH] Avoid a warning generated when compiling with g++ -Wshadow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: .../src/lib.rs.cc:801:20: warning: declaration of ‘value’ shadows a member of ‘rust::cxxbridge1::ManuallyDrop’ [-Wshadow] warning: 801 | ManuallyDrop(T &&value) : value(::std::move(value)) {} warning: | ~~~~^~~~~ warning: .../src/lib.rs.cc:800:5: note: shadowed declaration is here warning: 800 | T value; warning: | ^~~~~ --- gen/src/builtin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/src/builtin.rs b/gen/src/builtin.rs index 277c64f8d..ae73b13e5 100644 --- a/gen/src/builtin.rs +++ b/gen/src/builtin.rs @@ -279,7 +279,7 @@ pub(super) fn write(out: &mut OutFile) { writeln!(out, " T value;"); writeln!( out, - " ManuallyDrop(T &&value) : value(::std::move(value)) {{}}", + " ManuallyDrop(T &&arg) : value(::std::move(arg)) {{}}", ); writeln!(out, " ~ManuallyDrop() {{}}"); writeln!(out, "}};");