diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-07-30 23:04:23 -0400 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-06-12 07:57:12 +0000 |
| commit | 841f7ce69ac503fb9566deeefbbd273c1587f4e6 (patch) | |
| tree | 287ebf2ad29bbaa5af7669b894864bef1c5ebb9d /tests/ui/macros/macro-missing-fragment.rs | |
| parent | 208cb5da15d5a8378efff6d44a5ffa53fd51bbbc (diff) | |
| download | rust-841f7ce69ac503fb9566deeefbbd273c1587f4e6.tar.gz rust-841f7ce69ac503fb9566deeefbbd273c1587f4e6.zip | |
Make `missing_fragment_specifier` an unconditional error
This was attempted in [1] then reverted in [2] because of fallout. Recently, this was made an edition-dependent error in [3]. Make missing fragment specifiers an unconditional error again. [1]: https://github.com/rust-lang/rust/pull/75516 [2]: https://github.com/rust-lang/rust/pull/80210 [3]: https://github.com/rust-lang/rust/pull/128006
Diffstat (limited to 'tests/ui/macros/macro-missing-fragment.rs')
| -rw-r--r-- | tests/ui/macros/macro-missing-fragment.rs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/tests/ui/macros/macro-missing-fragment.rs b/tests/ui/macros/macro-missing-fragment.rs index 42387e8dbbf..533aa147bcb 100644 --- a/tests/ui/macros/macro-missing-fragment.rs +++ b/tests/ui/macros/macro-missing-fragment.rs @@ -1,31 +1,17 @@ -//@ revisions: e2015 e2024 -//@[e2015] edition:2015 -//@[e2024] edition:2024 - -#![warn(missing_fragment_specifier)] +//! Ensure that macros produce an error if fragment specifiers are missing. macro_rules! used_arm { - ( $( any_token $field_rust_type )* ) => {}; - //[e2015]~^ ERROR missing fragment - //[e2015]~| WARN missing fragment - //[e2015]~| WARN this was previously accepted - //[e2024]~^^^^ ERROR missing fragment - //[e2024]~| ERROR missing fragment + ( $( any_token $field_rust_type )* ) => {}; //~ ERROR missing fragment + //~| ERROR missing fragment } macro_rules! used_macro_unused_arm { () => {}; - ( $name ) => {}; - //[e2015]~^ WARN missing fragment - //[e2015]~| WARN this was previously accepted - //[e2024]~^^^ ERROR missing fragment + ( $name ) => {}; //~ ERROR missing fragment } macro_rules! unused_macro { - ( $name ) => {}; - //[e2015]~^ WARN missing fragment - //[e2015]~| WARN this was previously accepted - //[e2024]~^^^ ERROR missing fragment + ( $name ) => {}; //~ ERROR missing fragment } fn main() { |
