Recognize bounds on impls as const bounds
This commit is contained in:
parent
d05a286449
commit
4b82bbeac0
4 changed files with 38 additions and 14 deletions
|
|
@ -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() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue