Skip to content

t27o: a refusal caused by a refused self receiver names the receiver type (656 cascades cannot be followed today) #11128

Closed

Description

@gHashTag

Goal

When t27o refuses a fn because its self receiver has a type it cannot convert, the refusal line must name that type, so the sweep (and a reader) can follow the cascade to the type's own refusal. Today it prints "uses refused self" and the chain ends there.

Why

Measured 2026-10-20 over all 1,388 tracked Rust files of the five repositories plus the five big files: 563 first refusals are "uses refused self" (3.5% of 16,057), and after the root attribution of PR #11127 (issue #11122) 656 of the 696 cascades that cannot be followed are self or Self. They are methods of types the converter refuses (struct with a heap field, a refused derive, a refused impl item); the refusal line does not say which type, so a lookup by name finds nothing. These are the largest block of unexplained refusals left after the heap-type families, and the only one the sweep cannot attribute.

Boundary

  • specs/tools/t27o/rust_convert.t27
  • gen/rust/tools/t27o/rust_convert.rs
  • .trinity/seals/t27o_T27oRust.json

User Scenarios

  • Given impl Foo { fn len(&self) -> usize { .. } } where Foo has a refused field, when t27o converts the file, then the method's refusal names Foo and its reason.
  • Given a Self-returning constructor of the same type, when it is refused, then the line names the same type.
  • Given a type that converts, when its methods convert, then nothing changes.

Requirements

  • FR-001: A refusal caused by a refused receiver type MUST name that type in the // t27o: refused fn line, in the same position the token occupies for other refusals.
  • FR-002: The rule MUST live in rust_convert.t27 with a failing test first and a negative control; hand Rust MUST NOT grow (own-language net <= 0).

Success Criteria

Activity

  1. added a commit that references this issue on Oct 19, 2026
    7d20c70
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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions