tests: add cases for type alias issues

This commit is contained in:
Caleb Cartwright 2021-11-18 12:38:34 -06:00 committed by Caleb Cartwright
parent eee8f0419d
commit 0023abfb2c
6 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,5 @@
macro_rules! m {
() => {
type Type;
};
}

View 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;}

View File

@ -0,0 +1,2 @@
#[cfg(any())]
type Type : Bound ;

View File

@ -0,0 +1,5 @@
macro_rules! m {
() => {
type Type;
};
}

View 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;
}

View File

@ -0,0 +1,2 @@
#[cfg(any())]
type Type: Bound;