Commit 2d73a5d
committed
Simplify codegen diagnostic handling.
To send a diagnostic from a codegen thread to the main thread,
`SharedEmitter` currently converts the `rustc_errors::Diagnostic` into a
one or more `rustc_codegen_ssa::Diagnostic`s, sends them, and then
`SharedEmitterMain` reconstructs them at the other end into a
`rustc_errors::Diagnostic`. This is a lossy operation, because of
differences between the two `Diagnostic` types.
Instead we can just clone the `rustc_errors::Diagnostic` and send it
directly. Maybe in the past `rustc_errors::Diagnostic` wasn't `Send`?
But it works now. Much simpler and nicer.1 parent 11f32b7 commit 2d73a5d
File tree
2 files changed
+5
-37
lines changed- compiler/rustc_codegen_ssa/src/back
- tests/ui/lto
2 files changed
+5
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
| |||
998 | 994 | | |
999 | 995 | | |
1000 | 996 | | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | 997 | | |
1009 | 998 | | |
1010 | 999 | | |
| |||
1812 | 1801 | | |
1813 | 1802 | | |
1814 | 1803 | | |
1815 | | - | |
1816 | | - | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
1821 | | - | |
1822 | | - | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
1829 | | - | |
1830 | | - | |
| 1804 | + | |
1831 | 1805 | | |
1832 | 1806 | | |
1833 | 1807 | | |
| |||
1853 | 1827 | | |
1854 | 1828 | | |
1855 | 1829 | | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
| 1830 | + | |
1863 | 1831 | | |
1864 | 1832 | | |
1865 | 1833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
0 commit comments