1 // rustfmt-normalize_comments: true
4 let y: *mut [SomeType; konst_funk()] = expr();
5 let z: (/* #digits */ usize, /* exp */ i16) = funk();
6 let z: (usize /* #digits */, i16 /* exp */) = funk();
10 f: extern "C" fn(x: u8, ... /* comment */),
11 g: extern "C" fn(x: u8, /* comment */ ...),
12 h: extern "C" fn(x: u8, ...),
16 y: String, // comment 3
23 fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
25 fn impl_trait_fn_1() -> impl Fn(i32) -> Option<u8> {}
27 fn impl_trait_fn_2<E>() -> impl Future<Item = &'a i64, Error = E> {}
30 do_parse!(name: take_while1!(is_token) >> (Header))
40 Box<FnMut(&ProjectState, serde_json::Value, bool) -> () + Sync + Send>,
42 self.query_callbacks()(&query_id)
47 pub fn do_something<'a, T: Trait1 + Trait2 + 'a>(
51 impl Future<Item = (), Error = SomeError> + 'a,
52 impl Future<Item = (), Error = SomeError> + 'a,
53 impl Future<Item = (), Error = SomeError> + 'a,
59 pub fn do_something<'a, T: Trait1 + Trait2 + 'a>(
63 impl Future<Item = (), Error = SomeError> + 'a,
64 impl Future<Item = (), Error = SomeError> + 'a,
65 impl Future<Item = (), Error = SomeError> + 'a,
70 impl Future<Item = (), Error = SomeError> + 'a,
71 impl Future<Item = (), Error = SomeError> + 'a,
72 impl Future<Item = (), Error = SomeError> + 'a,
77 impl Future<Item = (), Error = SomeError> + 'a,
78 impl Future<Item = (), Error = SomeError> + 'a,
79 impl Future<Item = (), Error = SomeError> + 'a,
92 type Target = ($foo_api) + 'static;
96 type Target = (FooAPI) + 'static;
101 T: (FnOnce() -> ()) + Clone,
102 U: (FnOnce() -> ()) + 'static,
116 let opt: &mut Option<MyLongTypeHere> =
117 unsafe { &mut *self.future.get() };
131 to_json_value(&None::<i32>).unwrap(),
132 json!({ "test": None::<i32> })
138 a: SomeLongComplexType,
139 b: SomeOtherLongComplexType,
140 ) -> Box<Future<Item = AnotherLongType, Error = ALongErrorType>> {
144 a: SomeLongComplexType,
145 b: SomeOtherLongComplexType,
146 ) -> Box<Future<Item = AnotherLongType, Error = ALongErrorType>>;
150 trait T: ~const Super {}
152 const fn not_quite_const<S: ~const T>() -> i32 {
156 struct S<T: ~const ?Sized>(std::marker::PhantomData<T>);
160 fn apit(_: impl ~const T) {}
162 fn rpit() -> impl ~const T {
166 pub struct Foo<T: Trait>(T);
167 impl<T: ~const Trait> Foo<T> {
168 fn new(t: T) -> Self {