This commit is contained in:
Nick Cameron 2015-11-23 13:07:53 +13:00
parent b577f95e3c
commit e86872c95b
2 changed files with 61 additions and 0 deletions

23
tests/source/impls.rs Normal file
View File

@ -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<Bar>> !Foo<'a, X> for Bar<'b, Y> where X: Foo<'a, Z> {
fn foo() { "hi" }
}
impl<'a, 'b, X, Y: Foo<Bar>> Foo<'a, X> for Bar<'b, Y> where X: Fooooooooooooooooooooooooooooo<'a, Z>
{
fn foo() { "hi" }
}
impl<'a, 'b, X, Y: Foo<Bar>> Foo<'a, X> for Bar<'b, Y> where X: Foooooooooooooooooooooooooooo<'a, Z>
{
fn foo() { "hi" }
}

38
tests/target/impls.rs Normal file
View File

@ -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<Bar>> !Foo<'a, X> for Bar<'b, Y> where X: Foo<'a, Z>
{
fn foo() {
"hi"
}
}
impl<'a, 'b, X, Y: Foo<Bar>> Foo<'a, X> for Bar<'b, Y>
where X: Fooooooooooooooooooooooooooooo<'a, Z>
{
fn foo() {
"hi"
}
}
impl<'a, 'b, X, Y: Foo<Bar>> Foo<'a, X> for Bar<'b, Y> where X: Foooooooooooooooooooooooooooo<'a, Z>
{
fn foo() {
"hi"
}
}