This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 8ac0c0f
authored
Unrolled build for rust-lang#134397
Rollup merge of rust-lang#134397 - Enselic:raw-mut, r=compiler-errors
rustc_borrowck: Suggest changing `&raw const` to `&raw mut` if applicable
Closes rust-lang#127562
For reference, here is the diff compared to the original error reported in that issue before rust-lang#134244 stopped suggesting the invalid syntax:
```
diff --git a/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr b/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr
index 0da5d15..dbe834b 100644
--- a/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr
+++ b/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr
``@@`` -6,8 +6,8 ``@@`` LL | unsafe { *ptr = 3; }
|
help: consider changing this to be a mutable pointer
|
-LL | let ptr = &mut raw const val;
- | +++
+LL | let ptr = &raw mut val;
+ | ~~~
error: aborting due to 1 previous error
```File tree
2 files changed
+25
-10
lines changed- compiler/rustc_borrowck/src/diagnostics
- tests/ui/borrowck
2 files changed
+25
-10
lines changedLines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1480 | 1480 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1485 | 1494 | | |
1486 | | - | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
1487 | 1498 | | |
1488 | 1499 | | |
1489 | 1500 | | |
| |||
1500 | 1511 | | |
1501 | 1512 | | |
1502 | 1513 | | |
1503 | | - | |
1504 | 1514 | | |
1505 | | - | |
| 1515 | + | |
1506 | 1516 | | |
1507 | 1517 | | |
1508 | 1518 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
0 commit comments