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

Reply via email to