]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: attributes: Start handling prelude_import properly
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 21 Aug 2024 13:09:23 +0000 (15:09 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:04 +0000 (15:32 +0100)
commit231b18b071b8a809765841461cd307770ae2ee8d
treea64c8e08cb01ed0a5120a02e366e2d58674b19e7
parent9ba10b08213a25854909836660f28914149d723b
gccrs: 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.
gcc/rust/checks/errors/rust-feature-gate.cc
gcc/rust/checks/errors/rust-feature-gate.h
gcc/rust/checks/errors/rust-feature.cc
gcc/rust/checks/errors/rust-feature.h
gcc/rust/util/rust-attribute-values.h
gcc/rust/util/rust-attributes.cc
gcc/testsuite/rust/compile/prelude_import.rs [new file with mode: 0644]