Skip to content

Commit 0023abf

Browse files
tests: add cases for type alias issues
1 parent eee8f04 commit 0023abf

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

tests/source/issue_4823.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
macro_rules! m {
2+
() => {
3+
type Type;
4+
};
5+
}

tests/source/issue_5027.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// rustfmt-version: Two
2+
3+
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;
4+
5+
trait FOo {pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;}
6+
7+
impl Bar {pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;}

tests/source/issue_5086.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#[cfg(any())]
2+
type Type : Bound ;

tests/target/issue_4823.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
macro_rules! m {
2+
() => {
3+
type Type;
4+
};
5+
}

tests/target/issue_5027.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// rustfmt-version: Two
2+
3+
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>
4+
+ ExactSizeIterator
5+
+ 'a;
6+
7+
trait FOo {
8+
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>
9+
+ ExactSizeIterator
10+
+ 'a;
11+
}
12+
13+
impl Bar {
14+
type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>
15+
+ ExactSizeIterator
16+
+ 'a;
17+
}

tests/target/issue_5086.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#[cfg(any())]
2+
type Type: Bound;

0 commit comments

Comments
 (0)