about summary refs log tree commit diff
path: root/src/libcore/ptr/const_ptr.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-23 00:33:52 -0700
committerGitHub <noreply@github.com>2020-06-23 00:33:52 -0700
commit903823c59bcb9890df2a6fadcf7aa22f74eed67f (patch)
tree41f5b5c6c8efb14b2306718f74250a5a6c61d956 /src/libcore/ptr/const_ptr.rs
parent59e87c0b81dd7f42d03f9b8d10cf3636feff9dd0 (diff)
parentd57689f9cde9a7066ffc8ca1125ea7e0d23df2c5 (diff)
downloadrust-903823c59bcb9890df2a6fadcf7aa22f74eed67f.tar.gz
rust-903823c59bcb9890df2a6fadcf7aa22f74eed67f.zip
Rollup merge of #72493 - nikomatsakis:move-leak-check, r=matthewjasper
 move leak-check to during coherence, candidate eval

Implementation of MCP https://github.com/rust-lang/compiler-team/issues/295.

I'd like to do a crater run on this.

Note to @rust-lang/lang: This PR is a breaking change (bugfix). It causes tests like the following to go from a future-compatibility warning #56105 to a hard error:

```rust
trait Trait {}
impl Trait for for<'a, 'b> fn(&'a u32, &'b u32) {}
impl Trait for for<'c> fn(&'c u32, &'c u32) {} // now rejected, used to warn
```

I am not aware of any instances of this code in the wild, but that is why we are doing a crater run. The reason for this change is that those two types are, in fact, the same type, and hence the two impls are overlapping.

There will still be impls that trigger #56105 after this lands, however -- I hope that we will eventually just accept those impls without warning, for the most part. One example of such an impl is this pattern, which is used by wasm-bindgen and other crates as well:

```rust
trait Trait {}
impl<T> Trait for fn(&T) { }
impl<T> Trait for fn(T) { } // still accepted, but warns
```
Diffstat (limited to 'src/libcore/ptr/const_ptr.rs')
0 files changed, 0 insertions, 0 deletions