Skip to content
Snippets Groups Projects
Commit fd5eb9f2 authored by mxlol233's avatar mxlol233 Committed by Arthur Cohen
Browse files

gccrs: Add feature gate for "rust-intrinsic".


This commit implemented a feature gate to check `intrinsics`.

gcc/rust/ChangeLog:

	* checks/errors/rust-feature-gate.cc: Add implementation for
	`void FeatureGate::visit (AST::ExternBlock &block)`. Add `valid_feature`
	construction process in `FeatureGate::check`.
	* checks/errors/rust-feature-gate.h: Add declaration for
	`void FeatureGate::visit (AST::ExternBlock &block)`. Add private
	variable `valid_feature`.
	* checks/errors/rust-feature.h: Change `issue` to `m_issue`.

gcc/testsuite/ChangeLog:

	* rust/compile/const-issue1440.rs: Add crate feature: `intrinsics`.
	* rust/compile/feature_intrinsics.rs: New file.
	* rust/compile/issue-1031.rs: Add crate feature: `intrinsics`.
	* rust/compile/issue-1130.rs: Add crate feature: `intrinsics`.
	* rust/compile/issue-1131.rs: Add crate feature: `intrinsics`.
	* rust/compile/issue-1237.rs: Add crate feature: `intrinsics`.
	* rust/compile/issue-1289.rs: Add crate feature: `intrinsics`.
	* rust/compile/rust-const-blog-issue.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/intrinsics-3.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/intrinsics-4.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/intrinsics-5.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/intrinsics-6.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/intrinsics-7.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/issue-1024.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/issue-1075.rs: Add crate feature: `intrinsics`.
	* rust/compile/torture/issue-1432.rs: Add crate feature: `intrinsics`.
	* rust/compile/unsafe10.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/atomic_load.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/atomic_store.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/copy_nonoverlapping1.rs: Add crate feature:
	`intrinsics`.
	* rust/execute/torture/issue-1120.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/issue-1133.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/issue-1232.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/slice-magic.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/slice-magic2.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/str-layout1.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/transmute1.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/wrapping_op1.rs: Add crate feature: `intrinsics`.
	* rust/execute/torture/wrapping_op2.rs: Add crate feature: `intrinsics`.

Signed-off-by: default avatarXiao Ma <mxlol233@outlook.com>
parent b4229fb0
No related branches found
No related tags found
No related merge requests found
Showing
with 99 additions and 11 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment