From: jjasmine Date: Wed, 26 Jun 2024 14:39:00 +0000 (-0700) Subject: gccrs: Clean up monadic operations on expected<> X-Git-Tag: basepoints/gcc-16~1334 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3db0b39198500748007c298b3f1d45bdebe66a4;p=thirdparty%2Fgcc.git gccrs: Clean up monadic operations on expected<> gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (parse_asm): Clean up monadic operations on expected<> Signed-off-by: badumbatish --- diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc b/gcc/rust/expand/rust-macro-builtins-asm.cc index a9e339b92e7..87c90a290ac 100644 --- a/gcc/rust/expand/rust-macro-builtins-asm.cc +++ b/gcc/rust/expand/rust-macro-builtins-asm.cc @@ -740,11 +740,9 @@ parse_asm (location_t invoc_locus, AST::MacroInvocData &invoc, is_global_asm == AST::AsmKind::Global); auto inline_asm_ctx = InlineAsmContext (inline_asm, parser, last_token_id); - tl::expected resulting_context - = tl::expected (inline_asm_ctx); - resulting_context.and_then (parse_format_strings) - .and_then (parse_asm_arg) - .and_then (validate); + auto resulting_context = parse_format_strings (inline_asm_ctx) + .and_then (parse_asm_arg) + .and_then (validate); // TODO: I'm putting the validation here because the rust reference put it // here Per Arthur's advice we would actually do the validation in a different