File: fix-rustc.1.91-compat.patch

package info (click to toggle)
rust-easy-ext 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 312 kB
  • sloc: makefile: 2
file content (123 lines) | stat: -rw-r--r-- 3,436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
From 579825df15b9853d46964cf67e39fd4c08b70597 Mon Sep 17 00:00:00 2001
From: Taiki Endo <te316e89@gmail.com>
Date: Sun, 24 Aug 2025 21:15:03 +0900
Subject: [PATCH] tests: Update syntax tests

---
 tests/run-pass/specialization.rs | 75 ++++++++++++++++----------------
 tests/test.rs                    |  5 ++-
 2 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/tests/run-pass/specialization.rs b/tests/run-pass/specialization.rs
index d46e02b..fb4cebf 100644
--- a/tests/run-pass/specialization.rs
+++ b/tests/run-pass/specialization.rs
@@ -7,46 +7,47 @@
 
 pub mod default_impl {
     // I don't feel `default impl` is the good feature to combine with ext trait, but test anyway.
+    // TODO: `default impl` became syntactically invalid in https://github.com/rust-lang/rust/pull/144386#issuecomment-3133213586
 
     // https://github.com/rust-lang/rust/blob/1.84.0/tests/ui/specialization/defaultimpl/auxiliary/go_trait.rs
     pub mod go_trait {
-        use easy_ext::ext;
-
-        pub trait Go {
-            fn go(&self, arg: isize);
-        }
-
-        pub fn go<G: Go>(this: &G, arg: isize) {
-            this.go(arg)
-        }
-
-        pub fn go_mut<G: GoMut>(this: &mut G, arg: isize) {
-            this.go_mut(arg)
-        }
-
-        pub fn go_once<G: GoOnce>(this: G, arg: isize) {
-            this.go_once(arg)
-        }
-
-        #[ext(GoMut)]
-        pub default impl<G> G
-        where
-            G: Go,
-        {
-            fn go_mut(&mut self, arg: isize) {
-                go(&*self, arg)
-            }
-        }
-
-        #[ext(GoOnce)]
-        pub default impl<G> G
-        where
-            G: GoMut,
-        {
-            fn go_once(mut self, arg: isize) {
-                go_mut(&mut self, arg)
-            }
-        }
+        // use easy_ext::ext;
+
+        // pub trait Go {
+        //     fn go(&self, arg: isize);
+        // }
+
+        // pub fn go<G: Go>(this: &G, arg: isize) {
+        //     this.go(arg)
+        // }
+
+        // pub fn go_mut<G: GoMut>(this: &mut G, arg: isize) {
+        //     this.go_mut(arg)
+        // }
+
+        // pub fn go_once<G: GoOnce>(this: G, arg: isize) {
+        //     this.go_once(arg)
+        // }
+
+        // #[ext(GoMut)]
+        // pub default impl<G> G
+        // where
+        //     G: Go,
+        // {
+        //     fn go_mut(&mut self, arg: isize) {
+        //         go(&*self, arg)
+        //     }
+        // }
+
+        // #[ext(GoOnce)]
+        // pub default impl<G> G
+        // where
+        //     G: GoMut,
+        // {
+        //     fn go_once(mut self, arg: isize) {
+        //         go_mut(&mut self, arg)
+        //     }
+        // }
     }
 }
 
diff --git a/tests/test.rs b/tests/test.rs
index e3e9da5..48b22b1 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -329,8 +329,9 @@ fn assoc_ty() {
 #[allow(clippy::let_underscore_future)]
 #[test]
 fn syntax() {
+    // TODO: `unsafe impl` became syntactically invalid in https://github.com/rust-lang/rust/pull/144386#issuecomment-3133213586
     #[ext(E1)]
-    unsafe impl str {
+    impl str {
         fn normal(&self) {}
         unsafe fn unsafety(&self) {}
         extern "C" fn abi1() {}
@@ -351,7 +352,7 @@ fn syntax() {
     };
 
     struct S {}
-    unsafe impl E1 for S {
+    impl E1 for S {
         fn normal(&self) {}
         unsafe fn unsafety(&self) {}
         extern "C" fn abi1() {}