Check out example codes for "ignore #[warn(dead_code)]". It will help you in understanding the concepts better.

Code Example 1

#[allow(dead_code)]
fn dead() {}

Learn ReactJs, React Native from akashmittal.com