1
Fork 0

Cleaned up std::any

- Added `TraitObject` representation to `std::raw`.
- Added doc to `std::raw`.
- Removed `Any::as_void_ptr()` and `Any::as_mut_void_ptr()`
  methods as they are uneccessary now after the removal of
  headers on owned boxes. This reduces the number of virtual calls needed.
- Made the `..Ext` implementations work directly with the repr of
  a trait object.
- Removed `Any`-related traits from the prelude.

- Added bench for `Any`
This commit is contained in:
Marvin Löbel 2014-03-03 01:01:13 +01:00
parent 19fadf6567
commit 3158047a45
11 changed files with 70 additions and 120 deletions

View file

@ -2229,6 +2229,7 @@ mod tests {
B(~str)
}
fn check_err<T: Decodable<Decoder>>(to_parse: &'static str, expected_error: &str) {
use std::any::AnyRefExt;
use std::task;
let res = task::try(proc() {
// either fails in `decode` (which is what we want), or