aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-01-18 15:34:54 +0100
committerPhilip Herron <herron.philip@googlemail.com>2021-01-18 17:46:17 +0000
commit3713577c36eeba454e8bd3aef6bfce5ee6683c2b (patch)
treeb6907a8cd65267397e79c1df4fbe5ea40063e5cf /gcc
parentc55cd0e10c00d66cf159fc8f3f309186e1a576d1 (diff)
downloadgcc-3713577c36eeba454e8bd3aef6bfce5ee6683c2b.zip
gcc-3713577c36eeba454e8bd3aef6bfce5ee6683c2b.tar.gz
gcc-3713577c36eeba454e8bd3aef6bfce5ee6683c2b.tar.bz2
Turn brace-enclosed initializer list into actual assignments
... as used otherwise, in this file. And, this avoids: [...]/source-gcc/gcc/rust/parse/rust-parse-impl.h:12243:72: error: could not convert '{false, true}' from '<brace-enclosed initializer list>' to 'Rust::ParseRestrictions' = {/* can_be_struct_expr = */ false, /* entered_from_unary = */ true}; ^
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 7b72bbb..ea468ca 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -12239,10 +12239,9 @@ Parser<ManagedTokenSource>::null_denotation (
// HACK: as struct expressions should always be value expressions,
// cannot be referenced
- ParseRestrictions entered_from_unary
- = {/* can_be_struct_expr = */ false, /* entered_from_unary = */ true};
- /*entered_from_unary.entered_from_unary = true;
- entered_from_unary.can_be_struct_expr = false;*/
+ ParseRestrictions entered_from_unary;
+ entered_from_unary.entered_from_unary = true;
+ entered_from_unary.can_be_struct_expr = false;
if (lexer.peek_token ()->get_id () == MUT)
{