Skip to content

Unused functions in objects can affect whether self calls compile #324

Closed

Description

@lkuper

https://gist.github.com/654a2ffb1b6a0a50ffb0

Should compile and run as expected -- but commenting out the (unused!) 'wrapper' fn produces:

rust: ../rust/src/test/run-pass/obj-self-4.rs:11:19:11:26: error: mismatched types: expected fn(int) -> but found fn() -> int (incorrect number of function parameters)

11:19:11:26 is the call to 'inc_by' inside 'inc_by_5'.

Activity

  1. graydon commented on May 26, 2011

    @graydon
    Contributor

    Is this still occurring?

  2. lkuper commented on May 27, 2011

    @lkuper
    ContributorAuthor

    Just committed a test case showing that this has been fixed sometime in the last several weeks. (Wish I'd been keeping track of what fixed it, though.) Closing this issue.

  3. added a commit that references this issue on Sep 19, 2017
  4. added a commit that references this issue on Nov 29, 2018
  5. added a commit that references this issue on Oct 26, 2020
  6. added a commit that references this issue on Oct 9, 2023
  7. added 3 commits that reference this issue on Aug 21, 2026
    000aaca
    b65ba8f
    6bd92e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions