Open liamnaddell opened 2 months ago
I tried this code (which rustc compiles with no warnings)
struct Foo { my_int: u32, } trait Child { fn child(&self) -> u32; } impl Child for Foo { fn child(&self) -> u32 { return self.my_int; } } pub fn main() { let a = Foo{my_int: 0xfeedf00d}; let b: &dyn Child = &a; b.child(); // Here to silence bogus compiler warning //let _ = a.my_int; }
What I get with rustc: Compiles with no warnings What I get with gccrs:
liam@gentoo ~/gccrs-build $ gccrs bogus_warning2.rs bogus_warning2.rs:4:5: warning: field is never read: ‘my_int’ 4 | my_int: u32, | ^~~~~~
Discovered in: be1e78ba333435e2106227905bc63dfeb8718ff3
This was discovered in testing for #914
I tried this code (which rustc compiles with no warnings)
What I get with rustc: Compiles with no warnings What I get with gccrs:
Discovered in: be1e78ba333435e2106227905bc63dfeb8718ff3