Copying trait.rs to minimize the bug.
Reducing bug file.