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