Add support for #[no_drop_flag] attribute
Set #[no_drop_flag] on Rc<T> and AtomicOption. Add Test
Zero the struct in the take glue, not the drop glue
auto merge of #7317 : Aatch/rust/no-drop-flag, r=thestinger

This adds a `#[no_drop_flag]` attribute. This attribute tells the compiler to omit the drop flag from the struct, if it has a destructor. When the destructor is run, instead of setting the drop flag, it instead zeroes-out the struct. This means the destructor can run multiple times and therefore it is up to the developer to use it safely.

The primary usage case for this is smart-pointer types like `Rc<T>` as the extra flag caused the struct to be 1 word larger because of alignment.

This closes #7271 and #7138
Rename all files with the 'rc' extension
Add the `warnings` lint attribute
auto merge of #7371 : alexcrichton/rust/trying, r=cmr

This is an attempt at a smaller request than #7113, it's just the first two commits
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
wip: rustc: remove some dead functions
Remove trailing null from string slices
wip
wip
wip