mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 02:54:00 +00:00
Add some writes to a log file for debugging
This commit is contained in:
parent
37a0e52a1e
commit
7e4b633417
@ -67,7 +67,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
|
||||
}
|
||||
})
|
||||
.sum();
|
||||
|
||||
use std::io::Write;
|
||||
let mut f = ::std::fs::File::create("log").unwrap();
|
||||
|
||||
writeln!(f, "size, max size: {}, {}", size, self.maximum_variant_size_allowed).unwrap();
|
||||
if size > self.maximum_variant_size_allowed {
|
||||
writeln!(f, "size > max").unwrap();
|
||||
// panic!("foo");
|
||||
|
||||
span_lint_and_then(cx,
|
||||
LARGE_ENUM_VARIANT,
|
||||
def.variants[i].span,
|
||||
|
Loading…
Reference in New Issue
Block a user