rust/tests
bors 6650252439 Auto merge of #128440 - oli-obk:defines, r=lcnr
Add `#[define_opaques]` attribute and require it for all type-alias-impl-trait sites that register a hidden type

Instead of relying on the signature of items to decide whether they are constraining an opaque type, the opaque types that the item constrains must be explicitly listed.

A previous version of this PR used an actual attribute, but had to keep the resolved `DefId`s in a side table.

Now we just lower to fields in the AST that have no surface syntax, instead a builtin attribute macro fills in those fields where applicable.

Note that for convenience referencing opaque types in associated types from associated methods on the same impl will not require an attribute. If that causes problems `#[defines()]` can be used to overwrite the default of searching for opaques in the signature.

One wart of this design is that closures and static items do not have generics. So since I stored the opaques in the generics of functions, consts and methods, I would need to add a custom field to closures and statics to track this information. During a T-types discussion we decided to just not do this for now.

fixes #131298
2025-03-11 18:13:31 +00:00
..
assembly Target definition for wasm32-wali-linux-musl to support the Wasm Linux 2025-03-10 21:26:45 -04:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +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 Auto merge of #128440 - oli-obk:defines, r=lcnr 2025-03-11 18:13:31 +00:00
debuginfo Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee 2025-03-11 13:30:50 +01:00
incremental remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
mir-opt Update tests. 2025-03-10 12:20:05 +01:00
pretty Fix pretty printing of parsed attrs in hir_pretty 2025-03-10 02:04:26 +00:00
run-make Target definition for wasm32-wali-linux-musl to support the Wasm Linux 2025-03-10 21:26:45 -04:00
rustdoc Rollup merge of #137764 - compiler-errors:always-applicable-negative-impl, r=lcnr 2025-03-06 12:22:16 -05:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json Fix pretty printing of parsed attrs in hir_pretty 2025-03-10 02:04:26 +00:00
rustdoc-ui doctests: build test bundle and harness separately 2025-03-10 01:47:36 +01:00
ui Auto merge of #128440 - oli-obk:defines, r=lcnr 2025-03-11 18:13:31 +00:00
ui-fulldeps Revert "Don't test new error messages with the stage 0 compiler" 2025-03-08 22:45:16 +02:00
COMPILER_TESTS.md