rust/tests/ui/rust-2024
bors 83965efe6a Auto merge of #133274 - ehuss:macro_rules-edition-from-pm, r=compiler-errors
Use edition of `macro_rules` when compiling the macro

This changes the edition assigned to a macro_rules macro when it is compiled to use the edition of where the macro came from instead of the local crate's edition.

This fixes a problem when a macro_rules macro is created by a proc-macro. Previously that macro would be tagged with the local edition, which would cause problems with using the correct edition behavior inside the macro. For example, the check for unsafe attributes would cause errors in 2024 when using proc-macros from older editions.

This is partially related to https://github.com/rust-lang/rust/issues/132906. Unfortunately this is only a half fix for that issue. It fixes the error that happens in 2024, but does not fix the lint firing in 2021. I'm still trying to think of some way to fix that, but I'm running low on ideas.
2024-11-27 04:54:08 +00:00
..
auxiliary Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
prelude-migration Add migration lint for 2024 prelude additions 2024-07-28 11:44:03 +02:00
unsafe-attributes Use edition of macro_rules when compiling the macro 2024-11-20 17:28:47 -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 Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
reserved-guarded-strings-lexing.stderr Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
reserved-guarded-strings-migration.fixed Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
reserved-guarded-strings-migration.rs Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
reserved-guarded-strings-migration.stderr Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
reserved-guarded-strings-via-macro-2.rs Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06: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 Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
reserved-guarded-strings.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
reserved-guarded-strings.stderr Stabilize the 2024 edition 2024-11-22 11:12:15 -08: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