]> git.lizzy.rs Git - rust.git/commit
don't emit a type error if autoderef ends in an inference variable, as long as we...
authorMichael Hewson <michael@michaelhewson.ca>
Fri, 10 Nov 2017 15:30:30 +0000 (10:30 -0500)
committerMichael Hewson <michael@michaelhewson.ca>
Sun, 17 Dec 2017 09:13:09 +0000 (10:13 +0100)
commite7d1542a52dd04b58058d5d170a7a9b09f528f8c
treed646d8e846b96dd1302278a4408d0c2e8162af8e
parent083635eab2c146a35d734ab40c5a3ba5df720786
don't emit a type error if autoderef ends in an inference variable, as long as we went through a raw pointer

This avoids a break in backward compatibility in the following case:

```
let ptr = std::ptr::null();
let _ = &data as *const *const ();
if data.null() {}
```
src/librustc_typeck/check/method/probe.rs