1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // A zero-dependency test that covers some basic traits, default
12 // methods, etc. When mucking about with basic type system stuff I
13 // often encounter problems in the iterator trait, so it's useful to
14 // have hanging around. -nmatsakis
16 // error-pattern: requires `start` lang_item
19 #![feature(lang_items)]
22 pub trait Sized for Sized? {
29 fn clone(&self) -> Self;
34 pub struct ContravariantLifetime<'a>;
36 impl <'a> ::std::clone::Clone for ContravariantLifetime<'a> {
38 fn clone(&self) -> ContravariantLifetime<'a> {
39 match *self { ContravariantLifetime => ContravariantLifetime, }