aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/checks/lints/rust-lint-unused-var.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/checks/lints/rust-lint-unused-var.cc b/gcc/rust/checks/lints/rust-lint-unused-var.cc
index f60cfac..4928fb2 100644
--- a/gcc/rust/checks/lints/rust-lint-unused-var.cc
+++ b/gcc/rust/checks/lints/rust-lint-unused-var.cc
@@ -17,7 +17,7 @@
// <http://www.gnu.org/licenses/>.
#include "rust-lint-unused-var.h"
-#include "print-tree.h"
+#include "rust-gcc.h"
namespace Rust {
namespace Analysis {
@@ -84,8 +84,8 @@ UnusedVariables::Lint (Compile::Context &ctx)
for (auto &var : ctx.get_var_decls ())
{
- tree t = ctx.get_backend ()->var_expression (var, Location ());
- check_decl (&t);
+ tree decl = var->get_decl ();
+ check_decl (&decl);
}
for (auto &const_decl : ctx.get_const_decls ())