1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-28 00:26:44 +02:00
Nicole L 6115a12554
Fix missing lifetime error in dangling reference example (#2093)
The example of returning a reference to a local variable doesn't compile
due to a missing lifetime specifier, which isn't what we're trying to
demonstrate with that example. I usually add the lifetime in manually in
order to demonstrate the compiler error, but it occurs to me that if we
make the argument a reference we can sneakily get the correct compiler
error without having to introduce the lifetime syntax.
2024-05-23 23:27:10 +00:00
..
2023-11-29 16:39:24 +01:00
2023-11-29 16:39:24 +01:00
2024-05-06 16:33:46 +00:00