// expect: reject E2101 // phase: 6 // spec: docs/spec/16-standard-library.md ยง2.17 module test.io import std.io; fn exact(result: std.io.ReadExactResult) -> void effects [] { match result { std.io.ReadExactResult::ok => {}, std.io.ReadExactResult::eof(count) => { trap; }, std.io.ReadExactResult::err(error) => { trap; } } } fn bad(input: file,destination: slice_mut) -> void effects [fs.read] { mut q = input; fs.close(move input) or trap; std.io.read_exact_file(q,destination); } fn main() -> u64 effects [] { return 42; }