)]}'
{
  "commit": "23e27344e9a32f95af9d4b66944edefeb41391b0",
  "tree": "38f6aebca367ec31f7a9aff65937f7da11c627e3",
  "parents": [
    "fdb18d97828a9428a0918e4ad6a5403d6e1e3d54",
    "722fcbb72e3e312153dcc142108fac6efef40538"
  ],
  "author": {
    "name": "Jonathan Brouwer",
    "email": "jonathantbrouwer@gmail.com",
    "time": "Wed Mar 04 19:30:39 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Mar 04 19:30:39 2026 +0100"
  },
  "message": "Rollup merge of #153300 - fmease:test-attrs-tweaks, r\u003dJonathanBrouwer\n\nTweak some of our internal `#[rustc_*]` TEST attributes\n\nI think I might be the one who\u0027s used the internal TEST attrs `#[rustc_{dump_predicates,object_lifetime_default,outlives,variance}]` the most in recent times, I might even be the only one. As such I\u0027ve noticed some recent-ish issues that haven\u0027t been fixed so far and which keep bothering me. Moreover I have a longstanding urge to rename several of these attributes which I couldn\u0027t contain anymore.\n\n[`#[rustc_*]` TEST attributes](https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#rustc_-test-attributes) are internal attributes that basically allow you to dump the output of specific queries for use in UI tests or for debugging purposes.\n\n1. When some of these attributes were ported over to the new parsing API, their targets were unnecessarily restricted. I\u0027ve kept encountering these incorrect \"attribute cannot be used\" errors all the while HIR analysis happily \u0026 correctly dumped the requested data below it. I\u0027ve now relaxed their targets.\n2. Since we now have target checking for the internal attributes I figured that it\u0027s unhelpful if we still intentionally crashed on invalid targets, so I\u0027ve got rid of that.\n3. I\u0027ve always been annoyed that most of these (very old) attributes don\u0027t contain the word `dump` in their name (rendering their purpose non-obvious) and that some of their names diverge quite a bit from the corresponding query name. I\u0027ve now rectified that. The new names take longer to type but it\u0027s still absolutely acceptable imo.\n\n---\n\nI haven\u0027t renamed all of the TEST attributes to follow the `rustc_dump_` scheme since that\u0027s quite tedious. If it\u0027s okay with you I\u0027d like to postpone that (e.g., `rustc_{def_path,hidden_type…,layout,regions,symbol_name}`).\n\nI\u0027ve noticed that the parsers for TEST attrs are spread across `rustc_dump.rs`, `rustc_internal.rs` \u0026 `test_attrs.rs` which is a bit confusing. Since the new names are prefixed with `rustc_dump_` I\u0027ve moved their parsers into `rustc_dump.rs` but of course they are still TEST attrs. IIRC, `test_attrs.rs` also contains non-`rustc_`-TEST attrs, so we can\u0027t just merge these two files. I guess that\u0027ll sort itself out in the future when I tackle the other internal TEST attrs.\n\nr\\? Jana || Jonathan\n",
  "tree_diff": []
}
