From: Pierre-Emmanuel Patry Date: Thu, 11 May 2023 14:13:41 +0000 (+0200) Subject: gccrs: ast: Propagate type suffix X-Git-Tag: basepoints/gcc-15~2530 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de8eed9b8efea12d5b7987206e8e9fb0109966ca;p=thirdparty%2Fgcc.git gccrs: ast: Propagate type suffix Propagate back type suffix to created tokens. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Propagate coretype hint. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index 45a760944990..a09869b7e6dd 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -809,10 +809,12 @@ TokenCollector::visit (Literal &lit, Location locus) Rust::Token::make_byte_string (locus, std::move (value))); break; case Literal::LitType::INT: - tokens.push_back (Rust::Token::make_int (locus, std::move (value))); + tokens.push_back ( + Rust::Token::make_int (locus, std::move (value), lit.get_type_hint ())); break; case Literal::LitType::FLOAT: - tokens.push_back (Rust::Token::make_float (locus, std::move (value))); + tokens.push_back (Rust::Token::make_float (locus, std::move (value), + lit.get_type_hint ())); break; case Literal::LitType::BOOL: { if (value == "false")