Issue #2861: A task that takes views prints rustc’s “unnecessary parentheses” on the user’s line: (&*__keep_task)

Open and answer this issue on GitHub.

bug, ready · opened 2026-11-28 · updated 2026-11-28 · 0 comments

Found while “The Rust tests of a task’s keep, a container that drops entries and a struct of views move to .nika tests, without ref” (#2849), by its builder.

Probe

On develop 1ce59bc1: target/fast/nikaia run tests/compiler/tests/a_task_takes_settings_that_view_a_buffer_and_carries_its_keep.nika (and a_task_takes_a_map_of_views.nika).

Expected: prints only 25 bytes of values (Part III C.1: no warning about code nobody wrote). Actual: a rustc warning “Unnecessary parentheses around function argument” shown on let settings = load("app.conf", root), then 25 bytes of values. The tests pass because their stderr is not compared.

Cause

Traced: emit_keeps.nika line 34, KeepAt::Task => return "(&*__keep_task)", lowers the argument as load("app.conf", &root, (&*__keep_task)).await?; rustc’s unused_parens is mapped back to the call.

To build

  1. Write the task keep’s argument without the parentheses where it stands alone as an argument (keep them only where a method follows). Test: a .stderr beside one of the two programs above, empty of the warning (the builder picks how nikaia test compares a run’s stderr), or a new test that does.

Done when

Neither program prints the warning; the test fails before the fix; that commit carries Fixes #N.

Files and limits

emit_keeps.nika, its lowered file.

Facts: Lowering and lower-std

Back to Open Issues