diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2024-09-26 22:59:48 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2024-09-26 22:48:32 +0000 |
commit | 90a8ae7cca0d8bd6be09ac220350700c08a15c27 (patch) | |
tree | 083d17947db26cc2eead9751d7bf2f84a96d42b0 /gcc | |
parent | e4394ac6ffcfa04ed0db1bc2bf5f458d1432766c (diff) | |
download | gcc-90a8ae7cca0d8bd6be09ac220350700c08a15c27.zip gcc-90a8ae7cca0d8bd6be09ac220350700c08a15c27.tar.gz gcc-90a8ae7cca0d8bd6be09ac220350700c08a15c27.tar.bz2 |
Add box definition to avoid error
Box definition is part of the standard library and cannot be found during
name resolution. This simple definition prevent any error from being
emitted.
gcc/testsuite/ChangeLog:
* rust/compile/box_syntax_feature_gate.rs: Add box land item
definition.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/compile/box_syntax_feature_gate.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/box_syntax_feature_gate.rs b/gcc/testsuite/rust/compile/box_syntax_feature_gate.rs index 8eb5503..5f62a59 100644 --- a/gcc/testsuite/rust/compile/box_syntax_feature_gate.rs +++ b/gcc/testsuite/rust/compile/box_syntax_feature_gate.rs @@ -1,4 +1,6 @@ // { dg-options "-frust-compile-until=lowering" } +#[lang = "owned_box"] +pub struct Box<T>; fn main() { let x: Box<_> = box 1; //{ dg-error "box expression syntax is experimental." "" { target *-*-* } } |