Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A comment under struct field exceeds max width #2201

Open
topecongiro opened this issue Nov 28, 2017 · 0 comments
Open

A comment under struct field exceeds max width #2201

topecongiro opened this issue Nov 28, 2017 · 0 comments

Comments

@topecongiro
Copy link
Contributor

Input

/// Contains data for specific types of import directives.
#[derive(Clone, Debug)]
pub enum ImportDirectiveSubclass<'a> {
    SingleImport {
        target: Ident,
        source: Ident,
        result: PerNS<Cell<Result<&'a NameBinding<'a>, Determinacy>>>,
        type_ns_only: bool,
    },
    GlobImport {
        is_prelude: bool,
        max_vis: Cell<ty::Visibility>, // The visibility of the greatest reexport.
        // n.b. `max_vis` is only used in `finalize_import` to check for reexport errors.
    },
    ExternCrate(Option<Name>),
    MacroUse,
}

Output

/// Contains data for specific types of import directives.
#[derive(Clone, Debug)]
pub enum ImportDirectiveSubclass<'a> {
    SingleImport {
        target: Ident,
        source: Ident,
        result: PerNS<Cell<Result<&'a NameBinding<'a>, Determinacy>>>,
        type_ns_only: bool,
    },
    GlobImport {
        is_prelude: bool,
        max_vis: Cell<ty::Visibility>, // The visibility of the greatest reexport.
                                       // n.b. `max_vis` is only used in `finalize_import` to check for reexport errors.
    },
    ExternCrate(Option<Name>),
    MacroUse,
}

Meta

0.2.16-nightly (4e04e82 2017-11-28)

The above example is taken from https://github.com/rust-lang/rust/blob/90f5cfdfbd3c9e39f897fd2271c7b1c7fdaae58e/src/librustc_resolve/resolve_imports.rs#L37-L53.

@nrc nrc added the a-comments label Jun 24, 2018
@nrc nrc added this to the 1.0 milestone Jul 10, 2018
@nrc nrc added the p-high label Jul 10, 2018
@nrc nrc removed this from the 1.0 (preview 2) milestone Jul 10, 2018
ayazhafiz added a commit to ayazhafiz/rustfmt that referenced this issue Jun 8, 2020
Adds regression tests for the following issues which seem to be fixed on
master:

Closes rust-lang#1762
Closes rust-lang#2201
Closes rust-lang#2388
Closes rust-lang#2672
Closes rust-lang#2755
Closes rust-lang#2947
Closes rust-lang#2978
Closes rust-lang#3148
Closes rust-lang#3206

@topecongiro @calebcartwright appologies for the large number of issues
in this commit; if you prefer I can split it up into 2 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants