about summary refs log tree commit diff
path: root/tests/ui/const-generics/const-argument-if-length.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/const-argument-if-length.rs')
-rw-r--r--tests/ui/const-generics/const-argument-if-length.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ui/const-generics/const-argument-if-length.rs b/tests/ui/const-generics/const-argument-if-length.rs
index db1eafca2c7..c5ff86fbfb7 100644
--- a/tests/ui/const-generics/const-argument-if-length.rs
+++ b/tests/ui/const-generics/const-argument-if-length.rs
@@ -5,6 +5,7 @@
 
 pub const fn is_zst<T: ?Sized>() -> usize {
     if std::mem::size_of::<T>() == 0 {
+        //~^ ERROR the size for values of type `T` cannot be known at compilation time
         1
     } else {
         0