diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2025-03-01 18:05:07 -0500 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-03-05 10:21:36 +0000 |
commit | bee59d62a9b5063dffc59772040b42856594eebc (patch) | |
tree | dfcd996a5aa978958e086ca4080af9369044f229 /gcc/rust/expand | |
parent | 9e6d06e93df566046225afc541511893bbeab845 (diff) | |
download | gcc-bee59d62a9b5063dffc59772040b42856594eebc.zip gcc-bee59d62a9b5063dffc59772040b42856594eebc.tar.gz gcc-bee59d62a9b5063dffc59772040b42856594eebc.tar.bz2 |
Reduce usage of rust-session-manager.h
gcc/rust/ChangeLog:
* util/rust-edition.cc: New file.
* util/rust-edition.h: New file.
* Make-lang.in: Add rust-edition.o to the object list.
* ast/rust-pattern.cc: Remove inclusion of
rust-session-manager.h.
* expand/rust-macro-expand.cc: Likewise.
* expand/rust-macro-builtins-helpers.h: Likewise.
* expand/rust-macro-builtins-include.cc: Include
rust-session-manager.h.
* expand/rust-macro-builtins-utility.cc: Likewise.
* lex/rust-lex.cc: Include rust-edition.h instead of
rust-session-manager.h.
(Lexer::classify_keyword): Use get_rust_edition instead of
Session and CompileOptions.
* parse/rust-parse-impl.h: Include rust-edition.h instead of
rust-session-manager.h.
(Parser::parse_async_item): Use get_rust_edition instead of
Session and CompileOptions.
* checks/errors/rust-feature.h: Include rust-edition.h instead
of rust-session-manager.h.
(class Feature): Use Rust::Edition instead of
Rust::CompileOptions::Edition.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/expand')
-rw-r--r-- | gcc/rust/expand/rust-macro-builtins-helpers.h | 1 | ||||
-rw-r--r-- | gcc/rust/expand/rust-macro-builtins-include.cc | 1 | ||||
-rw-r--r-- | gcc/rust/expand/rust-macro-builtins-utility.cc | 1 | ||||
-rw-r--r-- | gcc/rust/expand/rust-macro-expand.cc | 1 |
4 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/expand/rust-macro-builtins-helpers.h b/gcc/rust/expand/rust-macro-builtins-helpers.h index 0a31297..df34cd0 100644 --- a/gcc/rust/expand/rust-macro-builtins-helpers.h +++ b/gcc/rust/expand/rust-macro-builtins-helpers.h @@ -29,7 +29,6 @@ #include "rust-macro-invoc-lexer.h" #include "rust-macro.h" #include "rust-parse.h" -#include "rust-session-manager.h" #include "rust-system.h" #include "rust-token.h" namespace Rust { diff --git a/gcc/rust/expand/rust-macro-builtins-include.cc b/gcc/rust/expand/rust-macro-builtins-include.cc index d54ce3b..3d2a954 100644 --- a/gcc/rust/expand/rust-macro-builtins-include.cc +++ b/gcc/rust/expand/rust-macro-builtins-include.cc @@ -20,6 +20,7 @@ #include "rust-common.h" #include "rust-macro-builtins.h" #include "rust-macro-builtins-helpers.h" +#include "rust-session-manager.h" #include "optional.h" namespace Rust { /* Expand builtin macro include_bytes!("filename"), which includes the contents diff --git a/gcc/rust/expand/rust-macro-builtins-utility.cc b/gcc/rust/expand/rust-macro-builtins-utility.cc index 28829a1..b0519a3 100644 --- a/gcc/rust/expand/rust-macro-builtins-utility.cc +++ b/gcc/rust/expand/rust-macro-builtins-utility.cc @@ -20,6 +20,7 @@ #include "rust-ast-builder.h" #include "rust-macro-builtins.h" #include "rust-macro-builtins-helpers.h" +#include "rust-session-manager.h" namespace Rust { diff --git a/gcc/rust/expand/rust-macro-expand.cc b/gcc/rust/expand/rust-macro-expand.cc index 1f38ad3..0b01ede 100644 --- a/gcc/rust/expand/rust-macro-expand.cc +++ b/gcc/rust/expand/rust-macro-expand.cc @@ -26,7 +26,6 @@ #include "rust-parse.h" #include "rust-cfg-strip.h" #include "rust-early-name-resolver.h" -#include "rust-session-manager.h" #include "rust-proc-macro.h" namespace Rust { |