summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue-4643.rs
blob: 382072d9004bfcd785836b24a6a080204edd054f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// output doesn't get corrupted when using comments within generic type parameters of a trait

pub trait Something<
    A,
    // some comment
    B,
    C
> {
    fn a(&self, x: A) -> i32;
    fn b(&self, x: B) -> i32;
    fn c(&self, x: C) -> i32;
}

pub trait SomethingElse<
    A,
    /* some comment */
    B,
    C
> {
    fn a(&self, x: A) -> i32;
    fn b(&self, x: B) -> i32;
    fn c(&self, x: C) -> i32;
}