mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
parent
1f9993729b
commit
0ae1a69330
@ -200,7 +200,7 @@ impl<'a, 'tcx> Functions {
|
||||
Some(i) => i + 1,
|
||||
None => 0,
|
||||
};
|
||||
let end_brace_idx = match code_snippet.find('}') {
|
||||
let end_brace_idx = match code_snippet.rfind('}') {
|
||||
Some(i) => i,
|
||||
None => code_snippet.len(),
|
||||
};
|
||||
|
@ -56,6 +56,7 @@ fn good_lines() {
|
||||
}
|
||||
|
||||
fn bad_lines() {
|
||||
println!("Dont get confused by braces: {{}}");
|
||||
println!("This is bad.");
|
||||
println!("This is bad.");
|
||||
println!("This is bad.");
|
||||
|
@ -2,7 +2,7 @@ error: This function has a large number of lines.
|
||||
--> $DIR/functions_maxlines.rs:58:1
|
||||
|
|
||||
LL | / fn bad_lines() {
|
||||
LL | | println!("This is bad.");
|
||||
LL | | println!("Dont get confused by braces: {{}}");
|
||||
LL | | println!("This is bad.");
|
||||
LL | | println!("This is bad.");
|
||||
... |
|
||||
|
Loading…
Reference in New Issue
Block a user