Skip to content

println!(format!("")) causes infinite loop in compiler #12071

New issue

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

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

Already on GitHub? Sign in to your account

Closed
rcxdude opened this issue Feb 6, 2014 · 1 comment
Closed

println!(format!("")) causes infinite loop in compiler #12071

rcxdude opened this issue Feb 6, 2014 · 1 comment

Comments

@rcxdude
Copy link
Contributor

rcxdude commented Feb 6, 2014

Attempting to compile:

fn main() {
    println!(format!("test"))
}

Causes rustc to go into an infinite loop printing out the same two lines:

testcase.rs:2:14: 2:20 error: macro undefined: 'format'
testcase.rs:2     println!(format!("test"))
@alexcrichton
Copy link
Member

Closing as a dupe of #11692, but thanks for the report!

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
…vink

Change tabs to spacs in macro_rules snippet

This PR changes the `macro_rules!` snippet to use spaces instead of tabs.
The other snippets like [this one][test-snippet] already use spaces.

The snippet was introduced in 5575588 where no reason is provided to use tabs.

[test-snippet]: https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide_completion/src/completions/snippet.rs#L70=
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 11, 2024
Remove deadlinks from `unchecked_duration_subtraction`

See <https://rust-lang.github.io/rust-clippy/master/index.html#unchecked_duration_subtraction>

changelog: [`unchecked_duration_subtraction`]: remove deadlinks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants