]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs
1 // FIXME(jschievink): this is not rejected correctly (only when the non-const impl is actually used)
5 #![feature(const_trait_impl)]
6 #![allow(incomplete_features)]
10 impl PartialEq
for S
{
11 fn eq(&self, _
: &S
) -> bool
{
16 const fn equals_self
<T
: PartialEq
>(t
: &T
) -> bool
{
20 // Calling `equals_self` with something that has a non-const impl should throw an error, despite
21 // it not using the impl.
23 pub const EQ
: bool
= equals_self(&S
);