Commit 39f1b46
committed
Rollup merge of rust-lang#53932 - matthewjasper:remove-base-path, r=nikomatsakis
[NLL] Remove base_place
This function was supposed to make `Box` less special. But
* I think that the consensus is that MIR borrowck is going to fully special case `Box`
* It wasn't implemented correctly, it's looking at the type of the wrong `Place`, resulting in weird behaviour:
```rust
#![feature(nll)]
type A = Box<i32>; // If this is changed to another type then this will compile.
pub fn foo(x: Box<(String, A)>) {
let a = x.0; // This will compile if these lines are swapped
let b = x.1;
}
```
r? @nikomatsakisFile tree
3 files changed
+18
-70
lines changed- src
- librustc_mir/borrow_check
- test/ui/borrowck
3 files changed
+18
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1605 | 1605 | | |
1606 | 1606 | | |
1607 | 1607 | | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | 1608 | | |
1613 | 1609 | | |
1614 | 1610 | | |
| |||
1646 | 1642 | | |
1647 | 1643 | | |
1648 | 1644 | | |
1649 | | - | |
1650 | | - | |
| 1645 | + | |
| 1646 | + | |
1651 | 1647 | | |
1652 | 1648 | | |
1653 | 1649 | | |
| |||
1677 | 1673 | | |
1678 | 1674 | | |
1679 | 1675 | | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | 1676 | | |
1685 | 1677 | | |
1686 | 1678 | | |
| |||
1709 | 1701 | | |
1710 | 1702 | | |
1711 | 1703 | | |
1712 | | - | |
1713 | | - | |
| 1704 | + | |
| 1705 | + | |
1714 | 1706 | | |
1715 | 1707 | | |
1716 | 1708 | | |
| |||
1813 | 1805 | | |
1814 | 1806 | | |
1815 | 1807 | | |
1816 | | - | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
1821 | 1808 | | |
1822 | 1809 | | |
1823 | 1810 | | |
| |||
2190 | 2177 | | |
2191 | 2178 | | |
2192 | 2179 | | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | 2180 | | |
2223 | 2181 | | |
2224 | 2182 | | |
| |||
Lines changed: 12 additions & 23 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 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
22 | 12 | | |
23 | | - | |
| 13 | + | |
24 | 14 | | |
25 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
0 commit comments