]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst-bound.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / rfc-2632-const-trait-impl / call-generic-method-nonconst-bound.rs
CommitLineData
94222f64
XL
1// check-pass
2
94222f64
XL
3struct S;
4
5impl PartialEq for S {
6 fn eq(&self, _: &S) -> bool {
7 true
8 }
9}
10
11const fn equals_self<T: PartialEq>(t: &T) -> bool {
12 true
13}
14
15pub const EQ: bool = equals_self(&S);
16
17fn main() {}