From e86872c95ba21ed16b791a95e30cffb52b82e0ba Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 23 Nov 2015 13:07:53 +1300 Subject: [PATCH] tests --- tests/source/impls.rs | 23 +++++++++++++++++++++++ tests/target/impls.rs | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 tests/source/impls.rs create mode 100644 tests/target/impls.rs diff --git a/tests/source/impls.rs b/tests/source/impls.rs new file mode 100644 index 00000000000..8e7b561ae4a --- /dev/null +++ b/tests/source/impls.rs @@ -0,0 +1,23 @@ +impl Foo for Bar { fn foo() { "hi" } } + +pub impl Foo for Bar { + // Comment 1 + fn foo() { "hi" } + // Comment 2 + fn foo() { "hi" } + // Comment 3 +} + +pub unsafe impl<'a, 'b, X, Y: Foo> !Foo<'a, X> for Bar<'b, Y> where X: Foo<'a, Z> { + fn foo() { "hi" } +} + +impl<'a, 'b, X, Y: Foo> Foo<'a, X> for Bar<'b, Y> where X: Fooooooooooooooooooooooooooooo<'a, Z> +{ + fn foo() { "hi" } +} + +impl<'a, 'b, X, Y: Foo> Foo<'a, X> for Bar<'b, Y> where X: Foooooooooooooooooooooooooooo<'a, Z> +{ + fn foo() { "hi" } +} diff --git a/tests/target/impls.rs b/tests/target/impls.rs new file mode 100644 index 00000000000..7530bf16ede --- /dev/null +++ b/tests/target/impls.rs @@ -0,0 +1,38 @@ +impl Foo for Bar { + fn foo() { + "hi" + } +} + +pub impl Foo for Bar { + // Comment 1 + fn foo() { + "hi" + } + // Comment 2 + fn foo() { + "hi" + } +} + +pub unsafe impl<'a, 'b, X, Y: Foo> !Foo<'a, X> for Bar<'b, Y> where X: Foo<'a, Z> +{ + fn foo() { + "hi" + } +} + +impl<'a, 'b, X, Y: Foo> Foo<'a, X> for Bar<'b, Y> + where X: Fooooooooooooooooooooooooooooo<'a, Z> +{ + fn foo() { + "hi" + } +} + +impl<'a, 'b, X, Y: Foo> Foo<'a, X> for Bar<'b, Y> where X: Foooooooooooooooooooooooooooo<'a, Z> +{ + fn foo() { + "hi" + } +}