Skip to content

Update multiple file use statement example #13959

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

brandonw
Copy link
Contributor

@brandonw brandonw commented May 6, 2014

Update the example to make the usage of pub mod foo; much more
apparent, as well as using an example where setting the visibility of
the module is actually necessary.

Update the example to make the usage of `pub mod foo;` much more
apparent, as well as using an example where setting the visibility of
the module is actually necessary.
@brandonw
Copy link
Contributor Author

brandonw commented May 6, 2014

Forgot to remove the unnecessary #main() comment

@brandonw brandonw closed this May 6, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 6, 2025
…estion (rust-lang#13990)

fix rust-lang#13959

The current implementation of the `write_literal` and `print_literal`
lint performs escaping for the second argument of `write!` ,`writeln!`,
`print!` and `println!` of the suggestion by first replacing `"` with
`\"`, and then replacing `\` with `\\`. Performing these replacements in
this order may lead to unnecessary backslashes being added if the
original code contains `"` (e.g. `"` -> `\\"`), potentially resulting in
a suggestion that causes the code to fail to compile.
In the issue mentioned above, it’s suggested to use raw strings as raw
strings, but implementing this would require an ad-hoc change to the
current implementation, so it has been deferred. (I'll implement this in
another PR)

changelog: [`write_literal`]: fix incorrect escaping of suggestions
changelog: [`print_literal`]: fix incorrect escaping of suggestions
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant