#E0008: malformed f-string
An f-string's {..} holes are not well formed: a { without its }, a lone }, an empty {}, a format spec with its own spec, or a hole that spans lines outside f"""..""". Write a literal brace as {{ or }}, and put a value in every hole: f"{x}".
nabi
let n = 3;
println(f"n = {}");
error[E0008]: empty `{}` in f-string --> main.nabi:2:15 | 2 | println(f"n = {}"); | ^
Put a value in the hole:
nabi
let n = 3;
println(f"{n}");
3
Related: E0005 unterminated literal or comment, E0088 invalid format
Found a mistake? Edit this page on GitHub. Last updated