diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs new file mode 100644 index 000000000..2bc5ee512 --- /dev/null +++ b/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.rs @@ -0,0 +1,8 @@ +#![feature(const_trait_impl)] + +pub const fn equals_self<T: PartialEq>(t: &T) -> bool { + *t == *t + //~^ ERROR can't compare +} + +fn main() {} |