From: Pierre-Emmanuel Patry Date: Thu, 26 Sep 2024 20:59:48 +0000 (+0200) Subject: Add box definition to avoid error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90a8ae7cca0d8bd6be09ac220350700c08a15c27;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/rust/compile/box_syntax_feature_gate.rs b/gcc/testsuite/rust/compile/box_syntax_feature_gate.rs index 8eb5503dde6c..5f62a59a04bf 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; fn main() { let x: Box<_> = box 1; //{ dg-error "box expression syntax is experimental." "" { target *-*-* } }