Open and answer this issue on GitHub.
ready · opened 2026-11-04 · updated 2026-11-04 · 0 comments
Found by the async a3 brief (group runtime, 6331c7ab).
use std::task
fn main() throws {
let h = async(detached) fn {
task::scope fn(s) { s.spawn fn { 1 }; 2 }
}
print(h.join())
}
The program prints 2, but the build first prints rustc’s warning unused import: ProbePlain. The generated code imports the probe trait for the scope, and the detached task’s body never uses it. A user’s program should never show a warning about code they did not write.
ProbePlain import only where the lowered code uses it, or mark the generated import #[allow(unused_imports)] the way the other generated imports are..stderr is empty and whose .stdout is 2.