From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5B9813846013 for ; Thu, 25 Apr 2024 11:19:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B9813846013 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5B9813846013 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714043970; cv=none; b=RI9YTY4Xr4zS7Qm6a09ncaEg4IifBLSbxfn/wF1evUtkHYYg/PnvUjAqIQkTwvUZ7IoWs7socQuQdsxpvG9l6lZIAnSjHiEDoadhA6uma1SbwNEKCOG+PVyJrN4ky7spi6BgLjnvUeYHSjuBiHIhdueNWzxpZxSjkNLn3eva2Oc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714043970; c=relaxed/simple; bh=dQVe1OBM4tO7BkWWFUbTWMf1/AmHjk4+NJ9jbeqHD6w=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Csc0oujqsAQ76szgMBPDMi7GmiBDpyIBQd/zSpwHri03ihHez19Ia00rcsoKdCKSCus5c9AzkfrGDgAoEeWFi0BPy6IA+qgbYf8gRDE0O8rWqJ26RgA344Fydf2OxFnbrnBl32FvWNj3ixWmmIOFG7bcjGyq3jVuc4pxoI7VqBo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714043969; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=XEL53joQetjFvrzRvHwHG980lRLYYvMiIitBL4RSOIw=; b=RlGBMKYiAQITVPQBQx02v8z8QmoZBt5P4uyywXJR8AdtWMueUTkQcPMh9VLoT5Q7ZNOp9C jA01X4G3qQerDb3XbTekur1VUZXcgECGx5MCRxkb9cH4NhJKdnCWQdHzYm12IMCp/8UX0O T4vQ0SrRVToXKH5iX3Dv2ifUZrIQzCE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-yAHIzWjSO2mZrLvdz1ZEXA-1; Thu, 25 Apr 2024 07:19:25 -0400 X-MC-Unique: yAHIzWjSO2mZrLvdz1ZEXA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8FBED18065AF; Thu, 25 Apr 2024 11:19:25 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5229151BF; Thu, 25 Apr 2024 11:19:25 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 43PBJNfq3590358 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 13:19:24 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 43PBJMHC3589562; Thu, 25 Apr 2024 13:19:22 +0200 Date: Thu, 25 Apr 2024 13:19:22 +0200 From: Jakub Jelinek To: LIU Hao Cc: "gcc-rust@gcc.gnu.org" Subject: Re: [PATCH] Fix rust on *-w64-mingw32 Message-ID: Reply-To: Jakub Jelinek References: <79bd7ab5-b908-400d-b0a6-1faf1193bc61@126.com> MIME-Version: 1.0 In-Reply-To: <79bd7ab5-b908-400d-b0a6-1faf1193bc61@126.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: On Thu, Apr 25, 2024 at 07:16:31PM +0800, LIU Hao via Gcc wrote: > --- a/gcc/rust/parse/rust-parse.cc > +++ b/gcc/rust/parse/rust-parse.cc > @@ -89,7 +89,7 @@ extract_module_path (const AST::AttrVec &inner_attrs, > // Source: rustc compiler > // (https://github.com/rust-lang/rust/blob/9863bf51a52b8e61bcad312f81b5193d53099f9f/compiler/rustc_expand/src/module.rs#L174) > #if defined(HAVE_DOS_BASED_FILE_SYSTEM) > - path.replace ('/', '\\'); > + std::replace(path.begin(), path.end(), '/', '\\'); This should be std::replace (path.begin (), path.end (), '/', '\\'); (at least if gcc/rust/ follows normal GCC coding conventions). Jakub