rust/tests
Jubilee a69982e00a
Rollup merge of #138019 - obi1kenobi:pg/pretty-print-more-attrs, r=compiler-errors
Pretty-print `#[deprecated]` attribute in HIR.

Pretty-print `#[deprecated]` attribute in a form closer to how it might appear in Rust source code, rather than using a `Debug`-like representation.

Consider the following Rust code:
```rust
#[deprecated]
pub struct PlainDeprecated;

#[deprecated = "here's why this is deprecated"]
pub struct DirectNote;

#[deprecated(since = "1.2.3", note = "here's why this is deprecated")]
pub struct SinceAndNote;
```

Here's the previous output:
```
#[attr="Deprecation{deprecation: Deprecation{since: Unspecifiednote:
suggestion: }span: }")]
struct PlainDeprecated;

#[attr="Deprecation{deprecation: Deprecation{since: Unspecifiednote:
here's why this is deprecatedsuggestion: }span: }")]
struct DirectNote;

#[attr="Deprecation{deprecation: Deprecation{since: NonStandard(1.2.3)note:
here's why this is deprecatedsuggestion: }span: }")]
struct SinceAndNote;
```

Here's the new output:
```rust
#[deprecated]
struct PlainDeprecated;

#[deprecated = "here's why this is deprecated"]
struct DirectNote;

#[deprecated(since = "1.2.3", note = "here's why this is deprecated"]
struct SinceAndNote;
```

Also includes a test for `#[diagnostic::(..)]` attributes, though their behavior is not changed here. I already wrote the test, so I figured it probably won't hurt to have it.

Related to discussion in #137645.

r? `@jdonszelmann`
2025-03-04 19:37:07 -08:00
..
assembly Rollup merge of #136938 - mustartt:fix-stack-protector-filecheck, r=Mark-Simulacrum 2025-03-03 10:40:58 +01:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr 2025-03-04 02:27:56 +00:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage coverage: Add some more cases to tests/coverage/holes.rs 2025-02-19 13:56:20 +11:00
coverage-run-rustdoc
crashes Bless tests 2025-02-26 19:27:19 +00:00
debuginfo Rollup merge of #135354 - Walnut356:msvc_lldb, r=wesleywiser 2025-02-23 02:44:16 -05:00
incremental remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
mir-opt Rollup merge of #134943 - Shunpoco:116971-mir-opt-issues, r=DianQK 2025-02-28 22:29:48 +08:00
pretty pretty print hir attributes 2025-02-24 14:31:19 +01:00
run-make Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3 2025-03-04 15:39:44 +00:00
rustdoc Move "unused_exter_crate" test from rustdoc-ui to rustdoc 2025-02-27 13:22:46 +00:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json Always allow rustdoc-json tests to contain long lines 2025-03-03 19:59:54 +01:00
rustdoc-ui Rollup merge of #137632 - RalfJung:rustdoc-target-features, r=workingjubilee 2025-03-03 06:41:34 +01:00
ui Rollup merge of #138019 - obi1kenobi:pg/pretty-print-more-attrs, r=compiler-errors 2025-03-04 19:37:07 -08:00
ui-fulldeps Auto merge of #137573 - compiler-errors:rollup-noq9yhp, r=compiler-errors 2025-02-25 02:24:40 +00:00
COMPILER_TESTS.md