Skip to content

Bindgen produces #[doc = "foo\nbar"] doc comments instead of multiline doc comments #3073

Open
@Manishearth

Description

@Manishearth

This behavior changed in f160d11

Bindgen used to produce doc comments like this:

extern "C" {
  #[doc = "foo"]
  #[doc = "bar"]
  fn baz();
}

but now these doc comments look like this:

extern "C" {
  #[doc = "foo\nbar"]
  fn baz();
}

which is much less readable. We have documentation on normalizing doc comments, but not everyone is using a nightly rustfmt. This change does not seem intentional but rather collateral damage in that feature, perhaps it's worth bringing the old behavior back.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions