-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow rustc_const_stable and rustc_const_unstable
gcc/rust/ChangeLog: * expand/rust-macro-builtins.cc (MacroBuiltin::builtin_transcribers): Add entries for "rustc_const_stable" and "rustc_const_unstable". * util/rust-attributes.cc (__definitions): Add entries for RUSTC_CONST_STABLE and RUSTC_CONST_UNSTABLE. * util/rust-attribute-values.h (Attributes::RUSTC_CONST_STABLE): New. (Attributes::RUSTC_CONST_UNSTABLE): New. gcc/testsuite/ChangeLog: * rust/compile/rustc_const_stable.rs: Enable feature rustc_attrs, expect no errors. * rust/compile/rustc_const_unstable.rs: New test. Signed-off-by: Owen Avery <[email protected]>
- Loading branch information
1 parent
9ade15d
commit 6460460
Showing
5 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#![feature(rustc_attrs)] | ||
|
||
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")] | ||
pub fn foo() {} // { dg-error "macro not found" "" { target *-*-* } .-1 } | ||
pub fn foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#![feature(rustc_attrs)] | ||
|
||
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "1234")] | ||
pub fn foo() {} |