Fix rustfmt test
This commit is contained in:
parent
076916fe94
commit
20ddab3def
@ -140,29 +140,23 @@ fn foo(a: SomeLongComplexType, b: SomeOtherLongComplexType) -> Box<Future<Item =
|
|||||||
|
|
||||||
type MyFn = fn(a: SomeLongComplexType, b: SomeOtherLongComplexType,) -> Box<Future<Item = AnotherLongType, Error = ALongErrorType>>;
|
type MyFn = fn(a: SomeLongComplexType, b: SomeOtherLongComplexType,) -> Box<Future<Item = AnotherLongType, Error = ALongErrorType>>;
|
||||||
|
|
||||||
// Const opt-out
|
// Const bound
|
||||||
|
|
||||||
trait T: ? const Super {}
|
trait T: ~ const Super {}
|
||||||
|
|
||||||
const fn maybe_const<S: ? const T>() -> i32 { <S as T>::CONST }
|
const fn not_quite_const<S: ~ const T>() -> i32 { <S as T>::CONST }
|
||||||
|
|
||||||
struct S<T:? const ? Sized>(std::marker::PhantomData<T>);
|
struct S<T:~ const ? Sized>(std::marker::PhantomData<T>);
|
||||||
|
|
||||||
impl ? const T {}
|
impl ~ const T {}
|
||||||
|
|
||||||
fn trait_object() -> &'static dyn ? const T { &S }
|
fn apit(_: impl ~ const T) {}
|
||||||
|
|
||||||
fn i(_: impl IntoIterator<Item = Box<dyn ? const T>>) {}
|
fn rpit() -> impl ~ const T { S }
|
||||||
|
|
||||||
fn apit(_: impl ?const T) {}
|
|
||||||
|
|
||||||
fn rpit() -> impl ? const T { S }
|
|
||||||
|
|
||||||
pub struct Foo<T: Trait>(T);
|
pub struct Foo<T: Trait>(T);
|
||||||
impl<T: ? const Trait> Foo<T> {
|
impl<T: ~ const Trait> Foo<T> {
|
||||||
fn new(t: T) -> Self {
|
fn new(t: T) -> Self {
|
||||||
// not calling methods on `t`, so we opt out of requiring
|
|
||||||
// `<T as Trait>` to have const methods via `?const`
|
|
||||||
Self(t)
|
Self(t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,12 +157,6 @@ const fn not_quite_const<S: ~const T>() -> i32 {
|
|||||||
|
|
||||||
impl ~const T {}
|
impl ~const T {}
|
||||||
|
|
||||||
fn trait_object() -> &'static dyn ~const T {
|
|
||||||
&S
|
|
||||||
}
|
|
||||||
|
|
||||||
fn i(_: impl IntoIterator<Item = Box<dyn ~const T>>) {}
|
|
||||||
|
|
||||||
fn apit(_: impl ~const T) {}
|
fn apit(_: impl ~const T) {}
|
||||||
|
|
||||||
fn rpit() -> impl ~const T {
|
fn rpit() -> impl ~const T {
|
||||||
|
Loading…
Reference in New Issue
Block a user