Skip to content

Adding Deref impl affects lifetime bounds of other methods #27697

Closed

Description

@frewsxcv

From https://users.rust-lang.org/t/does-implementing-deref-affect-the-lifetime-bounds-of-all-other-methods/


Code: http://is.gd/AkyE699 http://is.gd/AkyE69

If the Deref is removed, the code compiles. Presumably, the inclusion of the Deref implementation on the trait object causes the lifetime bounds to change on the do_something method.

Activity

  1. Stebalien commented on Aug 12, 2015

    @Stebalien
    Contributor
  2. bluss commented on Aug 12, 2015

    @bluss
    Contributor

    For debugging, notice that impl Deref for MyTrait is equivalent to impl Deref for MyTrait + 'static.

  3. steveklabnik commented on Feb 7, 2017

    @steveklabnik
    Contributor

    Triage: still reproduces today.

  4. frewsxcv commented on Jun 4, 2018

    @frewsxcv
    ContributorAuthor

    Triage: still reproduces today.

  5. pnkfelix commented on Feb 27, 2019

    @pnkfelix
    Contributor

    This no longer reproduces. Tagging as E-needstest

  6. added
    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 27, 2019
  7. added 3 commits that reference this issue on Jun 21, 2019
    46948c6
    daf231b
    595f55c
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

    A-lifetimesArea: Lifetimes / regionsA-type-systemArea: Type systemC-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions