-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Commit c360e21
Auto merge of #135054 - cramertj:file-cstr, r=m-ou-se
Add Location::file_with_nul
This is useful for C/C++ APIs which expect the const char* returned from __FILE__ or std::source_location::file_name.
ACP: rust-lang/libs-team#466
Tracking issue: #141727 File tree
3 files changed
+63
-24
lines changed- compiler/rustc_const_eval/src/util
- library/core/src/panic
- tests/ui/rfcs/rfc-2091-track-caller
3 files changed
+63
-24
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
18 | 23 |
| |
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | ||
23 | - | ||
24 | - | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
25 | 31 |
| |
26 | - | ||
27 | 32 |
| |
28 | 33 |
| |
29 | 34 |
| |
| |||
36 | 41 |
| |
37 | 42 |
| |
38 | 43 |
| |
39 | - | ||
44 | + | ||
40 | 45 |
| |
41 | 46 |
| |
42 | 47 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
1 | 2 |
| |
2 | 3 |
| |
3 | 4 |
| |
| |||
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
35 | - | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
36 | 42 |
| |
37 | 43 |
| |
38 | 44 |
| |
| |||
125 | 131 |
| |
126 | 132 |
| |
127 | 133 |
| |
128 | - | ||
129 | 134 |
| |
130 | - | ||
135 | + | ||
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
131 | 152 |
| |
132 | 153 |
| |
133 | 154 |
| |
| |||
181 | 202 |
| |
182 | 203 |
| |
183 | 204 |
| |
184 | - | ||
185 | - | ||
186 | - | ||
187 | - | ||
188 | - | ||
189 | - | ||
190 | - | ||
191 | - | ||
192 | - | ||
193 | - | ||
194 | - | ||
195 | - | ||
196 | 205 |
| |
197 | 206 |
| |
198 | 207 |
| |
199 | 208 |
| |
200 | - | ||
209 | + | ||
201 | 210 |
| |
202 | 211 |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
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 | + |
0 commit comments