1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-25 16:54:32 +02:00

drop: avoid confusing names (#2648)

The Droppables are already named with letters, so hopefully referencing
the nesting order of blocks instead of giving them names is clearer.
This commit is contained in:
Frances Wingerter 2025-02-20 20:21:32 +00:00 committed by GitHub
parent 44a79741ff
commit 4f8b09009a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,9 +25,9 @@ fn main() {
{ {
let c = Droppable { name: "c" }; let c = Droppable { name: "c" };
let d = Droppable { name: "d" }; let d = Droppable { name: "d" };
println!("Exiting block B"); println!("Exiting innermost block");
} }
println!("Exiting block A"); println!("Exiting next block");
} }
drop(a); drop(a);
println!("Exiting main"); println!("Exiting main");