diff options
| author | bors <bors@rust-lang.org> | 2015-01-05 14:51:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-05 14:51:03 +0000 |
| commit | 03268bbf35d3ff2350d987fe7b60375839abdf2e (patch) | |
| tree | 86ecae7591630a6ccf7a69a47570577a0caea8c6 /src/test/compile-fail | |
| parent | 8e83af6e879535c33fd83d247d16619e39e0b951 (diff) | |
| parent | 0cb7a4062a3c69bb0c54f0c9136889a1006e4f62 (diff) | |
| download | rust-03268bbf35d3ff2350d987fe7b60375839abdf2e.tar.gz rust-03268bbf35d3ff2350d987fe7b60375839abdf2e.zip | |
auto merge of #20514 : alexcrichton/rust/serialize-associated-type, r=aturon
This commit moves the libserialize crate (and will force the hand of the rustc-serialize crate) to not require the `old_orphan_check` feature gate as well as using associated types wherever possible. Concretely, the following changes were made: * The error type of `Encoder` and `Decoder` is now an associated type, meaning that these traits have no type parameters. * The `Encoder` and `Decoder` type parameters on the `Encodable` and `Decodable` traits have moved to the corresponding method of the trait. This movement alleviates the dependency on `old_orphan_check` but implies that implementations can no longer be specialized for the type of encoder/decoder being implemented. Due to the trait definitions changing, this is a: [breaking-change]
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/variance-trait-matching-2.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/test/compile-fail/variance-trait-matching-2.rs b/src/test/compile-fail/variance-trait-matching-2.rs deleted file mode 100644 index cae7a4cefad..00000000000 --- a/src/test/compile-fail/variance-trait-matching-2.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -extern crate serialize; - -use std::fmt; -use serialize::{Encodable, Encoder}; - -pub fn buffer_encode<'a, - T:Encodable<serialize::json::Encoder<'a>,fmt::Error>>( - to_encode_object: &T) - -> String { - let mut m = String::new(); - { - let mut encoder = - serialize::json::Encoder::new(&mut m); - //~^ ERROR `m` does not live long enough - to_encode_object.encode(&mut encoder); - } - m -} - -fn main() {} |
