mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
delete some no-longer-meaningful tests
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
pub trait Decoder {
|
||||
type Error;
|
||||
|
||||
fn read_enum<T, F>(&mut self, name: &str, f: F) -> Result<T, Self::Error>
|
||||
where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
|
||||
fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F)
|
||||
-> Result<T, Self::Error>
|
||||
where F: FnMut(&mut Self, usize) -> Result<T, Self::Error>;
|
||||
|
||||
}
|
||||
|
||||
pub trait Decodable: Sized {
|
||||
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
//@ run-pass
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
pub type task_id = isize;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub enum Task {
|
||||
TaskHandle(task_id)
|
||||
}
|
||||
|
||||
pub fn main() { }
|
||||
@@ -1,16 +0,0 @@
|
||||
//@ check-pass
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
macro_rules! define_vec {
|
||||
() => (
|
||||
mod foo {
|
||||
#[derive(PartialEq)]
|
||||
pub struct bar;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
define_vec![];
|
||||
|
||||
pub fn main() {}
|
||||
@@ -1,25 +0,0 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(deprecated)]
|
||||
|
||||
use std::hash::{Hash, SipHasher};
|
||||
|
||||
// testing multiple separate deriving attributes
|
||||
#[derive(PartialEq)]
|
||||
#[derive(Clone)]
|
||||
#[derive(Hash)]
|
||||
struct Foo {
|
||||
bar: usize,
|
||||
baz: isize
|
||||
}
|
||||
|
||||
fn hash<T: Hash>(_t: &T) {}
|
||||
|
||||
pub fn main() {
|
||||
let a = Foo {bar: 4, baz: -3};
|
||||
|
||||
a == a; // check for PartialEq impl w/o testing its correctness
|
||||
a.clone(); // check for Clone impl w/o testing its correctness
|
||||
hash(&a); // check for Hash impl w/o testing its correctness
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(deprecated)]
|
||||
|
||||
use std::hash::{Hash, SipHasher};
|
||||
|
||||
#[derive(PartialEq, Clone, Hash)]
|
||||
struct Foo {
|
||||
bar: usize,
|
||||
baz: isize
|
||||
}
|
||||
|
||||
fn hash<T: Hash>(_t: &T) {}
|
||||
|
||||
pub fn main() {
|
||||
let a = Foo {bar: 4, baz: -3};
|
||||
|
||||
a == a; // check for PartialEq impl w/o testing its correctness
|
||||
a.clone(); // check for Clone impl w/o testing its correctness
|
||||
hash(&a); // check for Hash impl w/o testing its correctness
|
||||
}
|
||||
Reference in New Issue
Block a user