Skip to content

Commit 4ddb7d1

Browse files
P-E-PCohenArthur
authored andcommitted
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 <[email protected]>
1 parent cc661d8 commit 4ddb7d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gcc/rust/ast/rust-ast-collector.cc

+4-2
Original file line numberDiff line numberDiff line change
@@ -809,10 +809,12 @@ TokenCollector::visit (Literal &lit, Location locus)
809809
Rust::Token::make_byte_string (locus, std::move (value)));
810810
break;
811811
case Literal::LitType::INT:
812-
tokens.push_back (Rust::Token::make_int (locus, std::move (value)));
812+
tokens.push_back (
813+
Rust::Token::make_int (locus, std::move (value), lit.get_type_hint ()));
813814
break;
814815
case Literal::LitType::FLOAT:
815-
tokens.push_back (Rust::Token::make_float (locus, std::move (value)));
816+
tokens.push_back (Rust::Token::make_float (locus, std::move (value),
817+
lit.get_type_hint ()));
816818
break;
817819
case Literal::LitType::BOOL: {
818820
if (value == "false")

0 commit comments

Comments
 (0)