This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit be99531
authored
Unrolled build for rust-lang#130514
Rollup merge of rust-lang#130514 - compiler-errors:unsafe-binders, r=oli-obk
Implement MIR lowering for unsafe binders
This is the final bit of the unsafe binders puzzle. It implements MIR, CTFE, and codegen for unsafe binders, and enforces that (for now) they are `Copy`. Later on, I'll introduce a new trait that relaxes this requirement to being "is `Copy` or `ManuallyDrop<T>`" which more closely models how we treat union fields.
Namely, wrapping unsafe binders is now `Rvalue::WrapUnsafeBinder`, which acts much like an `Rvalue::Aggregate`. Unwrapping unsafe binders are implemented as a MIR projection `ProjectionElem::UnwrapUnsafeBinder`, which acts much like `ProjectionElem::Field`.
Tracking:
- rust-lang#130516File tree
56 files changed
+589
-102
lines changed- compiler
- rustc_ast/src
- rustc_borrowck/src
- diagnostics
- polonius/legacy
- type_check
- rustc_codegen_cranelift/src
- rustc_codegen_ssa/src/mir
- rustc_const_eval/src
- check_consts
- interpret
- rustc_hir_typeck/src
- rustc_middle/src
- mir
- thir
- rustc_mir_build
- src
- builder/expr
- thir
- cx
- pattern
- rustc_mir_dataflow/src
- impls
- move_paths
- rustc_mir_transform/src
- rustc_smir/src/rustc_smir/convert
- rustc_span/src
- rustc_trait_selection/src/traits
- rustc_ty_utils/src
- src/tools/clippy/clippy_utils/src
- tests/ui/unsafe-binders
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
56 files changed
+589
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
1660 | | - | |
| 1660 | + | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | 1663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3915 | 3915 | | |
3916 | 3916 | | |
3917 | 3917 | | |
3918 | | - | |
| 3918 | + | |
| 3919 | + | |
3919 | 3920 | | |
3920 | 3921 | | |
3921 | 3922 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| |||
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
453 | | - | |
454 | | - | |
455 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1398 | 1398 | | |
1399 | 1399 | | |
1400 | 1400 | | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1401 | 1405 | | |
1402 | 1406 | | |
1403 | 1407 | | |
| |||
1770 | 1774 | | |
1771 | 1775 | | |
1772 | 1776 | | |
1773 | | - | |
| 1777 | + | |
| 1778 | + | |
1774 | 1779 | | |
1775 | 1780 | | |
1776 | 1781 | | |
| |||
2004 | 2009 | | |
2005 | 2010 | | |
2006 | 2011 | | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
2007 | 2016 | | |
2008 | 2017 | | |
2009 | 2018 | | |
| |||
2384 | 2393 | | |
2385 | 2394 | | |
2386 | 2395 | | |
2387 | | - | |
| 2396 | + | |
| 2397 | + | |
2388 | 2398 | | |
2389 | 2399 | | |
2390 | 2400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| |||
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
522 | 527 | | |
523 | 528 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
305 | 324 | | |
306 | 325 | | |
307 | 326 | | |
| |||
2233 | 2252 | | |
2234 | 2253 | | |
2235 | 2254 | | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
2236 | 2276 | | |
2237 | 2277 | | |
2238 | 2278 | | |
| |||
2258 | 2298 | | |
2259 | 2299 | | |
2260 | 2300 | | |
2261 | | - | |
| 2301 | + | |
| 2302 | + | |
2262 | 2303 | | |
2263 | 2304 | | |
2264 | 2305 | | |
| |||
2450 | 2491 | | |
2451 | 2492 | | |
2452 | 2493 | | |
2453 | | - | |
| 2494 | + | |
| 2495 | + | |
2454 | 2496 | | |
2455 | 2497 | | |
2456 | 2498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
928 | 932 | | |
929 | 933 | | |
930 | 934 | | |
| |||
993 | 997 | | |
994 | 998 | | |
995 | 999 | | |
996 | | - | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
997 | 1003 | | |
998 | 1004 | | |
999 | 1005 | | |
| |||
0 commit comments