]> git.lizzy.rs Git - rust.git/commitdiff
move some more tests
authorRalf Jung <post@ralfj.de>
Tue, 2 Oct 2018 11:14:19 +0000 (13:14 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 2 Oct 2018 11:16:56 +0000 (13:16 +0200)
94 files changed:
src/test/run-pass/issues/issue-10853.rs [deleted file]
src/test/run-pass/issues/issue-1251.rs [deleted file]
src/test/run-pass/issues/issue-14901.rs [deleted file]
src/test/run-pass/issues/issue-14936.rs [deleted file]
src/test/run-pass/issues/issue-1821.rs [deleted file]
src/test/run-pass/issues/issue-1866.rs [deleted file]
src/test/run-pass/issues/issue-18988.rs [deleted file]
src/test/run-pass/issues/issue-22777.rs [deleted file]
src/test/run-pass/issues/issue-2311-2.rs [deleted file]
src/test/run-pass/issues/issue-2311.rs [deleted file]
src/test/run-pass/issues/issue-2312.rs [deleted file]
src/test/run-pass/issues/issue-24161.rs [deleted file]
src/test/run-pass/issues/issue-2487-a.rs [deleted file]
src/test/run-pass/issues/issue-2502.rs [deleted file]
src/test/run-pass/issues/issue-2611-3.rs [deleted file]
src/test/run-pass/issues/issue-2748-a.rs [deleted file]
src/test/run-pass/issues/issue-2804-2.rs [deleted file]
src/test/run-pass/issues/issue-2904.rs [deleted file]
src/test/run-pass/issues/issue-3149.rs [deleted file]
src/test/run-pass/issues/issue-3424.rs [deleted file]
src/test/run-pass/issues/issue-3563-2.rs [deleted file]
src/test/run-pass/issues/issue-3609.rs [deleted file]
src/test/run-pass/issues/issue-37733.rs [deleted file]
src/test/run-pass/issues/issue-3874.rs [deleted file]
src/test/run-pass/issues/issue-3888-2.rs [deleted file]
src/test/run-pass/issues/issue-3979-2.rs [deleted file]
src/test/run-pass/issues/issue-3991.rs [deleted file]
src/test/run-pass/issues/issue-4025.rs [deleted file]
src/test/run-pass/issues/issue-4464.rs [deleted file]
src/test/run-pass/issues/issue-4830.rs [deleted file]
src/test/run-pass/issues/issue-5353.rs [deleted file]
src/test/run-pass/issues/issue-5572.rs [deleted file]
src/test/run-pass/issues/issue-5754.rs [deleted file]
src/test/run-pass/issues/issue-5884.rs [deleted file]
src/test/run-pass/issues/issue-5900.rs [deleted file]
src/test/run-pass/issues/issue-5950.rs [deleted file]
src/test/run-pass/issues/issue-6341.rs [deleted file]
src/test/run-pass/issues/issue-6470.rs [deleted file]
src/test/run-pass/issues/issue-6557.rs [deleted file]
src/test/run-pass/issues/issue-6898.rs [deleted file]
src/test/run-pass/issues/issue-7607-2.rs [deleted file]
src/test/run-pass/issues/issue-7673-cast-generically-implemented-trait.rs [deleted file]
src/test/run-pass/issues/issue-8171-default-method-self-inherit-builtin-trait.rs [deleted file]
src/test/run-pass/issues/issue-8398.rs [deleted file]
src/test/run-pass/issues/issue-8578.rs [deleted file]
src/test/run-pass/issues/issue-9110.rs [deleted file]
src/test/run-pass/issues/issue-9719.rs [deleted file]
src/test/ui/issues/issue-10853.rs [new file with mode: 0644]
src/test/ui/issues/issue-1251.rs [new file with mode: 0644]
src/test/ui/issues/issue-14901.rs [new file with mode: 0644]
src/test/ui/issues/issue-14936.rs [new file with mode: 0644]
src/test/ui/issues/issue-1821.rs [new file with mode: 0644]
src/test/ui/issues/issue-1866.rs [new file with mode: 0644]
src/test/ui/issues/issue-18988.rs [new file with mode: 0644]
src/test/ui/issues/issue-22777.rs [new file with mode: 0644]
src/test/ui/issues/issue-2311-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-2311.rs [new file with mode: 0644]
src/test/ui/issues/issue-2312.rs [new file with mode: 0644]
src/test/ui/issues/issue-24161.rs [new file with mode: 0644]
src/test/ui/issues/issue-2487-a.rs [new file with mode: 0644]
src/test/ui/issues/issue-2502.rs [new file with mode: 0644]
src/test/ui/issues/issue-2611-3.rs [new file with mode: 0644]
src/test/ui/issues/issue-2748-a.rs [new file with mode: 0644]
src/test/ui/issues/issue-2804-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-2904.rs [new file with mode: 0644]
src/test/ui/issues/issue-3149.rs [new file with mode: 0644]
src/test/ui/issues/issue-3424.rs [new file with mode: 0644]
src/test/ui/issues/issue-3563-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-3609.rs [new file with mode: 0644]
src/test/ui/issues/issue-37733.rs [new file with mode: 0644]
src/test/ui/issues/issue-3874.rs [new file with mode: 0644]
src/test/ui/issues/issue-3888-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-3979-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-3991.rs [new file with mode: 0644]
src/test/ui/issues/issue-4025.rs [new file with mode: 0644]
src/test/ui/issues/issue-4464.rs [new file with mode: 0644]
src/test/ui/issues/issue-4830.rs [new file with mode: 0644]
src/test/ui/issues/issue-5353.rs [new file with mode: 0644]
src/test/ui/issues/issue-5572.rs [new file with mode: 0644]
src/test/ui/issues/issue-5754.rs [new file with mode: 0644]
src/test/ui/issues/issue-5884.rs [new file with mode: 0644]
src/test/ui/issues/issue-5900.rs [new file with mode: 0644]
src/test/ui/issues/issue-5950.rs [new file with mode: 0644]
src/test/ui/issues/issue-6341.rs [new file with mode: 0644]
src/test/ui/issues/issue-6470.rs [new file with mode: 0644]
src/test/ui/issues/issue-6557.rs [new file with mode: 0644]
src/test/ui/issues/issue-6898.rs [new file with mode: 0644]
src/test/ui/issues/issue-7607-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs [new file with mode: 0644]
src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs [new file with mode: 0644]
src/test/ui/issues/issue-8398.rs [new file with mode: 0644]
src/test/ui/issues/issue-8578.rs [new file with mode: 0644]
src/test/ui/issues/issue-9110.rs [new file with mode: 0644]
src/test/ui/issues/issue-9719.rs [new file with mode: 0644]

diff --git a/src/test/run-pass/issues/issue-10853.rs b/src/test/run-pass/issues/issue-10853.rs
deleted file mode 100644 (file)
index 4a67d25..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-// pretty-expanded FIXME #23616
-
-#![deny(missing_docs)]
-#![doc="module"]
-
-#[doc="struct"]
-pub struct Foo;
-
-pub fn foo() {
-    #![doc="fn"]
-}
-
-#[doc="main"]
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-1251.rs b/src/test/run-pass/issues/issue-1251.rs
deleted file mode 100644 (file)
index f9d48b8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(unused_attributes)]
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-// ignore-wasm32-bare no libc to test ffi with
-
-#![feature(libc)]
-
-#![crate_id="rust_get_test_int"]
-
-mod rustrt {
-    extern crate libc;
-
-    extern {
-        pub fn rust_get_test_int() -> libc::intptr_t;
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-14901.rs b/src/test/run-pass/issues/issue-14901.rs
deleted file mode 100644 (file)
index 7612c5b..0000000
+++ /dev/null
@@ -1,28 +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.
-
-// run-pass
-pub trait Reader {}
-
-enum Wrapper<'a> {
-    WrapReader(&'a (Reader + 'a))
-}
-
-trait Wrap<'a> {
-    fn wrap(self) -> Wrapper<'a>;
-}
-
-impl<'a, R: Reader> Wrap<'a> for &'a mut R {
-    fn wrap(self) -> Wrapper<'a> {
-        Wrapper::WrapReader(self as &'a mut Reader)
-    }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-14936.rs b/src/test/run-pass/issues/issue-14936.rs
deleted file mode 100644 (file)
index 4249a83..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2012-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.
-
-// run-pass
-#![allow(unused_macros)]
-#![allow(dead_code)]
-#![feature(asm)]
-
-type History = Vec<&'static str>;
-
-fn wrap<A>(x:A, which: &'static str, history: &mut History) -> A {
-    history.push(which);
-    x
-}
-
-macro_rules! demo {
-    ( $output_constraint:tt ) => {
-        {
-            let mut x: isize = 0;
-            let y: isize = 1;
-
-            let mut history: History = vec![];
-            unsafe {
-                asm!("mov ($1), $0"
-                     : $output_constraint (*wrap(&mut x, "out", &mut history))
-                     : "r"(&wrap(y, "in", &mut history))
-                     :: "volatile");
-            }
-            assert_eq!((x,y), (1,1));
-            let b: &[_] = &["out", "in"];
-            assert_eq!(history, b);
-        }
-    }
-}
-
-#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
-fn main() {
-    fn out_write_only_expr_then_in_expr() {
-        demo!("=r")
-    }
-
-    fn out_read_write_expr_then_in_expr() {
-        demo!("+r")
-    }
-
-    out_write_only_expr_then_in_expr();
-    out_read_write_expr_then_in_expr();
-}
-
-#[cfg(all(not(target_arch = "x86"), not(target_arch = "x86_64")))]
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-1821.rs b/src/test/run-pass/issues/issue-1821.rs
deleted file mode 100644 (file)
index d37b6df..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-// Issue #1821 - Don't recurse trying to typecheck this
-
-
-// pretty-expanded FIXME #23616
-
-enum t {
-    foo(Vec<t>)
-}
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-1866.rs b/src/test/run-pass/issues/issue-1866.rs
deleted file mode 100644 (file)
index f27d803..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-// pretty-expanded FIXME #23616
-
-mod a {
-    pub type rust_task = usize;
-    pub mod rustrt {
-        use super::rust_task;
-        extern {
-            pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
-        }
-    }
-}
-
-mod b {
-    pub type rust_task = bool;
-    pub mod rustrt {
-        use super::rust_task;
-        extern {
-            pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
-        }
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-18988.rs b/src/test/run-pass/issues/issue-18988.rs
deleted file mode 100644 (file)
index 691d411..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 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.
-
-// run-pass
-#![allow(dead_code)]
-pub trait Foo : Send { }
-
-pub struct MyFoo {
-    children: Vec<Box<Foo>>,
-}
-
-impl Foo for MyFoo { }
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-22777.rs b/src/test/run-pass/issues/issue-22777.rs
deleted file mode 100644 (file)
index 92ad7a4..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 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.
-
-// run-pass
-// This test is reduced from libsyntax.  It is just checking that we
-// can successfully deal with a "deep" structure, which the drop-check
-// was hitting a recursion limit on at one point.
-
-// pretty-expanded FIXME #23616
-
-#![allow(non_camel_case_types)]
-
-pub fn noop_fold_impl_item() -> SmallVector<ImplItem> {
-    loop  { }
-}
-
-pub struct SmallVector<T>(P<T>);
-pub struct ImplItem(P<S01_Method>);
-
-struct P<T>(Box<T>);
-
-struct S01_Method(P<S02_Generics>);
-struct S02_Generics(P<S03_TyParam>);
-struct S03_TyParam(P<S04_TyParamBound>);
-struct S04_TyParamBound(S05_PolyTraitRef);
-struct S05_PolyTraitRef(S06_TraitRef);
-struct S06_TraitRef(S07_Path);
-struct S07_Path(Vec<S08_PathSegment>);
-struct S08_PathSegment(S09_GenericArgs);
-struct S09_GenericArgs(P<S10_ParenthesizedParameterData>);
-struct S10_ParenthesizedParameterData(Option<P<S11_Ty>>);
-struct S11_Ty(P<S12_Expr>);
-struct S12_Expr(P<S13_Block>);
-struct S13_Block(Vec<P<S14_Stmt>>);
-struct S14_Stmt(P<S15_Decl>);
-struct S15_Decl(P<S16_Local>);
-struct S16_Local(P<S17_Pat>);
-struct S17_Pat(P<S18_Mac>);
-struct S18_Mac(Vec<P<S19_TokenTree>>);
-struct S19_TokenTree(P<S20_Token>);
-struct S20_Token(P<S21_Nonterminal>);
-struct S21_Nonterminal(P<S22_Item>);
-struct S22_Item(P<S23_EnumDef>);
-struct S23_EnumDef(Vec<P<S24_Variant>>);
-struct S24_Variant(P<S25_VariantKind>);
-struct S25_VariantKind(P<S26_StructDef>);
-struct S26_StructDef(Vec<P<S27_StructField>>);
-struct S27_StructField(P<S28_StructFieldKind>);
-struct S28_StructFieldKind;
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-2311-2.rs b/src/test/run-pass/issues/issue-2311-2.rs
deleted file mode 100644 (file)
index 493ff6f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-
-trait clam<A> {
-    fn get(self) -> A;
-}
-
-struct foo<A> {
-    x: A,
-}
-
-impl<A> foo<A> {
-   pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
-     panic!();
-   }
-}
-
-fn foo<A>(b: A) -> foo<A> {
-    foo {
-        x: b
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-2311.rs b/src/test/run-pass/issues/issue-2311.rs
deleted file mode 100644 (file)
index 816754c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(non_camel_case_types)]
-
-// pretty-expanded FIXME #23616
-
-trait clam<A> { fn get(self) -> A; }
-trait foo<A> {
-   fn bar<B,C:clam<A>>(&self, c: C) -> B;
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-2312.rs b/src/test/run-pass/issues/issue-2312.rs
deleted file mode 100644 (file)
index 9975f8a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-// Testing that the B's are resolved
-
-
-trait clam<A> { fn get(self) -> A; }
-
-struct foo(isize);
-
-impl foo {
-    pub fn bar<B,C:clam<B>>(&self, _c: C) -> B { panic!(); }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-24161.rs b/src/test/run-pass/issues/issue-24161.rs
deleted file mode 100644 (file)
index 8bb88be..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 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.
-
-// run-pass
-#![allow(dead_code)]
-#[derive(Copy,Clone)]
-struct Functions {
-    a: fn(u32) -> u32,
-    b: extern "C" fn(u32) -> u32,
-    c: unsafe fn(u32) -> u32,
-    d: unsafe extern "C" fn(u32) -> u32
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-2487-a.rs b/src/test/run-pass/issues/issue-2487-a.rs
deleted file mode 100644 (file)
index 6bd1757..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-// pretty-expanded FIXME #23616
-
-struct socket {
-    sock: isize,
-
-}
-
-impl Drop for socket {
-    fn drop(&mut self) {}
-}
-
-impl socket {
-    pub fn set_identity(&self)  {
-        closure(|| setsockopt_bytes(self.sock.clone()))
-    }
-}
-
-fn socket() -> socket {
-    socket {
-        sock: 1
-    }
-}
-
-fn closure<F>(f: F) where F: FnOnce() { f() }
-
-fn setsockopt_bytes(_sock: isize) { }
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-2502.rs b/src/test/run-pass/issues/issue-2502.rs
deleted file mode 100644 (file)
index 938a8e2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-
-
-// pretty-expanded FIXME #23616
-
-struct font<'a> {
-    fontbuf: &'a Vec<u8> ,
-}
-
-impl<'a> font<'a> {
-    pub fn buf(&self) -> &'a Vec<u8> {
-        self.fontbuf
-    }
-}
-
-fn font(fontbuf: &Vec<u8> ) -> font {
-    font {
-        fontbuf: fontbuf
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-2611-3.rs b/src/test/run-pass/issues/issue-2611-3.rs
deleted file mode 100644 (file)
index 99fd1a7..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-// Tests that impls are allowed to have looser, more permissive bounds
-// than the traits require.
-
-
-trait A {
-  fn b<C:Sync,D>(&self, x: C) -> C;
-}
-
-struct E {
- f: isize
-}
-
-impl A for E {
-  fn b<F,G>(&self, _x: F) -> F { panic!() }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-2748-a.rs b/src/test/run-pass/issues/issue-2748-a.rs
deleted file mode 100644 (file)
index db7b46a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_snake_case)]
-
-// pretty-expanded FIXME #23616
-
-struct CMap<'a> {
-    buf: &'a [u8],
-}
-
-fn CMap(buf: &[u8]) -> CMap {
-    CMap {
-        buf: buf
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-2804-2.rs b/src/test/run-pass/issues/issue-2804-2.rs
deleted file mode 100644 (file)
index 3e64d78..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012-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.
-
-// run-pass
-#![allow(dead_code)]
-// Minimized version of issue-2804.rs. Both check that callee IDs don't
-// clobber the previous node ID in a macro expr
-
-use std::collections::HashMap;
-
-fn add_interfaces(managed_ip: String, device: HashMap<String, isize>)  {
-     println!("{}, {}", managed_ip, device["interfaces"]);
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-2904.rs b/src/test/run-pass/issues/issue-2904.rs
deleted file mode 100644 (file)
index ab40c2e..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2012-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.
-
-// run-pass
-#![allow(unused_must_use)]
-#![allow(dead_code)]
-#![allow(unused_mut)]
-#![allow(non_camel_case_types)]
-
-// Map representation
-
-use std::fmt;
-use std::io::prelude::*;
-use square::{bot, wall, rock, lambda, closed_lift, open_lift, earth, empty};
-
-enum square {
-    bot,
-    wall,
-    rock,
-    lambda,
-    closed_lift,
-    open_lift,
-    earth,
-    empty
-}
-
-impl fmt::Debug for square {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", match *self {
-          bot => { "R".to_string() }
-          wall => { "#".to_string() }
-          rock => { "*".to_string() }
-          lambda => { "\\".to_string() }
-          closed_lift => { "L".to_string() }
-          open_lift => { "O".to_string() }
-          earth => { ".".to_string() }
-          empty => { " ".to_string() }
-        })
-    }
-}
-
-fn square_from_char(c: char) -> square {
-    match c  {
-      'R'  => { bot }
-      '#'  => { wall }
-      '*'  => { rock }
-      '\\' => { lambda }
-      'L'  => { closed_lift }
-      'O'  => { open_lift }
-      '.'  => { earth }
-      ' '  => { empty }
-      _ => {
-        println!("invalid square: {}", c);
-        panic!()
-      }
-    }
-}
-
-fn read_board_grid<rdr:'static + Read>(mut input: rdr)
-                   -> Vec<Vec<square>> {
-    let mut input: &mut Read = &mut input;
-    let mut grid = Vec::new();
-    let mut line = [0; 10];
-    input.read(&mut line);
-    let mut row = Vec::new();
-    for c in &line {
-        row.push(square_from_char(*c as char))
-    }
-    grid.push(row);
-    let width = grid[0].len();
-    for row in &grid { assert_eq!(row.len(), width) }
-    grid
-}
-
-mod test {
-    #[test]
-    pub fn trivial_to_string() {
-        assert_eq!(lambda.to_string(), "\\")
-    }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3149.rs b/src/test/run-pass/issues/issue-3149.rs
deleted file mode 100644 (file)
index 4eb3378..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_snake_case)]
-// pretty-expanded FIXME #23616
-
-fn Matrix4<T>(m11: T, m12: T, m13: T, m14: T,
-              m21: T, m22: T, m23: T, m24: T,
-              m31: T, m32: T, m33: T, m34: T,
-              m41: T, m42: T, m43: T, m44: T)
-              -> Matrix4<T> {
-    Matrix4 {
-        m11: m11, m12: m12, m13: m13, m14: m14,
-        m21: m21, m22: m22, m23: m23, m24: m24,
-        m31: m31, m32: m32, m33: m33, m34: m34,
-        m41: m41, m42: m42, m43: m43, m44: m44
-    }
-}
-
-struct Matrix4<T> {
-    m11: T, m12: T, m13: T, m14: T,
-    m21: T, m22: T, m23: T, m24: T,
-    m31: T, m32: T, m33: T, m34: T,
-    m41: T, m42: T, m43: T, m44: T,
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3424.rs b/src/test/run-pass/issues/issue-3424.rs
deleted file mode 100644 (file)
index cf1b002..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012-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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-// rustc --test ignores2.rs && ./ignores2
-
-pub struct Path;
-
-type rsrc_loader = Box<FnMut(&Path) -> Result<String, String>>;
-
-fn tester()
-{
-    let mut loader: rsrc_loader = Box::new(move |_path| {
-        Ok("more blah".to_string())
-    });
-
-    let path = Path;
-    assert!(loader(&path).is_ok());
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3563-2.rs b/src/test/run-pass/issues/issue-3563-2.rs
deleted file mode 100644 (file)
index 534bec5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-// pretty-expanded FIXME #23616
-
-trait Canvas {
-    fn add_point(&self, point: &isize);
-    fn add_points(&self, shapes: &[isize]) {
-        for pt in shapes {
-            self.add_point(pt)
-        }
-    }
-
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3609.rs b/src/test/run-pass/issues/issue-3609.rs
deleted file mode 100644 (file)
index abbaf63..0000000
+++ /dev/null
@@ -1,40 +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.
-
-// run-pass
-#![allow(unused_must_use)]
-#![allow(dead_code)]
-#![allow(unused_mut)]
-use std::thread;
-use std::sync::mpsc::Sender;
-
-type RingBuffer = Vec<f64> ;
-type SamplesFn = Box<FnMut(&RingBuffer) + Send>;
-
-enum Msg
-{
-    GetSamples(String, SamplesFn), // sample set name, callback which receives samples
-}
-
-fn foo(name: String, samples_chan: Sender<Msg>) {
-    thread::spawn(move|| {
-        let mut samples_chan = samples_chan;
-
-        let callback: SamplesFn = Box::new(move |buffer| {
-            for i in 0..buffer.len() {
-                println!("{}: {}", i, buffer[i])
-            }
-        });
-
-        samples_chan.send(Msg::GetSamples(name.clone(), callback));
-    }).join();
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-37733.rs b/src/test/run-pass/issues/issue-37733.rs
deleted file mode 100644 (file)
index a982cae..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 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.
-
-// run-pass
-#![allow(dead_code)]
-type A = for<> fn();
-
-type B = for<'a,> fn();
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3874.rs b/src/test/run-pass/issues/issue-3874.rs
deleted file mode 100644 (file)
index 2b1e25d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-enum PureCounter { PureCounterVariant(usize) }
-
-fn each<F>(thing: PureCounter, blk: F) where F: FnOnce(&usize) {
-    let PureCounter::PureCounterVariant(ref x) = thing;
-    blk(x);
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3888-2.rs b/src/test/run-pass/issues/issue-3888-2.rs
deleted file mode 100644 (file)
index 2d702da..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] {
-    &v[1..5]
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3979-2.rs b/src/test/run-pass/issues/issue-3979-2.rs
deleted file mode 100644 (file)
index 9b8e581..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-// pretty-expanded FIXME #23616
-
-trait A {
-    fn a_method(&self);
-}
-
-trait B: A {
-    fn b_method(&self);
-}
-
-trait C: B {
-    fn c_method(&self) {
-        self.a_method();
-    }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-3991.rs b/src/test/run-pass/issues/issue-3991.rs
deleted file mode 100644 (file)
index 9028066..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-
-// pretty-expanded FIXME #23616
-
-struct HasNested {
-    nest: Vec<Vec<isize> > ,
-}
-
-impl HasNested {
-    fn method_push_local(&mut self) {
-        self.nest[0].push(0);
-    }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-4025.rs b/src/test/run-pass/issues/issue-4025.rs
deleted file mode 100644 (file)
index 41af082..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(unused_mut)]
-/*
-# if b { x } else { y } requires identical types for x and y
-*/
-
-fn print1(b: bool, s1: &str, s2: &str) {
-    println!("{}", if b { s1 } else { s2 });
-}
-fn print2<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) {
-    println!("{}", if b { s1 } else { s2 });
-}
-fn print3(b: bool, s1: &str, s2: &str) {
-    let mut s: &str;
-    if b { s = s1; } else { s = s2; }
-    println!("{}", s);
-}
-fn print4<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) {
-    let mut s: &str;
-    if b { s = s1; } else { s = s2; }
-    println!("{}", s);
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-4464.rs b/src/test/run-pass/issues/issue-4464.rs
deleted file mode 100644 (file)
index fda063e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-fn broken(v: &[u8], i: usize, j: usize) -> &[u8] { &v[i..j] }
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-4830.rs b/src/test/run-pass/issues/issue-4830.rs
deleted file mode 100644 (file)
index 5140162..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-
-// pretty-expanded FIXME #23616
-
-pub struct Scheduler {
-    /// The event loop used to drive the scheduler and perform I/O
-    event_loop: Box<isize>
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-5353.rs b/src/test/run-pass/issues/issue-5353.rs
deleted file mode 100644 (file)
index d9d0783..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-const INVALID_ENUM : u32 = 0;
-const INVALID_VALUE : u32 = 1;
-
-fn gl_err_str(err: u32) -> String
-{
-  match err
-  {
-    INVALID_ENUM => { "Invalid enum".to_string() },
-    INVALID_VALUE => { "Invalid value".to_string() },
-    _ => { "Unknown error".to_string() }
-  }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-5572.rs b/src/test/run-pass/issues/issue-5572.rs
deleted file mode 100644 (file)
index 02f12a0..0000000
+++ /dev/null
@@ -1,17 +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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-fn foo<T: ::std::cmp::PartialEq>(_t: T) { }
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-5754.rs b/src/test/run-pass/issues/issue-5754.rs
deleted file mode 100644 (file)
index 9b90263..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(improper_ctypes)]
-
-// pretty-expanded FIXME #23616
-
-struct TwoDoubles {
-    r: f64,
-    i: f64
-}
-
-extern "C" {
-    fn rust_dbg_extern_identity_TwoDoubles(arg1: TwoDoubles) -> TwoDoubles;
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-5884.rs b/src/test/run-pass/issues/issue-5884.rs
deleted file mode 100644 (file)
index 82d87d9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-#![feature(box_syntax)]
-
-pub struct Foo {
-    a: isize,
-}
-
-struct Bar<'a> {
-    a: Box<Option<isize>>,
-    b: &'a Foo,
-}
-
-fn check(a: Box<Foo>) {
-    let _ic = Bar{ b: &*a, a: box None };
-}
-
-pub fn main(){}
diff --git a/src/test/run-pass/issues/issue-5900.rs b/src/test/run-pass/issues/issue-5900.rs
deleted file mode 100644 (file)
index edb4ead..0000000
+++ /dev/null
@@ -1,25 +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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-pub mod foo {
-    use super::Bar;
-
-    pub struct FooStruct { bar : Bar }
-}
-
-pub enum Bar {
-    Bar0 = 0 as isize
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-5950.rs b/src/test/run-pass/issues/issue-5950.rs
deleted file mode 100644 (file)
index 239f968..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013-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.
-
-// run-pass
-
-// pretty-expanded FIXME #23616
-
-pub use local as local_alias;
-
-pub mod local { }
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-6341.rs b/src/test/run-pass/issues/issue-6341.rs
deleted file mode 100644 (file)
index ca79e30..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-// pretty-expanded FIXME #23616
-
-#[derive(PartialEq)]
-struct A { x: usize }
-
-impl Drop for A {
-    fn drop(&mut self) {}
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-6470.rs b/src/test/run-pass/issues/issue-6470.rs
deleted file mode 100644 (file)
index a23a653..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(improper_ctypes)]
-
-// pretty-expanded FIXME #23616
-#![allow(non_snake_case)]
-
-pub mod Bar {
-    pub struct Foo {
-        v: isize,
-    }
-
-    extern {
-        pub fn foo(v: *const Foo) -> Foo;
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-6557.rs b/src/test/run-pass/issues/issue-6557.rs
deleted file mode 100644 (file)
index 886d13c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-#![feature(box_patterns)]
-#![feature(box_syntax)]
-
-fn foo(box (_x, _y): Box<(isize, isize)>) {}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-6898.rs b/src/test/run-pass/issues/issue-6898.rs
deleted file mode 100644 (file)
index b9a3a24..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-// pretty-expanded FIXME #23616
-
-use std::mem;
-
-/// Returns the size of a type
-pub fn size_of<T>() -> usize {
-    TypeInfo::size_of(None::<T>)
-}
-
-/// Returns the size of the type that `val` points to
-pub fn size_of_val<T>(val: &T) -> usize {
-    val.size_of_val()
-}
-
-pub trait TypeInfo: Sized {
-    fn size_of(_lame_type_hint: Option<Self>) -> usize;
-    fn size_of_val(&self) -> usize;
-}
-
-impl<T> TypeInfo for T {
-    /// The size of the type in bytes.
-    fn size_of(_lame_type_hint: Option<T>) -> usize {
-        mem::size_of::<T>()
-    }
-
-    /// Returns the size of the type of `self` in bytes.
-    fn size_of_val(&self) -> usize {
-        TypeInfo::size_of(None::<T>)
-    }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-7607-2.rs b/src/test/run-pass/issues/issue-7607-2.rs
deleted file mode 100644 (file)
index fa97eae..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-pub mod a {
-    pub struct Foo { a: usize }
-}
-
-pub mod b {
-    use a::Foo;
-    impl Foo {
-        fn bar(&self) { }
-    }
-}
-
-pub fn main() { }
diff --git a/src/test/run-pass/issues/issue-7673-cast-generically-implemented-trait.rs b/src/test/run-pass/issues/issue-7673-cast-generically-implemented-trait.rs
deleted file mode 100644 (file)
index 6e5a6c5..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-/*
-
-#7673 Polymorphically creating traits barely works
-
-*/
-
-#![feature(box_syntax)]
-
-pub fn main() {}
-
-trait A {
-    fn dummy(&self) { }
-}
-
-impl<T: 'static> A for T {}
-
-fn owned2<T: 'static>(a: Box<T>) { a as Box<A>; }
-fn owned3<T: 'static>(a: Box<T>) { box a as Box<A>; }
diff --git a/src/test/run-pass/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/src/test/run-pass/issues/issue-8171-default-method-self-inherit-builtin-trait.rs
deleted file mode 100644 (file)
index 9ddc63a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-/*
-
-#8171 Self is not recognised as implementing kinds in default method implementations
-
-*/
-
-fn require_send<T: Send>(_: T){}
-
-trait TragicallySelfIsNotSend: Send + Sized {
-    fn x(self) {
-        require_send(self);
-    }
-}
-
-pub fn main(){}
diff --git a/src/test/run-pass/issues/issue-8398.rs b/src/test/run-pass/issues/issue-8398.rs
deleted file mode 100644 (file)
index 2458e91..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-pub trait Writer {
-    fn write(&mut self, b: &[u8]) -> Result<(), ()>;
-}
-
-fn foo(a: &mut Writer) {
-    a.write(&[]).unwrap();
-}
-
-pub fn main(){}
diff --git a/src/test/run-pass/issues/issue-8578.rs b/src/test/run-pass/issues/issue-8578.rs
deleted file mode 100644 (file)
index 4cf39e3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-#![allow(non_camel_case_types)]
-#![allow(non_upper_case_globals)]
-// pretty-expanded FIXME #23616
-
-pub struct UninterpretedOption_NamePart {
-    name_part: Option<String>,
-}
-
-impl<'a> UninterpretedOption_NamePart {
-    pub fn default_instance() -> &'static UninterpretedOption_NamePart {
-        static instance: UninterpretedOption_NamePart = UninterpretedOption_NamePart {
-            name_part: None,
-        };
-        &instance
-    }
-}
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-9110.rs b/src/test/run-pass/issues/issue-9110.rs
deleted file mode 100644 (file)
index 150df68..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2013 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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-#![allow(non_snake_case)]
-
-macro_rules! silly_macro {
-    () => (
-        pub mod Qux {
-            pub struct Foo { x : u8 }
-            pub fn bar(_foo : Foo) {}
-        }
-    );
-}
-
-silly_macro!();
-
-pub fn main() {}
diff --git a/src/test/run-pass/issues/issue-9719.rs b/src/test/run-pass/issues/issue-9719.rs
deleted file mode 100644 (file)
index f98eba1..0000000
+++ /dev/null
@@ -1,51 +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.
-
-// run-pass
-#![allow(dead_code)]
-// pretty-expanded FIXME #23616
-
-mod a {
-    pub enum Enum<T> {
-        A(T),
-    }
-
-    pub trait X {
-        fn dummy(&self) { }
-    }
-    impl X for isize {}
-
-    pub struct Z<'a>(Enum<&'a (X+'a)>);
-    fn foo() { let x: isize = 42; let z = Z(Enum::A(&x as &X)); let _ = z; }
-}
-
-mod b {
-    trait X {
-        fn dummy(&self) { }
-    }
-    impl X for isize {}
-    struct Y<'a>{
-        x:Option<&'a (X+'a)>,
-    }
-
-    fn bar() {
-        let x: isize = 42;
-        let _y = Y { x: Some(&x as &X) };
-    }
-}
-
-mod c {
-    pub trait X { fn f(&self); }
-    impl X for isize { fn f(&self) {} }
-    pub struct Z<'a>(Option<&'a (X+'a)>);
-    fn main() { let x: isize = 42; let z = Z(Some(&x as &X)); let _ = z; }
-}
-
-pub fn main() {}
diff --git a/src/test/ui/issues/issue-10853.rs b/src/test/ui/issues/issue-10853.rs
new file mode 100644 (file)
index 0000000..6e2aea4
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2013 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.
+
+// compile-pass
+// pretty-expanded FIXME #23616
+
+#![deny(missing_docs)]
+#![doc="module"]
+
+#[doc="struct"]
+pub struct Foo;
+
+pub fn foo() {
+    #![doc="fn"]
+}
+
+#[doc="main"]
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-1251.rs b/src/test/ui/issues/issue-1251.rs
new file mode 100644 (file)
index 0000000..b42404c
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(unused_attributes)]
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+// ignore-wasm32-bare no libc to test ffi with
+
+#![feature(libc)]
+
+#![crate_id="rust_get_test_int"]
+
+mod rustrt {
+    extern crate libc;
+
+    extern {
+        pub fn rust_get_test_int() -> libc::intptr_t;
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-14901.rs b/src/test/ui/issues/issue-14901.rs
new file mode 100644 (file)
index 0000000..18a6cfd
--- /dev/null
@@ -0,0 +1,28 @@
+// 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.
+
+// compile-pass
+pub trait Reader {}
+
+enum Wrapper<'a> {
+    WrapReader(&'a (Reader + 'a))
+}
+
+trait Wrap<'a> {
+    fn wrap(self) -> Wrapper<'a>;
+}
+
+impl<'a, R: Reader> Wrap<'a> for &'a mut R {
+    fn wrap(self) -> Wrapper<'a> {
+        Wrapper::WrapReader(self as &'a mut Reader)
+    }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-14936.rs b/src/test/ui/issues/issue-14936.rs
new file mode 100644 (file)
index 0000000..d90814d
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright 2012-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.
+
+// compile-pass
+#![allow(unused_macros)]
+#![allow(dead_code)]
+#![feature(asm)]
+
+type History = Vec<&'static str>;
+
+fn wrap<A>(x:A, which: &'static str, history: &mut History) -> A {
+    history.push(which);
+    x
+}
+
+macro_rules! demo {
+    ( $output_constraint:tt ) => {
+        {
+            let mut x: isize = 0;
+            let y: isize = 1;
+
+            let mut history: History = vec![];
+            unsafe {
+                asm!("mov ($1), $0"
+                     : $output_constraint (*wrap(&mut x, "out", &mut history))
+                     : "r"(&wrap(y, "in", &mut history))
+                     :: "volatile");
+            }
+            assert_eq!((x,y), (1,1));
+            let b: &[_] = &["out", "in"];
+            assert_eq!(history, b);
+        }
+    }
+}
+
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+fn main() {
+    fn out_write_only_expr_then_in_expr() {
+        demo!("=r")
+    }
+
+    fn out_read_write_expr_then_in_expr() {
+        demo!("+r")
+    }
+
+    out_write_only_expr_then_in_expr();
+    out_read_write_expr_then_in_expr();
+}
+
+#[cfg(all(not(target_arch = "x86"), not(target_arch = "x86_64")))]
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-1821.rs b/src/test/ui/issues/issue-1821.rs
new file mode 100644 (file)
index 0000000..8518547
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+// Issue #1821 - Don't recurse trying to typecheck this
+
+
+// pretty-expanded FIXME #23616
+
+enum t {
+    foo(Vec<t>)
+}
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-1866.rs b/src/test/ui/issues/issue-1866.rs
new file mode 100644 (file)
index 0000000..eb670b4
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+// pretty-expanded FIXME #23616
+
+mod a {
+    pub type rust_task = usize;
+    pub mod rustrt {
+        use super::rust_task;
+        extern {
+            pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
+        }
+    }
+}
+
+mod b {
+    pub type rust_task = bool;
+    pub mod rustrt {
+        use super::rust_task;
+        extern {
+            pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
+        }
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-18988.rs b/src/test/ui/issues/issue-18988.rs
new file mode 100644 (file)
index 0000000..6aadef6
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2015 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.
+
+// compile-pass
+#![allow(dead_code)]
+pub trait Foo : Send { }
+
+pub struct MyFoo {
+    children: Vec<Box<Foo>>,
+}
+
+impl Foo for MyFoo { }
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-22777.rs b/src/test/ui/issues/issue-22777.rs
new file mode 100644 (file)
index 0000000..c97c100
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright 2015 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.
+
+// compile-pass
+// This test is reduced from libsyntax.  It is just checking that we
+// can successfully deal with a "deep" structure, which the drop-check
+// was hitting a recursion limit on at one point.
+
+// pretty-expanded FIXME #23616
+
+#![allow(non_camel_case_types)]
+
+pub fn noop_fold_impl_item() -> SmallVector<ImplItem> {
+    loop  { }
+}
+
+pub struct SmallVector<T>(P<T>);
+pub struct ImplItem(P<S01_Method>);
+
+struct P<T>(Box<T>);
+
+struct S01_Method(P<S02_Generics>);
+struct S02_Generics(P<S03_TyParam>);
+struct S03_TyParam(P<S04_TyParamBound>);
+struct S04_TyParamBound(S05_PolyTraitRef);
+struct S05_PolyTraitRef(S06_TraitRef);
+struct S06_TraitRef(S07_Path);
+struct S07_Path(Vec<S08_PathSegment>);
+struct S08_PathSegment(S09_GenericArgs);
+struct S09_GenericArgs(P<S10_ParenthesizedParameterData>);
+struct S10_ParenthesizedParameterData(Option<P<S11_Ty>>);
+struct S11_Ty(P<S12_Expr>);
+struct S12_Expr(P<S13_Block>);
+struct S13_Block(Vec<P<S14_Stmt>>);
+struct S14_Stmt(P<S15_Decl>);
+struct S15_Decl(P<S16_Local>);
+struct S16_Local(P<S17_Pat>);
+struct S17_Pat(P<S18_Mac>);
+struct S18_Mac(Vec<P<S19_TokenTree>>);
+struct S19_TokenTree(P<S20_Token>);
+struct S20_Token(P<S21_Nonterminal>);
+struct S21_Nonterminal(P<S22_Item>);
+struct S22_Item(P<S23_EnumDef>);
+struct S23_EnumDef(Vec<P<S24_Variant>>);
+struct S24_Variant(P<S25_VariantKind>);
+struct S25_VariantKind(P<S26_StructDef>);
+struct S26_StructDef(Vec<P<S27_StructField>>);
+struct S27_StructField(P<S28_StructFieldKind>);
+struct S28_StructFieldKind;
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-2311-2.rs b/src/test/ui/issues/issue-2311-2.rs
new file mode 100644 (file)
index 0000000..cc6376e
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+
+trait clam<A> {
+    fn get(self) -> A;
+}
+
+struct foo<A> {
+    x: A,
+}
+
+impl<A> foo<A> {
+   pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
+     panic!();
+   }
+}
+
+fn foo<A>(b: A) -> foo<A> {
+    foo {
+        x: b
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-2311.rs b/src/test/ui/issues/issue-2311.rs
new file mode 100644 (file)
index 0000000..77e014e
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(non_camel_case_types)]
+
+// pretty-expanded FIXME #23616
+
+trait clam<A> { fn get(self) -> A; }
+trait foo<A> {
+   fn bar<B,C:clam<A>>(&self, c: C) -> B;
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-2312.rs b/src/test/ui/issues/issue-2312.rs
new file mode 100644 (file)
index 0000000..0de460a
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+// Testing that the B's are resolved
+
+
+trait clam<A> { fn get(self) -> A; }
+
+struct foo(isize);
+
+impl foo {
+    pub fn bar<B,C:clam<B>>(&self, _c: C) -> B { panic!(); }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-24161.rs b/src/test/ui/issues/issue-24161.rs
new file mode 100644 (file)
index 0000000..fb50f4d
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2015 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.
+
+// compile-pass
+#![allow(dead_code)]
+#[derive(Copy,Clone)]
+struct Functions {
+    a: fn(u32) -> u32,
+    b: extern "C" fn(u32) -> u32,
+    c: unsafe fn(u32) -> u32,
+    d: unsafe extern "C" fn(u32) -> u32
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-2487-a.rs b/src/test/ui/issues/issue-2487-a.rs
new file mode 100644 (file)
index 0000000..bff4eb9
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+// pretty-expanded FIXME #23616
+
+struct socket {
+    sock: isize,
+
+}
+
+impl Drop for socket {
+    fn drop(&mut self) {}
+}
+
+impl socket {
+    pub fn set_identity(&self)  {
+        closure(|| setsockopt_bytes(self.sock.clone()))
+    }
+}
+
+fn socket() -> socket {
+    socket {
+        sock: 1
+    }
+}
+
+fn closure<F>(f: F) where F: FnOnce() { f() }
+
+fn setsockopt_bytes(_sock: isize) { }
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-2502.rs b/src/test/ui/issues/issue-2502.rs
new file mode 100644 (file)
index 0000000..24ba19c
--- /dev/null
@@ -0,0 +1,34 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+
+
+// pretty-expanded FIXME #23616
+
+struct font<'a> {
+    fontbuf: &'a Vec<u8> ,
+}
+
+impl<'a> font<'a> {
+    pub fn buf(&self) -> &'a Vec<u8> {
+        self.fontbuf
+    }
+}
+
+fn font(fontbuf: &Vec<u8> ) -> font {
+    font {
+        fontbuf: fontbuf
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-2611-3.rs b/src/test/ui/issues/issue-2611-3.rs
new file mode 100644 (file)
index 0000000..29a8200
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+// Tests that impls are allowed to have looser, more permissive bounds
+// than the traits require.
+
+
+trait A {
+  fn b<C:Sync,D>(&self, x: C) -> C;
+}
+
+struct E {
+ f: isize
+}
+
+impl A for E {
+  fn b<F,G>(&self, _x: F) -> F { panic!() }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-2748-a.rs b/src/test/ui/issues/issue-2748-a.rs
new file mode 100644 (file)
index 0000000..8c8d3c5
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_snake_case)]
+
+// pretty-expanded FIXME #23616
+
+struct CMap<'a> {
+    buf: &'a [u8],
+}
+
+fn CMap(buf: &[u8]) -> CMap {
+    CMap {
+        buf: buf
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-2804-2.rs b/src/test/ui/issues/issue-2804-2.rs
new file mode 100644 (file)
index 0000000..1894d50
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012-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.
+
+// compile-pass
+#![allow(dead_code)]
+// Minimized version of issue-2804.rs. Both check that callee IDs don't
+// clobber the previous node ID in a macro expr
+
+use std::collections::HashMap;
+
+fn add_interfaces(managed_ip: String, device: HashMap<String, isize>)  {
+     println!("{}, {}", managed_ip, device["interfaces"]);
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-2904.rs b/src/test/ui/issues/issue-2904.rs
new file mode 100644 (file)
index 0000000..2e91979
--- /dev/null
@@ -0,0 +1,89 @@
+// Copyright 2012-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.
+
+// compile-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(non_camel_case_types)]
+
+// Map representation
+
+use std::fmt;
+use std::io::prelude::*;
+use square::{bot, wall, rock, lambda, closed_lift, open_lift, earth, empty};
+
+enum square {
+    bot,
+    wall,
+    rock,
+    lambda,
+    closed_lift,
+    open_lift,
+    earth,
+    empty
+}
+
+impl fmt::Debug for square {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        write!(f, "{}", match *self {
+          bot => { "R".to_string() }
+          wall => { "#".to_string() }
+          rock => { "*".to_string() }
+          lambda => { "\\".to_string() }
+          closed_lift => { "L".to_string() }
+          open_lift => { "O".to_string() }
+          earth => { ".".to_string() }
+          empty => { " ".to_string() }
+        })
+    }
+}
+
+fn square_from_char(c: char) -> square {
+    match c  {
+      'R'  => { bot }
+      '#'  => { wall }
+      '*'  => { rock }
+      '\\' => { lambda }
+      'L'  => { closed_lift }
+      'O'  => { open_lift }
+      '.'  => { earth }
+      ' '  => { empty }
+      _ => {
+        println!("invalid square: {}", c);
+        panic!()
+      }
+    }
+}
+
+fn read_board_grid<rdr:'static + Read>(mut input: rdr)
+                   -> Vec<Vec<square>> {
+    let mut input: &mut Read = &mut input;
+    let mut grid = Vec::new();
+    let mut line = [0; 10];
+    input.read(&mut line);
+    let mut row = Vec::new();
+    for c in &line {
+        row.push(square_from_char(*c as char))
+    }
+    grid.push(row);
+    let width = grid[0].len();
+    for row in &grid { assert_eq!(row.len(), width) }
+    grid
+}
+
+mod test {
+    #[test]
+    pub fn trivial_to_string() {
+        assert_eq!(lambda.to_string(), "\\")
+    }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3149.rs b/src/test/ui/issues/issue-3149.rs
new file mode 100644 (file)
index 0000000..507af2f
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_snake_case)]
+// pretty-expanded FIXME #23616
+
+fn Matrix4<T>(m11: T, m12: T, m13: T, m14: T,
+              m21: T, m22: T, m23: T, m24: T,
+              m31: T, m32: T, m33: T, m34: T,
+              m41: T, m42: T, m43: T, m44: T)
+              -> Matrix4<T> {
+    Matrix4 {
+        m11: m11, m12: m12, m13: m13, m14: m14,
+        m21: m21, m22: m22, m23: m23, m24: m24,
+        m31: m31, m32: m32, m33: m33, m34: m34,
+        m41: m41, m42: m42, m43: m43, m44: m44
+    }
+}
+
+struct Matrix4<T> {
+    m11: T, m12: T, m13: T, m14: T,
+    m21: T, m22: T, m23: T, m24: T,
+    m31: T, m32: T, m33: T, m34: T,
+    m41: T, m42: T, m43: T, m44: T,
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3424.rs b/src/test/ui/issues/issue-3424.rs
new file mode 100644 (file)
index 0000000..7bf0c43
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2012-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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+// rustc --test ignores2.rs && ./ignores2
+
+pub struct Path;
+
+type rsrc_loader = Box<FnMut(&Path) -> Result<String, String>>;
+
+fn tester()
+{
+    let mut loader: rsrc_loader = Box::new(move |_path| {
+        Ok("more blah".to_string())
+    });
+
+    let path = Path;
+    assert!(loader(&path).is_ok());
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3563-2.rs b/src/test/ui/issues/issue-3563-2.rs
new file mode 100644 (file)
index 0000000..916adc8
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2012 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.
+
+// compile-pass
+// pretty-expanded FIXME #23616
+
+trait Canvas {
+    fn add_point(&self, point: &isize);
+    fn add_points(&self, shapes: &[isize]) {
+        for pt in shapes {
+            self.add_point(pt)
+        }
+    }
+
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3609.rs b/src/test/ui/issues/issue-3609.rs
new file mode 100644 (file)
index 0000000..070b2e5
--- /dev/null
@@ -0,0 +1,40 @@
+// 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.
+
+// compile-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
+use std::thread;
+use std::sync::mpsc::Sender;
+
+type RingBuffer = Vec<f64> ;
+type SamplesFn = Box<FnMut(&RingBuffer) + Send>;
+
+enum Msg
+{
+    GetSamples(String, SamplesFn), // sample set name, callback which receives samples
+}
+
+fn foo(name: String, samples_chan: Sender<Msg>) {
+    thread::spawn(move|| {
+        let mut samples_chan = samples_chan;
+
+        let callback: SamplesFn = Box::new(move |buffer| {
+            for i in 0..buffer.len() {
+                println!("{}: {}", i, buffer[i])
+            }
+        });
+
+        samples_chan.send(Msg::GetSamples(name.clone(), callback));
+    }).join();
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-37733.rs b/src/test/ui/issues/issue-37733.rs
new file mode 100644 (file)
index 0000000..04a4c19
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2016 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.
+
+// compile-pass
+#![allow(dead_code)]
+type A = for<> fn();
+
+type B = for<'a,> fn();
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3874.rs b/src/test/ui/issues/issue-3874.rs
new file mode 100644 (file)
index 0000000..791a4bb
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+enum PureCounter { PureCounterVariant(usize) }
+
+fn each<F>(thing: PureCounter, blk: F) where F: FnOnce(&usize) {
+    let PureCounter::PureCounterVariant(ref x) = thing;
+    blk(x);
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3888-2.rs b/src/test/ui/issues/issue-3888-2.rs
new file mode 100644 (file)
index 0000000..79b2067
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] {
+    &v[1..5]
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3979-2.rs b/src/test/ui/issues/issue-3979-2.rs
new file mode 100644 (file)
index 0000000..adfd587
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2012 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.
+
+// compile-pass
+// pretty-expanded FIXME #23616
+
+trait A {
+    fn a_method(&self);
+}
+
+trait B: A {
+    fn b_method(&self);
+}
+
+trait C: B {
+    fn c_method(&self) {
+        self.a_method();
+    }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-3991.rs b/src/test/ui/issues/issue-3991.rs
new file mode 100644 (file)
index 0000000..90fa1f8
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+
+// pretty-expanded FIXME #23616
+
+struct HasNested {
+    nest: Vec<Vec<isize> > ,
+}
+
+impl HasNested {
+    fn method_push_local(&mut self) {
+        self.nest[0].push(0);
+    }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-4025.rs b/src/test/ui/issues/issue-4025.rs
new file mode 100644 (file)
index 0000000..470dd1e
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
+/*
+# if b { x } else { y } requires identical types for x and y
+*/
+
+fn print1(b: bool, s1: &str, s2: &str) {
+    println!("{}", if b { s1 } else { s2 });
+}
+fn print2<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) {
+    println!("{}", if b { s1 } else { s2 });
+}
+fn print3(b: bool, s1: &str, s2: &str) {
+    let mut s: &str;
+    if b { s = s1; } else { s = s2; }
+    println!("{}", s);
+}
+fn print4<'a, 'b>(b: bool, s1: &'a str, s2: &'b str) {
+    let mut s: &str;
+    if b { s = s1; } else { s = s2; }
+    println!("{}", s);
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-4464.rs b/src/test/ui/issues/issue-4464.rs
new file mode 100644 (file)
index 0000000..a1b2040
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+fn broken(v: &[u8], i: usize, j: usize) -> &[u8] { &v[i..j] }
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-4830.rs b/src/test/ui/issues/issue-4830.rs
new file mode 100644 (file)
index 0000000..274305d
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+
+// pretty-expanded FIXME #23616
+
+pub struct Scheduler {
+    /// The event loop used to drive the scheduler and perform I/O
+    event_loop: Box<isize>
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-5353.rs b/src/test/ui/issues/issue-5353.rs
new file mode 100644 (file)
index 0000000..0c5de87
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+const INVALID_ENUM : u32 = 0;
+const INVALID_VALUE : u32 = 1;
+
+fn gl_err_str(err: u32) -> String
+{
+  match err
+  {
+    INVALID_ENUM => { "Invalid enum".to_string() },
+    INVALID_VALUE => { "Invalid value".to_string() },
+    _ => { "Unknown error".to_string() }
+  }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-5572.rs b/src/test/ui/issues/issue-5572.rs
new file mode 100644 (file)
index 0000000..9046566
--- /dev/null
@@ -0,0 +1,17 @@
+// 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+fn foo<T: ::std::cmp::PartialEq>(_t: T) { }
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-5754.rs b/src/test/ui/issues/issue-5754.rs
new file mode 100644 (file)
index 0000000..d60edca
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(improper_ctypes)]
+
+// pretty-expanded FIXME #23616
+
+struct TwoDoubles {
+    r: f64,
+    i: f64
+}
+
+extern "C" {
+    fn rust_dbg_extern_identity_TwoDoubles(arg1: TwoDoubles) -> TwoDoubles;
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-5884.rs b/src/test/ui/issues/issue-5884.rs
new file mode 100644 (file)
index 0000000..d0c898e
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+#![feature(box_syntax)]
+
+pub struct Foo {
+    a: isize,
+}
+
+struct Bar<'a> {
+    a: Box<Option<isize>>,
+    b: &'a Foo,
+}
+
+fn check(a: Box<Foo>) {
+    let _ic = Bar{ b: &*a, a: box None };
+}
+
+pub fn main(){}
diff --git a/src/test/ui/issues/issue-5900.rs b/src/test/ui/issues/issue-5900.rs
new file mode 100644 (file)
index 0000000..4dc5a61
--- /dev/null
@@ -0,0 +1,25 @@
+// 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+pub mod foo {
+    use super::Bar;
+
+    pub struct FooStruct { bar : Bar }
+}
+
+pub enum Bar {
+    Bar0 = 0 as isize
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-5950.rs b/src/test/ui/issues/issue-5950.rs
new file mode 100644 (file)
index 0000000..6cdd36e
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2013-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.
+
+// compile-pass
+
+// pretty-expanded FIXME #23616
+
+pub use local as local_alias;
+
+pub mod local { }
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-6341.rs b/src/test/ui/issues/issue-6341.rs
new file mode 100644 (file)
index 0000000..758e335
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2013 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.
+
+// compile-pass
+// pretty-expanded FIXME #23616
+
+#[derive(PartialEq)]
+struct A { x: usize }
+
+impl Drop for A {
+    fn drop(&mut self) {}
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-6470.rs b/src/test/ui/issues/issue-6470.rs
new file mode 100644 (file)
index 0000000..00eb3b6
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(improper_ctypes)]
+
+// pretty-expanded FIXME #23616
+#![allow(non_snake_case)]
+
+pub mod Bar {
+    pub struct Foo {
+        v: isize,
+    }
+
+    extern {
+        pub fn foo(v: *const Foo) -> Foo;
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-6557.rs b/src/test/ui/issues/issue-6557.rs
new file mode 100644 (file)
index 0000000..ddec8b3
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+#![feature(box_patterns)]
+#![feature(box_syntax)]
+
+fn foo(box (_x, _y): Box<(isize, isize)>) {}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-6898.rs b/src/test/ui/issues/issue-6898.rs
new file mode 100644 (file)
index 0000000..20174f2
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright 2013 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.
+
+// compile-pass
+// pretty-expanded FIXME #23616
+
+use std::mem;
+
+/// Returns the size of a type
+pub fn size_of<T>() -> usize {
+    TypeInfo::size_of(None::<T>)
+}
+
+/// Returns the size of the type that `val` points to
+pub fn size_of_val<T>(val: &T) -> usize {
+    val.size_of_val()
+}
+
+pub trait TypeInfo: Sized {
+    fn size_of(_lame_type_hint: Option<Self>) -> usize;
+    fn size_of_val(&self) -> usize;
+}
+
+impl<T> TypeInfo for T {
+    /// The size of the type in bytes.
+    fn size_of(_lame_type_hint: Option<T>) -> usize {
+        mem::size_of::<T>()
+    }
+
+    /// Returns the size of the type of `self` in bytes.
+    fn size_of_val(&self) -> usize {
+        TypeInfo::size_of(None::<T>)
+    }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-7607-2.rs b/src/test/ui/issues/issue-7607-2.rs
new file mode 100644 (file)
index 0000000..9c05717
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2012 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+pub mod a {
+    pub struct Foo { a: usize }
+}
+
+pub mod b {
+    use a::Foo;
+    impl Foo {
+        fn bar(&self) { }
+    }
+}
+
+pub fn main() { }
diff --git a/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs b/src/test/ui/issues/issue-7673-cast-generically-implemented-trait.rs
new file mode 100644 (file)
index 0000000..d3af62e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+/*
+
+#7673 Polymorphically creating traits barely works
+
+*/
+
+#![feature(box_syntax)]
+
+pub fn main() {}
+
+trait A {
+    fn dummy(&self) { }
+}
+
+impl<T: 'static> A for T {}
+
+fn owned2<T: 'static>(a: Box<T>) { a as Box<A>; }
+fn owned3<T: 'static>(a: Box<T>) { box a as Box<A>; }
diff --git a/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs b/src/test/ui/issues/issue-8171-default-method-self-inherit-builtin-trait.rs
new file mode 100644 (file)
index 0000000..27859e1
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+/*
+
+#8171 Self is not recognised as implementing kinds in default method implementations
+
+*/
+
+fn require_send<T: Send>(_: T){}
+
+trait TragicallySelfIsNotSend: Send + Sized {
+    fn x(self) {
+        require_send(self);
+    }
+}
+
+pub fn main(){}
diff --git a/src/test/ui/issues/issue-8398.rs b/src/test/ui/issues/issue-8398.rs
new file mode 100644 (file)
index 0000000..36c24be
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+pub trait Writer {
+    fn write(&mut self, b: &[u8]) -> Result<(), ()>;
+}
+
+fn foo(a: &mut Writer) {
+    a.write(&[]).unwrap();
+}
+
+pub fn main(){}
diff --git a/src/test/ui/issues/issue-8578.rs b/src/test/ui/issues/issue-8578.rs
new file mode 100644 (file)
index 0000000..0c5cbf2
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+#![allow(non_camel_case_types)]
+#![allow(non_upper_case_globals)]
+// pretty-expanded FIXME #23616
+
+pub struct UninterpretedOption_NamePart {
+    name_part: Option<String>,
+}
+
+impl<'a> UninterpretedOption_NamePart {
+    pub fn default_instance() -> &'static UninterpretedOption_NamePart {
+        static instance: UninterpretedOption_NamePart = UninterpretedOption_NamePart {
+            name_part: None,
+        };
+        &instance
+    }
+}
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-9110.rs b/src/test/ui/issues/issue-9110.rs
new file mode 100644 (file)
index 0000000..8631465
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2013 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+#![allow(non_snake_case)]
+
+macro_rules! silly_macro {
+    () => (
+        pub mod Qux {
+            pub struct Foo { x : u8 }
+            pub fn bar(_foo : Foo) {}
+        }
+    );
+}
+
+silly_macro!();
+
+pub fn main() {}
diff --git a/src/test/ui/issues/issue-9719.rs b/src/test/ui/issues/issue-9719.rs
new file mode 100644 (file)
index 0000000..c3845dd
--- /dev/null
@@ -0,0 +1,51 @@
+// 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.
+
+// compile-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+mod a {
+    pub enum Enum<T> {
+        A(T),
+    }
+
+    pub trait X {
+        fn dummy(&self) { }
+    }
+    impl X for isize {}
+
+    pub struct Z<'a>(Enum<&'a (X+'a)>);
+    fn foo() { let x: isize = 42; let z = Z(Enum::A(&x as &X)); let _ = z; }
+}
+
+mod b {
+    trait X {
+        fn dummy(&self) { }
+    }
+    impl X for isize {}
+    struct Y<'a>{
+        x:Option<&'a (X+'a)>,
+    }
+
+    fn bar() {
+        let x: isize = 42;
+        let _y = Y { x: Some(&x as &X) };
+    }
+}
+
+mod c {
+    pub trait X { fn f(&self); }
+    impl X for isize { fn f(&self) {} }
+    pub struct Z<'a>(Option<&'a (X+'a)>);
+    fn main() { let x: isize = 42; let z = Z(Some(&x as &X)); let _ = z; }
+}
+
+pub fn main() {}