rust/tests/ui/impl-trait/precise-capturing
bors a2545fd6fc Auto merge of #133540 - ehuss:compiletest-proc-macro, r=jieyouxu
Compiletest: add proc-macro header

This adds a `proc-macro` header to simplify using proc-macros, and to reduce boilerplate. This header works similar to the `aux-build` header where you pass a path for a proc-macro to be built.

This allows the `force-host`, `no-prefer-dynamic` headers, and `crate_type` attribute to be removed. Additionally it uses `--extern` like `aux_crate` (allows implicit `extern crate` in 2018) and `--extern proc_macro` (to place in the prelude in 2018).

~~This also includes a secondary change which defaults the edition of proc-macros to 2024. This further reduces boilerplate (removing `extern crate proc_macro;`), and allows using modern Rust syntax. I was a little on the fence including this. I personally prefer it, but I can imagine it might be confusing to others.~~ EDIT: Removed

Some tests were changed so that when there is a chain of dependencies A→B→C, that the `@ proc-macro` is placed in `B` instead of `A` so that the `--extern` flag works correctly (previously it depended on `-L` to find `C`). I think this is better to make the dependencies more explicit. None of these tests looked like the were actually testing this behavior.

There is one test that had an unexplained output change: `tests/ui/macros/same-sequence-span.rs`. I do not know why it changed, but it didn't look like it was particularly important. Perhaps there was a normalization issue?

This is currently not compatible with the rustdoc `build-aux-docs` header. It can probably be fixed, I'm just not feeling motivated to do that right now.

### Implementation steps

- [x] Document this new behavior in rustc-dev-guide once we figure out the specifics. https://github.com/rust-lang/rustc-dev-guide/pull/2149
2024-11-28 19:00:58 +00:00
..
auxiliary Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
apit.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
apit.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
bad-lifetimes.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
bad-lifetimes.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
bad-params.rs Do precise capturing arg validation in resolve 2024-09-16 10:56:22 -04:00
bad-params.stderr Introduce distinct error codes for precise capturing 2024-09-16 10:56:22 -04:00
bound-modifiers.rs Actually do validation for poly trait refs with ? modifier 2024-10-30 23:42:50 +00:00
bound-modifiers.stderr Actually do validation for poly trait refs with ? modifier 2024-10-30 23:42:50 +00:00
capture-parent-arg.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
capture-parent-arg.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
capturing-implicit.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
capturing-implicit.stderr Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
duplicated-use.real.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
duplicated-use.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
dyn-use.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
dyn-use.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
elided.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
external-macro.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
foreign-2021.rs Try to point out when edition 2024 lifetime capture rules cause borrowck issues 2024-10-31 01:35:14 +00:00
foreign-2021.stderr Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
forgot-to-capture-const.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
forgot-to-capture-const.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
forgot-to-capture-lifetime.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
forgot-to-capture-lifetime.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
forgot-to-capture-type.rs Add variances to RPITITs 2024-10-10 11:46:48 -07:00
forgot-to-capture-type.stderr Add variances to RPITITs 2024-10-10 11:46:48 -07:00
hidden-type-suggestion.rs Bless test fallout 2024-08-17 12:43:25 -04:00
hidden-type-suggestion.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
higher-ranked.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
illegal-positions.real.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
illegal-positions.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
migration-note.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
migration-note.stderr Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
ordering.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
ordering.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
outlives.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
overcaptures-2024-but-fine.rs Don't worry about uncaptured contravariant lifetimes if they outlive a captured lifetime 2024-09-05 06:34:42 -04:00
overcaptures-2024-machine-applicable.fixed Make precise capturing suggestion machine-applicable only if it has not APITs 2024-11-12 04:08:34 +00:00
overcaptures-2024-machine-applicable.rs Make precise capturing suggestion machine-applicable only if it has not APITs 2024-11-12 04:08:34 +00:00
overcaptures-2024-machine-applicable.stderr Make precise capturing suggestion machine-applicable only if it has not APITs 2024-11-12 04:08:34 +00:00
overcaptures-2024.fixed Recurse into APITs in impl_trait_overcaptures 2024-11-11 20:53:08 +00:00
overcaptures-2024.rs Recurse into APITs in impl_trait_overcaptures 2024-11-11 20:53:08 +00:00
overcaptures-2024.stderr Recurse into APITs in impl_trait_overcaptures 2024-11-11 20:53:08 +00:00
redundant.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
redundant.stderr Add variances to RPITITs 2024-10-10 11:46:48 -07:00
rpitit-captures-more-method-lifetimes.rs Add variances to RPITITs 2024-10-10 11:46:48 -07:00
rpitit-captures-more-method-lifetimes.stderr Add variances to RPITITs 2024-10-10 11:46:48 -07:00
rpitit-impl-captures-too-much.rs Add variances to RPITITs 2024-10-10 11:46:48 -07:00
rpitit-impl-captures-too-much.stderr Actually use placeholder regions for trait method late bound regions in collect_return_position_impl_trait_in_trait_tys 2024-11-24 23:11:49 +00:00
rpitit.rs Add variances to RPITITs 2024-10-10 11:46:48 -07:00
rpitit.stderr Clarify implicit captures for RPITIT 2024-10-10 11:46:51 -07:00
self-capture.rs Add variances to RPITITs 2024-10-10 11:46:48 -07:00
unexpected-token.rs Rework precise capturing syntax 2024-06-17 22:35:25 -04:00
unexpected-token.stderr Rework precise capturing syntax 2024-06-17 22:35:25 -04:00