2017-01-15 19:50:27 -06:00
|
|
|
// rustfmt-normalize_comments: true
|
2015-11-22 18:07:53 -06:00
|
|
|
impl Foo for Bar {
|
|
|
|
fn foo() {
|
|
|
|
"hi"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub impl Foo for Bar {
|
2016-03-14 21:05:20 -05:00
|
|
|
// Associated Constants
|
|
|
|
const Baz: i32 = 16;
|
|
|
|
// Associated Types
|
|
|
|
type FooBar = usize;
|
2015-11-22 18:07:53 -06:00
|
|
|
// Comment 1
|
|
|
|
fn foo() {
|
|
|
|
"hi"
|
|
|
|
}
|
|
|
|
// Comment 2
|
|
|
|
fn foo() {
|
|
|
|
"hi"
|
|
|
|
}
|
2015-11-23 22:54:44 -06:00
|
|
|
// Comment 3
|
2015-11-22 18:07:53 -06:00
|
|
|
}
|
|
|
|
|
2016-01-09 23:45:58 -06:00
|
|
|
pub unsafe impl<'a, 'b, X, Y: Foo<Bar>> !Foo<'a, X> for Bar<'b, Y>
|
|
|
|
where X: Foo<'a, Z>
|
2015-11-22 18:07:53 -06:00
|
|
|
{
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-09 23:45:58 -06:00
|
|
|
impl<'a, 'b, X, Y: Foo<Bar>> Foo<'a, X> for Bar<'b, Y>
|
|
|
|
where X: Foooooooooooooooooooooooooooo<'a, Z>
|
2015-11-22 18:07:53 -06:00
|
|
|
{
|
|
|
|
fn foo() {
|
|
|
|
"hi"
|
|
|
|
}
|
|
|
|
}
|
2015-11-22 20:49:21 -06:00
|
|
|
|
2016-01-09 23:45:58 -06:00
|
|
|
impl<T> Foo for Bar<T> where T: Baz {}
|
|
|
|
|
|
|
|
impl<T> Foo for Bar<T>
|
|
|
|
where T: Baz
|
|
|
|
{
|
|
|
|
// Comment
|
|
|
|
}
|
|
|
|
|
2015-11-22 20:49:21 -06:00
|
|
|
impl Foo {
|
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
|
2015-11-23 22:54:44 -06:00
|
|
|
impl Boo {
|
|
|
|
// BOO
|
|
|
|
fn boo() {}
|
|
|
|
// FOO
|
|
|
|
}
|
|
|
|
|
2015-11-22 20:49:21 -06:00
|
|
|
mod a {
|
|
|
|
impl Foo {
|
|
|
|
// Hello!
|
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mod b {
|
|
|
|
mod a {
|
|
|
|
impl Foo {
|
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-11-24 14:37:31 -06:00
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
add_fun!();
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Blah {
|
|
|
|
fn boop() {}
|
|
|
|
add_fun!();
|
|
|
|
}
|
2015-12-25 12:07:51 -06:00
|
|
|
|
|
|
|
impl X {
|
|
|
|
fn do_parse(mut self: X) {}
|
|
|
|
}
|
2015-12-27 07:25:37 -06:00
|
|
|
|
|
|
|
impl Y5000 {
|
|
|
|
fn bar(self: X<'a, 'b>, y: Y) {}
|
2016-03-27 06:07:28 -05:00
|
|
|
|
|
|
|
fn bad(&self, (x, y): CoorT) {}
|
|
|
|
|
|
|
|
fn turbo_bad(self: X<'a, 'b>, (x, y): CoorT) {}
|
2015-12-27 07:25:37 -06:00
|
|
|
}
|
2016-01-09 23:45:58 -06:00
|
|
|
|
|
|
|
pub impl<T> Foo for Bar<T>
|
|
|
|
where T: Foo
|
|
|
|
{
|
|
|
|
fn foo() {
|
|
|
|
"hi"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub impl<T, Z> Foo for Bar<T, Z>
|
|
|
|
where T: Foo,
|
|
|
|
Z: Baz
|
|
|
|
{
|
|
|
|
}
|
2016-04-14 13:42:38 -05:00
|
|
|
|
|
|
|
mod m {
|
|
|
|
impl<T> PartialEq for S<T>
|
|
|
|
where T: PartialEq
|
|
|
|
{
|
|
|
|
fn eq(&self, other: &Self) {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> PartialEq for S<T> where T: PartialEq {}
|
|
|
|
}
|
2016-07-26 00:34:11 -05:00
|
|
|
|
|
|
|
impl<BorrowType, K, V, NodeType, HandleType> Handle<NodeRef<BorrowType, K, V, NodeType>,
|
|
|
|
HandleType> {
|
|
|
|
}
|
2016-09-06 00:11:56 -05:00
|
|
|
|
|
|
|
impl<BorrowType, K, V, NodeType, HandleType> PartialEq
|
|
|
|
for Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType> {
|
|
|
|
}
|
2017-01-03 14:20:02 -06:00
|
|
|
|
|
|
|
mod x {
|
|
|
|
impl<A, B, C, D> Foo
|
|
|
|
where A: 'static,
|
|
|
|
B: 'static,
|
|
|
|
C: 'static,
|
|
|
|
D: 'static
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
2017-01-16 18:08:36 -06:00
|
|
|
|
|
|
|
impl<ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNodeFoo>
|
|
|
|
Issue1249<ConcreteThreadSafeLayoutNode> {
|
|
|
|
// Creates a new flow constructor.
|
|
|
|
fn foo() {}
|
|
|
|
}
|