From 9e46ddc7a2c1bcef52bfa9e4ae547b296814e2b9 Mon Sep 17 00:00:00 2001 From: Ben Lewis Date: Sun, 12 Jan 2020 17:32:50 +1300 Subject: [PATCH] Added comment about behaviour. --- src/test/ui/const-generics/const-param-elided-lifetime.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/ui/const-generics/const-param-elided-lifetime.rs b/src/test/ui/const-generics/const-param-elided-lifetime.rs index ff98368bca28..5679dd35c307 100644 --- a/src/test/ui/const-generics/const-param-elided-lifetime.rs +++ b/src/test/ui/const-generics/const-param-elided-lifetime.rs @@ -1,3 +1,8 @@ +// Elided lifetimes within the type of a const generic parameters is disallowed. This matches the +// behaviour of trait bounds where `fn foo>() {}` is illegal. Though we could change +// elided lifetimes within the type of a const generic parameters to be 'static, like elided +// lifetimes within const/static items. + #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash