Issue #2882: develop is red: split_once parts kept past a loop do not compile (keep dropped in the loop; a held map value read with ??)

Open and answer this issue on GitHub.

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

develop CI has been red since 82d66d6dc (runs 46157932877, 46160733511), on x64 and arm64, in shards it-1 and heavy-rest. The cause is in the tether / stream-buffers code (ADR-tether-v1, ADR-stream-buffers-v1; commits df774df0f..d25729e4b).

Probe

use std::collections

fn main() throws {
    let mut v: Vec[String] = []
    let mut m: collections::HashMap[String, String] = collections::HashMap()
    for i in 0..<3 {
        let line = f"k{i}=v{i}"
        let (a, b) = line.split_once("=") ?? continue
        v.push(a)
        m.insert(a, b)
    }
    println(f"{v.len()} {v[0]} {v[2]} {m.len()} {m["k1"] ?? "-"}")
}

The checker accepts this program, but rustc refuses what it lowers to. Two failures:

  1. text_tiers::split_once_parts_are_views_of_what_was_cut gives E0597 __keep_177 does not live long enough. The keep is declared inside the loop body, and its view lives on in v after the loop.
  2. accepted_compiles and accepted_sweep on 687_split_once_owned_line give E0308 on m["k1"] ?? "-": expected &nikaia_std::tether::Held, found &'static str.

To build

Done when

text_tiers, accepted_compiles and accepted_sweep pass, and develop CI is green in it-1 and heavy-rest.

Back to Open Issues