==================
Simple impl block
==================

impl Foo {
    fn bar() {
        42
    }
}

---

(source_file
  (impl_item
    name: (type_identifier)
    body: (declaration_list
      (function_item
        name: (identifier)
        parameters: (parameters)
        body: (block
          (integer_literal))))))

==================
Impl block with multiple methods
==================

impl Point {
    fn x() {
        self.x
    }

    fn y() {
        self.y
    }
}

---

(source_file
  (impl_item
    name: (type_identifier)
    body: (declaration_list
      (function_item
        name: (identifier)
        parameters: (parameters)
        body: (block
          (field_expression
            value: (self)
            field: (field_identifier))))
      (function_item
        name: (identifier)
        parameters: (parameters)
        body: (block
          (field_expression
            value: (self)
            field: (field_identifier)))))))

==================
Impl with scoped path
==================

impl http::Client {
    fn get(url) {
        url
    }
}

---

(source_file
  (impl_item
    name: (scoped_identifier
      path: (identifier)
      name: (identifier))
    body: (declaration_list
      (function_item
        name: (identifier)
        parameters: (parameters
          (identifier))
        body: (block
          (identifier))))))

==================
Pub impl block
==================

pub impl Widget {
    fn render() {
        true
    }
}

---

(source_file
  (impl_item
    (visibility_modifier)
    name: (type_identifier)
    body: (declaration_list
      (function_item
        name: (identifier)
        parameters: (parameters)
        body: (block
          (boolean_literal))))))

==================
Impl with async method
==================

impl Service {
    async fn call(req) {
        req
    }
}

---

(source_file
  (impl_item
    name: (type_identifier)
    body: (declaration_list
      (function_item
        name: (identifier)
        parameters: (parameters
          (identifier))
        body: (block
          (identifier))))))

==================
Impl without name
==================

impl {
    fn anonymous() {
        true
    }
}

---

(source_file
  (impl_item
    body: (declaration_list
      (function_item
        name: (identifier)
        parameters: (parameters)
        body: (block
          (boolean_literal))))))
