Skip to content

Don't autofill trait bound for associated type on impl #13819

Closed
@KSXGitHub

Description

@KSXGitHub

Steps to reproduce

  1. Write an impl of a trait that has associated type with trait bound (e.g. Deref) for a custom type.
impl std::ops::Deref for MyType {
    // <-- place the text cursor here
}
  1. Start typing "type" until the autocomplete menu with type Output = appears.
  2. Choose type Output = and press Enter.

Expected behavior

It generates type Output =.

Actual behavior

It generates type Output: ?Size =, which is an invalid syntax for an impl.


rust-analyzer version: rust-analyzer version: 0.3.1325-standalone

rustc version: rustc 1.66.0 (69f9c33d7 2022-12-12)

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions