Add call to ast validation check, also add appropriate step to this pass
and the feature gating.
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Add call to ast
validation.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
#include "rust-unicode.h"
#include "rust-attribute-values.h"
#include "rust-borrow-checker.h"
+#include "rust-ast-validation.h"
#include "input.h"
#include "selftest.h"
rust_debug ("END POST-EXPANSION AST DUMP");
}
+ // AST Validation pass
+ if (last_step == CompileOptions::CompileStep::ASTValidation)
+ return;
+
+ ASTValidation ().check (parsed_crate);
+
// feature gating
+ if (last_step == CompileOptions::CompileStep::FeatureGating)
+ return;
FeatureGate ().check (parsed_crate);
if (last_step == CompileOptions::CompileStep::NameResolution)