Skip to content

Instantly share code, notes, and snippets.

@saethlin
Created October 12, 2017 20:46
Show Gist options
  • Save saethlin/a114fd3a8249e66eb2824ab34d6971d7 to your computer and use it in GitHub Desktop.
Save saethlin/a114fd3a8249e66eb2824ab34d6971d7 to your computer and use it in GitHub Desktop.
rustc unused imports bug
#[macro_use]
extern crate derive_more;
use std::ops::{Add, Sub, Div, Mul};
#[derive(Debug, Clone, Copy, Add, Mul)]
pub struct Vec3 {
pub x: f64,
pub y: f64,
pub z: f64,
}
fn main() {}
// Errors on stable 1.20
warning: unused imports: `Div`, `Sub`
--> src/main.rs:3:21
|
3 | use std::ops::{Add, Sub, Div, Mul};
| ^^^ ^^^
|
= note: #[warn(unused_imports)] on by default
warning: unused import: `Add`
--> src/main.rs:3:16
|
3 | use std::ops::{Add, Sub, Div, Mul};
| ^^^
warning: unused import: `Mul`
--> src/main.rs:3:31
|
3 | use std::ops::{Add, Sub, Div, Mul};
| ^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment