rust/tests/ui/rust-2024
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
prelude-migration Add migration lint for 2024 prelude additions 2024-07-28 11:44:03 +02:00
unsafe-attributes Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
unsafe-extern-blocks Remove unadorned 2024-10-11 11:30:08 -04:00
box-slice-into-iter-ambiguous.fixed Adjust the method ambiguity lint too 2024-05-20 19:21:38 -04:00
box-slice-into-iter-ambiguous.rs Adjust the method ambiguity lint too 2024-05-20 19:21:38 -04:00
box-slice-into-iter-ambiguous.stderr Adjust the method ambiguity lint too 2024-05-20 19:21:38 -04:00
gen-kw-in-macro.rs Make sure we don't deny macro vars w keyword names 2024-05-07 19:13:33 -04:00
gen-kw.e2015.stderr Lint against keyword lifetimes in keyword_idents 2024-09-06 10:32:48 -04:00
gen-kw.e2018.stderr Lint against keyword lifetimes in keyword_idents 2024-09-06 10:32:48 -04:00
gen-kw.rs Lint against keyword lifetimes in keyword_idents 2024-09-06 10:32:48 -04:00
prelude2024.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
raw-gen-lt.rs Store raw ident span for raw lifetime 2024-09-17 16:43:18 -04:00
reserved-guarded-strings-lexing.rs fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
reserved-guarded-strings-lexing.stderr fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
reserved-guarded-strings-migration.fixed fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
reserved-guarded-strings-migration.rs fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
reserved-guarded-strings-migration.stderr fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
reserved-guarded-strings-via-macro-2.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
reserved-guarded-strings-via-macro-2.stderr Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
reserved-guarded-strings-via-macro.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
reserved-guarded-strings.rs fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
reserved-guarded-strings.stderr fix confusing diagnostic for reserved ## 2024-11-25 22:29:14 -07:00
safe-outside-extern.gated.stderr Don't allow unsafe statics outside of extern blocks 2024-07-18 18:02:29 -04:00
safe-outside-extern.rs Stabilize unsafe extern blocks (RFC 3484) 2024-07-23 00:29:39 -03:00
safe-outside-extern.stderr Stabilize unsafe extern blocks (RFC 3484) 2024-07-23 00:29:39 -03:00
safe-outside-extern.ungated.stderr Don't allow unsafe statics outside of extern blocks 2024-07-18 18:02:29 -04:00
unsafe-before_exec.e2024.stderr CommandExt::before_exec: deprecate safety in edition 2024 2024-08-14 14:04:11 +02:00
unsafe-before_exec.rs CommandExt::before_exec: deprecate safety in edition 2024 2024-08-14 14:04:11 +02:00
unsafe-env-suggestion.fixed Rename deprecated_safe lint to deprecated_safe_2024 2024-07-17 14:39:56 +02:00
unsafe-env-suggestion.rs Rename deprecated_safe lint to deprecated_safe_2024 2024-07-17 14:39:56 +02:00
unsafe-env-suggestion.stderr #[deprecated_safe_2024]: Also use the // TODO: hint in the compiler error 2024-08-13 11:32:47 +02:00
unsafe-env.e2021.stderr Don't trigger unsafe_op_in_unsafe_fn for deprecated safe fns 2024-06-05 23:44:59 +02:00
unsafe-env.e2024.stderr Don't trigger unsafe_op_in_unsafe_fn for deprecated safe fns 2024-06-05 23:44:59 +02:00
unsafe-env.rs Don't trigger unsafe_op_in_unsafe_fn for deprecated safe fns 2024-06-05 23:44:59 +02:00