tests: add cases for type alias issues
This commit is contained in:
parent
eee8f0419d
commit
0023abfb2c
6 changed files with 38 additions and 0 deletions
5
tests/source/issue_4823.rs
Normal file
5
tests/source/issue_4823.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
macro_rules! m {
|
||||
() => {
|
||||
type Type;
|
||||
};
|
||||
}
|
||||
7
tests/source/issue_5027.rs
Normal file
7
tests/source/issue_5027.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// rustfmt-version: Two
|
||||
|
||||
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;
|
||||
|
||||
trait FOo {pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;}
|
||||
|
||||
impl Bar {pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>+ ExactSizeIterator+ 'a;}
|
||||
2
tests/source/issue_5086.rs
Normal file
2
tests/source/issue_5086.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#[cfg(any())]
|
||||
type Type : Bound ;
|
||||
5
tests/target/issue_4823.rs
Normal file
5
tests/target/issue_4823.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
macro_rules! m {
|
||||
() => {
|
||||
type Type;
|
||||
};
|
||||
}
|
||||
17
tests/target/issue_5027.rs
Normal file
17
tests/target/issue_5027.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// rustfmt-version: Two
|
||||
|
||||
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>
|
||||
+ ExactSizeIterator
|
||||
+ 'a;
|
||||
|
||||
trait FOo {
|
||||
pub type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>
|
||||
+ ExactSizeIterator
|
||||
+ 'a;
|
||||
}
|
||||
|
||||
impl Bar {
|
||||
type Iter<'a, D> = impl DoubleEndedIterator<Item = (SomethingSomethingSomethingLongType<D>)>
|
||||
+ ExactSizeIterator
|
||||
+ 'a;
|
||||
}
|
||||
2
tests/target/issue_5086.rs
Normal file
2
tests/target/issue_5086.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#[cfg(any())]
|
||||
type Type: Bound;
|
||||
Loading…
Add table
Add a link
Reference in a new issue