From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id C2BF6384F498 for ; Tue, 21 Feb 2023 12:03:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2BF6384F498 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42f.google.com with SMTP id l1so3885684wry.10 for ; Tue, 21 Feb 2023 04:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=zeuPinrsY6MTpPq8oRqtzBS3YcWBmw72rZi2/cH+vmg=; b=Z2ZAmnjFa1qRtL7XYJ67WOMJoyUxKvWkuJ7mj614iL1UMCegIBsE1nc6Pun2duIHC7 qA8wkNm5DXI+4HWsuNt3i/DS3g2A1QGWWJZ1umdz4jBuEecXnUVQrys8Db+/B+fzZCf4 fX2HQqgMB0ZJaufLIPuMGyuPDN5nJq4u1tr/lrZvqJA4+tOZjLW7VT85Ahi4YMdr4+Te npNJxF7e+Mvx0nBLcqhpJJOiiUIIJCCAYzn2dA/mzNGQM9q3HJV72eYHPH2kXkGB5ZIt heouH87bWDuhmf+0Tn85lTTBI7fVxZugpQrJ+tSNQ4BgWC7gXiteDeSIQOEzZ95nM6uV npFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zeuPinrsY6MTpPq8oRqtzBS3YcWBmw72rZi2/cH+vmg=; b=YOA6NmqsgpjKx4o7L+O6zpiYXwjNewFnxSvSdaQwop2kQTJKxvoumuEZS0vF42Ixxl 3/62ZDRvaHWpmxoI1Y3EytaRNR/HTpHIuKgcBvbWUWbV3JemsPr94Xjiky1E0rAeYP+s H6WdTwqnJ2VmqJvUqA8qvEpkVFiuY8MVoKxCGzu/qZG3q85mJOLpWkoWaEOhj0nPh/+d nYV0ape5T3vAsPUbdmAwaBR3o3wro1zos0knWpOYih6tpfVNY8eqO2CZPwTjspbkn/H0 A5GtJul3BXMpQu05BCW3Myy3aP8PJR/RP7CKV95pggS4Cg5OsaFkKyAyexHzOOZCeGoW ZB5Q== X-Gm-Message-State: AO0yUKV4RUke4orX6vhAm5AF4r8Xckh2bq5T4cKyfDyRtB41LP8WLMek jD+OJX/9m3ve8DLIuBpJuFL5 X-Google-Smtp-Source: AK7set+2eet3x4WK7Hb78cfO8qv/xqJqWLPzGQvRMBAC3xbxAmmzhukhk8Wr/xvlrAPmuEKCpUxDDQ== X-Received: by 2002:adf:cd8c:0:b0:2c5:4f2d:d9b4 with SMTP id q12-20020adfcd8c000000b002c54f2dd9b4mr3182878wrj.58.1676981031659; Tue, 21 Feb 2023 04:03:51 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c15-20020adffb4f000000b002c55b0e6ef1sm5013811wrs.4.2023.02.21.04.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:03:51 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [committed 036/103] gccrs: dump: Fix module dumping Date: Tue, 21 Feb 2023 13:01:26 +0100 Message-Id: <20230221120230.596966-37-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221120230.596966-1-arthur.cohen@embecosm.com> References: <20230221120230.596966-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Fix formatting when dumping modules. --- gcc/rust/ast/rust-ast-dump.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 653c1d9ff03..1e7a235932d 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -810,11 +810,10 @@ Dump::visit (Method &method) void Dump::visit (Module &module) { - indentation.increment (); - - stream << indentation; emit_visibility (module.get_visibility ()); - stream << "mod" << module.get_name () << " {\n"; + stream << "mod " << module.get_name () << " {\n"; + + indentation.increment (); for (auto &item : module.get_items ()) { @@ -824,6 +823,7 @@ Dump::visit (Module &module) } indentation.decrement (); + stream << indentation << "}\n"; } -- 2.39.1