chiark / gitweb /
W
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 16 May 2022 14:46:55 +0000 (15:46 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 16 May 2022 14:46:55 +0000 (15:46 +0100)
src/main.rs

index f2af6beef2378ab3bc5e89dbb7ccc797fbaab5d6..86167f913bb2cbf65f393e3c758d7fc6466b932e 100644 (file)
@@ -1,14 +1,15 @@
 #![allow(dead_code)]
 
 trait Ish {
-    const FIELDS: &'static [&'static str],
+    const F: &'static [&'static str];
 }
 
-struct Inner { i: usize; }
+struct Inner { i: usize, }
+
 impl Ish for Inner {
-    const FIELDS: &'static [&'static str] = ["i"];
+    const F: &'static [&'static str] = &["i"];
 }
 
 fn main(){
-    eprintln!("IF {:?}", Inner::FIELDS);
+    eprintln!("IF {:?}", Inner::F);
 }