Changes the ad-hoc closure adjustment into using adjustment info instead
of being separately driven from types, and likewise for autoderef.
Also takes care of autoref (the cases we should be seeing in consts,
at least, since we can't be doing method calls which would need the
ref-to-vec mode), which didn't quite work right previously.
However, "dereference" of a newtype isn't handled yet....
This makes `#[deriving_clone]` useful.
I wasn't sure if a macro was the right way to do this, but it seems more maintainable than a series of repetitive `impl`s.
Without this change, rust-mode doesn't work if 'cl hasn't been required
by something else, apparently. I'm not entirely sure what changed such
that I started seeing this problem instead of not, but maybe the emacs
world has been making progress towards not loading 'cl at runtime if
it's only needed at compile time.
r?
`log` can polymorphically log anything, but debug!, etc. requires a format string. With this patch you can equivalently write `debug!(foo)` or `debug!("%?", foo)`.
I'm doing this because I was trying to remove `log` (replacing it with nothing, at least temporarily), but there are a number of logging statements that just want to print an arbitrary value and don't care about the format string.
I'm not entirely convinced this is a good change, since it overloads the implementation of these macros and makes their usage slightly more nuanced.
Closes#4985 by removing the `dvec` module and all use cases throughout the compiler.
A number of uses were directly convertible to `let mut foo = ~[];`, while others in hash maps and some fields had to be converted to `@mut ~[T]`. A small number of `DVec` instances in fields were able to be converted directly to `~[T]` without the `@`, but this was a difficult thing to do.
The one thing `log` can still do is polymorphically log anything,
but debug!, etc. require a format string. With this patch
you can equivalently write `debug!(foo)` or `debug!("%?", foo)`