Added overview of the debuginfo module at the beginning of debuginfo.rs.
Fixed compiler warnings about unnecessary string allocations in debuginfo.rs
Reordered debuginfo.rs and commented public fns
debuginfo.rs: Removed some static constants not used anymore.
debuginfo.rs: Explained why a function is called although one could think it should not be.
debuginfo.rs: Removed trailing whitespace.
Make task_rng() return @mut R instead of @@mut R
resolve: report duplicate module definitions

add_child() is responsible for reporting errors about type, value, and
module duplicate definitions.  Although it checks for all three, it uses
namespace_to_str() to convert a Namespace value into a string before
printing an error like:

  error: duplicate definition of type `foo`
                                 ^^^^
  note: first definition of type foo here:
                            ^^^^

Unfortunately, this string can only be one of "type" or
"value" (corresponding to TypeNS and ValueNS respectively), and it
reports duplicate modules as duplicate types.

To alleviate the problem, define a special NamespaceError enum to define
more specialized errors, and use it instead of attempting to reuse the
Namespace enum.

Reported-by: Corey Richardson <corey@octayn.net>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
resolve: make error message strings more consistent

The "first definition of ..." error string reported by add_child() looks
different from similar messages reported by other functions.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
auto merge of #7325 : artagnon/rust/resolve-module, r=cmr

Fix #7322.

I started out with a band-aid approach to special-case the duplicate module error using `is_duplicate_module`, but thought this would be better in the long term.
remove the redundant `each` method from OptVec
container: remove internal iterators from Map

the maps are being migrated to external iterators
remove `each` from vec, HashMap and HashSet
xfail test hitting a codegen bug (issue #7385)
auto merge of #7373 : thestinger/rust/iterator, r=huonw
Deny common lints by default for lib{std,extra}
Stop passing --disable-threads to LLVM
auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatch

Sets the stage for further cleanup (especially mass-slaughter of `@`)
Change finalize -> drop.
auto merge of #7269 : luqmana/rust/drop, r=thestinger

Finally rename finalize to drop.
Closes #4332.