Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "When is a for-lifetime higher-ranked bound appropriate?" on CodeWiki (https://codewiki.com/practice/mcq/rust/lifetimes/higher-ranked-choice/).
Context (verbatim from the page):
"""
When is a for-lifetime higher-ranked bound appropriate?
When the callee must choose a fresh input lifetime for each callback invocation
When a local reference must be converted into a static reference
When all callback calls must share one lifetime chosen by the outer caller
When a callback should run exactly once
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Rust. Where you are unsure, say so.