From: Ian Jackson Date: Mon, 16 May 2022 14:46:55 +0000 (+0100) Subject: W X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=194e8692d7d8fbbf3ca0fa2cbec7aa987b08e18e;p=rust-experiments.git W --- diff --git a/src/main.rs b/src/main.rs index f2af6be..86167f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); }