mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 05:26:47 +00:00
Update tests
This commit is contained in:
parent
f135641cc8
commit
e94fcfcd39
104
tests/source/big-impl.rs
Normal file
104
tests/source/big-impl.rs
Normal file
@ -0,0 +1,104 @@
|
||||
// #1357
|
||||
impl<
|
||||
'a,
|
||||
Select,
|
||||
From,
|
||||
Distinct,
|
||||
Where,
|
||||
Order,
|
||||
Limit,
|
||||
Offset,
|
||||
Groupby,
|
||||
DB,
|
||||
> InternalBoxedDsl<'a, DB>
|
||||
for SelectStatement<
|
||||
Select,
|
||||
From,
|
||||
Distinct,
|
||||
Where,
|
||||
Order,
|
||||
Limit,
|
||||
Offset,
|
||||
GroupBy,
|
||||
> where
|
||||
DB: Backend,
|
||||
Select: QueryFragment<DB> + SelectableExpression<From> + 'a,
|
||||
Distinct: QueryFragment<DB> + 'a,
|
||||
Where: Into<Option<Box<QueryFragment<DB> + 'a>>>,
|
||||
Order: QueryFragment<DB> + 'a,
|
||||
Limit: QueryFragment<DB> + 'a,
|
||||
Offset: QueryFragment<DB> + 'a,
|
||||
{
|
||||
type Output = BoxedSelectStatement<'a, Select::SqlTypeForSelect, From, DB>;
|
||||
|
||||
fn internal_into_boxed(self) -> Self::Output {
|
||||
BoxedSelectStatement::new(
|
||||
Box::new(self.select),
|
||||
self.from,
|
||||
Box::new(self.distinct),
|
||||
self.where_clause.into(),
|
||||
Box::new(self.order),
|
||||
Box::new(self.limit),
|
||||
Box::new(self.offset),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// #1369
|
||||
impl<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> Foo for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl Foo<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> Foo<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> Foo for Bar<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> {
|
||||
fn foo() {}
|
||||
}
|
||||
impl Foo<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> for Bar<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> Foo<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName>
|
||||
for Bar<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> {
|
||||
fn foo() {}
|
||||
}
|
@ -122,3 +122,20 @@ impl<ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNodeFoo> Issue1249<ConcreteTh
|
||||
impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable<K, V> {
|
||||
fn drop() {}
|
||||
}
|
||||
|
||||
// #1168
|
||||
pub trait Number: Copy + Eq + Not<Output = Self> + Shl<u8, Output = Self> +
|
||||
Shr<u8, Output = Self> +
|
||||
BitAnd<Self, Output=Self> + BitOr<Self, Output=Self> + BitAndAssign + BitOrAssign
|
||||
|
||||
|
||||
|
||||
{
|
||||
// test
|
||||
fn zero() -> Self;
|
||||
}
|
||||
|
||||
// #1642
|
||||
pub trait SomeTrait : Clone + Eq + PartialEq + Ord + PartialOrd + Default + Hash + Debug + Display + Write + Read + FromStr {
|
||||
// comment
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
// #1357
|
||||
impl<'a, Select, From, Distinct, Where, Order, Limit, Offset, Groupby, DB> InternalBoxedDsl<'a, DB>
|
||||
for SelectStatement<Select, From, Distinct, Where, Order, Limit, Offset, GroupBy>
|
||||
for SelectStatement<Select, From, Distinct, Where, Order, Limit, Offset, GroupBy>
|
||||
where
|
||||
DB: Backend,
|
||||
Select: QueryFragment<DB> + SelectableExpression<From> + 'a,
|
||||
@ -32,11 +32,11 @@ where
|
||||
|
||||
// #1369
|
||||
impl<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> Foo
|
||||
for Bar {
|
||||
for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl Foo<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName>
|
||||
for Bar {
|
||||
for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<
|
||||
@ -44,15 +44,23 @@ impl<
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> Foo<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName>
|
||||
for Bar {
|
||||
for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> Foo
|
||||
for Bar<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> {
|
||||
for Bar<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> {
|
||||
fn foo() {}
|
||||
}
|
||||
impl Foo<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName>
|
||||
for Bar<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> {
|
||||
for Bar<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<
|
||||
@ -60,6 +68,10 @@ impl<
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> Foo<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName>
|
||||
for Bar<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> {
|
||||
for Bar<
|
||||
ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName,
|
||||
> {
|
||||
fn foo() {}
|
||||
}
|
||||
|
62
tests/target/big-impl.rs
Normal file
62
tests/target/big-impl.rs
Normal file
@ -0,0 +1,62 @@
|
||||
// #1357
|
||||
impl<'a, Select, From, Distinct, Where, Order, Limit, Offset, Groupby, DB> InternalBoxedDsl<'a, DB>
|
||||
for SelectStatement<Select, From, Distinct, Where, Order, Limit, Offset, GroupBy>
|
||||
where DB: Backend,
|
||||
Select: QueryFragment<DB> + SelectableExpression<From> + 'a,
|
||||
Distinct: QueryFragment<DB> + 'a,
|
||||
Where: Into<Option<Box<QueryFragment<DB> + 'a>>>,
|
||||
Order: QueryFragment<DB> + 'a,
|
||||
Limit: QueryFragment<DB> + 'a,
|
||||
Offset: QueryFragment<DB> + 'a
|
||||
{
|
||||
type Output = BoxedSelectStatement<'a, Select::SqlTypeForSelect, From, DB>;
|
||||
|
||||
fn internal_into_boxed(self) -> Self::Output {
|
||||
BoxedSelectStatement::new(Box::new(self.select),
|
||||
self.from,
|
||||
Box::new(self.distinct),
|
||||
self.where_clause.into(),
|
||||
Box::new(self.order),
|
||||
Box::new(self.limit),
|
||||
Box::new(self.offset))
|
||||
}
|
||||
}
|
||||
|
||||
// #1369
|
||||
impl<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> Foo
|
||||
for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl Foo<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName>
|
||||
for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> Foo<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> for Bar {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName> Foo
|
||||
for Bar<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> {
|
||||
fn foo() {}
|
||||
}
|
||||
impl Foo<ExcessivelyLongGenericName, ExcessivelyLongGenericName, AnotherExcessivelyLongGenericName>
|
||||
for Bar<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> {
|
||||
fn foo() {}
|
||||
}
|
||||
impl<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> Foo<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName>
|
||||
for Bar<ExcessivelyLongGenericName,
|
||||
ExcessivelyLongGenericName,
|
||||
AnotherExcessivelyLongGenericName> {
|
||||
fn foo() {}
|
||||
}
|
@ -126,8 +126,8 @@ mod m {
|
||||
impl<T> PartialEq for S<T> where T: PartialEq {}
|
||||
}
|
||||
|
||||
impl<BorrowType, K, V, NodeType, HandleType> Handle<NodeRef<BorrowType, K, V, NodeType>,
|
||||
HandleType> {
|
||||
impl<BorrowType, K, V, NodeType, HandleType>
|
||||
Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType> {
|
||||
}
|
||||
|
||||
impl<BorrowType, K, V, NodeType, HandleType> PartialEq
|
||||
@ -154,3 +154,35 @@ impl<ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNodeFoo>
|
||||
impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable<K, V> {
|
||||
fn drop() {}
|
||||
}
|
||||
|
||||
// #1168
|
||||
pub trait Number
|
||||
: Copy
|
||||
+ Eq
|
||||
+ Not<Output = Self>
|
||||
+ Shl<u8, Output = Self>
|
||||
+ Shr<u8, Output = Self>
|
||||
+ BitAnd<Self, Output = Self>
|
||||
+ BitOr<Self, Output = Self>
|
||||
+ BitAndAssign
|
||||
+ BitOrAssign {
|
||||
// test
|
||||
fn zero() -> Self;
|
||||
}
|
||||
|
||||
// #1642
|
||||
pub trait SomeTrait
|
||||
: Clone
|
||||
+ Eq
|
||||
+ PartialEq
|
||||
+ Ord
|
||||
+ PartialOrd
|
||||
+ Default
|
||||
+ Hash
|
||||
+ Debug
|
||||
+ Display
|
||||
+ Write
|
||||
+ Read
|
||||
+ FromStr {
|
||||
// comment
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user