Rollup merge of #87273 - fee1-dead:impl-const-impl-bounds, r=oli-obk

Recognize bounds on impls as const bounds

r? ```@oli-obk```
This commit is contained in:
Guillaume Gomez 2021-07-21 15:52:47 +02:00 committed by GitHub
commit 1008ace95c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 22 deletions

View file

@ -0,0 +1,15 @@
// check-pass
#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]
trait MyPartialEq {
fn eq(&self, other: &Self) -> bool;
}
impl<T: PartialEq> const MyPartialEq for T {
fn eq(&self, other: &Self) -> bool {
PartialEq::eq(self, other)
}
}
fn main() {}