compiler/rustc_error_codes/src/error_codes/E0799.md MARKDOWN 20 lines View on github.com → Search inside
1Something other than a type or const parameter has been used when one was2expected.34Erroneous code example:56```compile_fail,E07997fn bad1() -> impl Sized + use<main> {}89fn bad2(x: ()) -> impl Sized + use<x> {}1011fn main() {}12```1314In the given examples, for `bad1`, the name `main` corresponds to a function15rather than a type or const parameter. In `bad2`, the name `x` corresponds to16a function argument rather than a type or const parameter.1718Only type and const parameters, including `Self`, may be captured by19`use<...>` precise capturing bounds.

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.