diff options
| author | Ben Lewis <benlewisj@gmail.com> | 2020-01-12 17:32:50 +1300 |
|---|---|---|
| committer | Ben Lewis <benlewisj@gmail.com> | 2020-01-12 17:32:50 +1300 |
| commit | 9e46ddc7a2c1bcef52bfa9e4ae547b296814e2b9 (patch) | |
| tree | 41a3363e219dfb2466c25007f45c93925904d4a7 | |
| parent | b4fddf0f0806662430b42cb5b226ac1e3d381026 (diff) | |
| download | rust-9e46ddc7a2c1bcef52bfa9e4ae547b296814e2b9.tar.gz rust-9e46ddc7a2c1bcef52bfa9e4ae547b296814e2b9.zip | |
Added comment about behaviour.
| -rw-r--r-- | src/test/ui/const-generics/const-param-elided-lifetime.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 ff98368bca2..5679dd35c30 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<T: Ord<&u8>>() {}` 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 |
