diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-05-01 10:29:47 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-05-01 10:30:54 -0400 |
| commit | 4af2d90af59bb5e28e5d114d8a6004d68fad3bd5 (patch) | |
| tree | c5be284688af69a2843258f71511686827bc21d1 /src/libcore/rt | |
| parent | 84861101eca12942b42f36f8adb18cfc74515431 (diff) | |
| download | rust-4af2d90af59bb5e28e5d114d8a6004d68fad3bd5.tar.gz rust-4af2d90af59bb5e28e5d114d8a6004d68fad3bd5.zip | |
add an option to debug borrows (RUST_DEBUG_BORROW) so you can
find out where the offending borrow occurred. This ... still needs some work.
Diffstat (limited to 'src/libcore/rt')
| -rw-r--r-- | src/libcore/rt/env.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/rt/env.rs b/src/libcore/rt/env.rs index 92e2ec51306..1f52cf77868 100644 --- a/src/libcore/rt/env.rs +++ b/src/libcore/rt/env.rs @@ -31,8 +31,10 @@ pub struct Environment { argc: c_int, /// The argv value passed to main argv: **c_char, - /// Print GC debugging info - debug_mem: bool + /// Print GC debugging info (true if env var RUST_DEBUG_MEM is set) + debug_mem: bool, + /// Track origin of `@mut` borrows (true if env var RUST_DEBUG_BORROWS is set) + debug_borrows: bool } /// Get the global environment settings |
