diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-08-21 15:09:23 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-08-22 12:30:27 +0000 |
commit | 06e8b826d77d47467cb378d122a04465be28e2f4 (patch) | |
tree | 0888ff81747ebdb67e5e7244711559379e303a71 /gcc/rust/util/rust-attributes.cc | |
parent | 51948d296cda2828e6537db4a2fccad39b1281b7 (diff) | |
download | gcc-06e8b826d77d47467cb378d122a04465be28e2f4.zip gcc-06e8b826d77d47467cb378d122a04465be28e2f4.tar.gz gcc-06e8b826d77d47467cb378d122a04465be28e2f4.tar.bz2 |
attributes: Start handling prelude_import properly
This commit adds basic handling for the `#[prelude_import]` attribute,
without doing anything functionality wise.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::visit): Add base
feature gating for `#[feature(prelude_import)]`.
* checks/errors/rust-feature-gate.h: Likewise.
* checks/errors/rust-feature.cc (Feature::create): Likewise.
* checks/errors/rust-feature.h: Likewise.
* util/rust-attribute-values.h: Add base handling for `#[prelude_import]`
attribute.
* util/rust-attributes.cc: Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/prelude_import.rs: New test.
Diffstat (limited to 'gcc/rust/util/rust-attributes.cc')
-rw-r--r-- | gcc/rust/util/rust-attributes.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index 3316667..14f00bd 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -64,7 +64,8 @@ static const BuiltinAttrDefinition __definitions[] {Attrs::UNSTABLE, STATIC_ANALYSIS}, // assuming we keep these for static analysis {Attrs::RUSTC_CONST_STABLE, STATIC_ANALYSIS}, - {Attrs::RUSTC_CONST_UNSTABLE, STATIC_ANALYSIS}}; + {Attrs::RUSTC_CONST_UNSTABLE, STATIC_ANALYSIS}, + {Attrs::PRELUDE_IMPORT, NAME_RESOLUTION}}; BuiltinAttributeMappings * BuiltinAttributeMappings::get () |