2017-01-15 19:50:27 -06:00
|
|
|
// rustfmt-normalize_comments: true
|
2015-06-23 08:58:58 -05:00
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
fn simple(
|
|
|
|
// pre-comment on a function!?
|
2017-07-05 11:03:20 -05:00
|
|
|
i: i32, // yes, it's possible!
|
2017-06-11 23:01:41 -05:00
|
|
|
response: NoWay, // hose
|
|
|
|
) {
|
|
|
|
fn op(
|
|
|
|
x: Typ,
|
|
|
|
key: &[u8],
|
2017-06-12 21:49:47 -05:00
|
|
|
upd: Box<
|
|
|
|
Fn(Option<&memcache::Item>)
|
2017-06-17 12:04:03 -05:00
|
|
|
-> (memcache::Status, Result<memcache::Item, Option<String>>),
|
2017-06-12 21:49:47 -05:00
|
|
|
>,
|
2017-06-11 23:01:41 -05:00
|
|
|
) -> MapResult {
|
2015-11-22 07:48:30 -06:00
|
|
|
}
|
|
|
|
|
2015-06-23 08:58:58 -05:00
|
|
|
"cool"
|
|
|
|
}
|
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
fn weird_comment(
|
|
|
|
// /*/ double level */ comment
|
2017-11-01 01:33:55 -05:00
|
|
|
x: Hello, // /*/* triple, even */*/
|
2017-06-11 23:01:41 -05:00
|
|
|
// Does this work?
|
|
|
|
y: World,
|
|
|
|
) {
|
2017-08-27 00:41:30 -05:00
|
|
|
simple(/* does this preserve comments now? */ 42, NoWay)
|
2015-06-23 08:58:58 -05:00
|
|
|
}
|
2015-08-14 07:09:19 -05:00
|
|
|
|
|
|
|
fn generic<T>(arg: T) -> &SomeType
|
2017-06-11 23:01:41 -05:00
|
|
|
where
|
2017-06-17 12:04:03 -05:00
|
|
|
T: Fn(
|
|
|
|
// First arg
|
|
|
|
A,
|
|
|
|
// Second argument
|
|
|
|
B,
|
|
|
|
C,
|
|
|
|
D,
|
|
|
|
// pre comment
|
2017-07-13 06:32:46 -05:00
|
|
|
E, // last comment
|
2017-06-17 12:04:03 -05:00
|
|
|
) -> &SomeType,
|
2015-08-14 07:09:19 -05:00
|
|
|
{
|
|
|
|
arg(a, b, c, d, e)
|
|
|
|
}
|
2015-09-04 06:51:00 -05:00
|
|
|
|
2015-11-19 20:11:32 -06:00
|
|
|
fn foo() -> ! {}
|
2015-09-17 14:35:03 -05:00
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
pub fn http_fetch_async(
|
|
|
|
listener: Box<AsyncCORSResponseListener + Send>,
|
|
|
|
script_chan: Box<ScriptChan + Send>,
|
|
|
|
) {
|
2015-09-11 05:24:13 -05:00
|
|
|
}
|
|
|
|
|
2015-11-19 20:11:32 -06:00
|
|
|
fn some_func<T: Box<Trait + Bound>>(val: T) {}
|
2015-10-18 15:21:46 -05:00
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
fn zzzzzzzzzzzzzzzzzzzz<Type, NodeType>(
|
|
|
|
selff: Type,
|
|
|
|
mut handle: node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>,
|
|
|
|
) -> SearchStack<'a, K, V, Type, NodeType> {
|
2015-10-18 15:21:46 -05:00
|
|
|
}
|
2015-11-22 09:07:38 -06:00
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
unsafe fn generic_call(
|
|
|
|
cx: *mut JSContext,
|
|
|
|
argc: libc::c_uint,
|
|
|
|
vp: *mut JSVal,
|
|
|
|
is_lenient: bool,
|
2017-06-17 12:04:03 -05:00
|
|
|
call: unsafe extern "C" fn(
|
|
|
|
*const JSJitInfo,
|
|
|
|
*mut JSContext,
|
|
|
|
HandleObject,
|
|
|
|
*mut libc::c_void,
|
|
|
|
u32,
|
|
|
|
*mut JSVal,
|
|
|
|
) -> u8,
|
2017-06-11 23:01:41 -05:00
|
|
|
) {
|
2015-11-22 09:07:38 -06:00
|
|
|
let f: fn(_, _) -> _ = panic!();
|
|
|
|
}
|
2015-12-01 15:09:37 -06:00
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
pub fn start_export_thread<C: CryptoSchemee + 'static>(
|
|
|
|
database: &Database,
|
|
|
|
crypto_scheme: &C,
|
|
|
|
block_size: usize,
|
|
|
|
source_path: &Path,
|
|
|
|
) -> BonzoResult<mpsc::Consumer<'static, FileInstruction>> {
|
2015-12-01 15:09:37 -06:00
|
|
|
}
|
2017-04-06 04:17:22 -05:00
|
|
|
|
|
|
|
pub fn waltz(cwd: &Path) -> CliAssert {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
formatted_comment =
|
|
|
|
rewrite_comment(comment, block_style, width, offset, formatting_fig);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-28 06:15:33 -05:00
|
|
|
|
|
|
|
// #2003
|
|
|
|
mod foo {
|
|
|
|
fn __bindgen_test_layout_i_open0_c_open1_char_a_open2_char_close2_close1_close0_instantiation()
|
|
|
|
{
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
}
|
2017-10-24 10:51:04 -05:00
|
|
|
|
|
|
|
// #2082
|
|
|
|
pub(crate) fn init() {}
|
2017-10-28 00:41:58 -05:00
|
|
|
|
|
|
|
crate fn init() {}
|
2018-06-13 06:39:47 -05:00
|
|
|
|
|
|
|
// #2630
|
2018-07-25 04:27:02 -05:00
|
|
|
fn make_map<T, F: (Fn(&T) -> String)>(records: &Vec<T>, key_fn: F) -> HashMap<String, usize> {}
|
2018-08-30 09:38:40 -05:00
|
|
|
|
|
|
|
// #2956
|
|
|
|
fn bar(
|
|
|
|
beans: Asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf,
|
|
|
|
spam: bool,
|
|
|
|
eggs: bool,
|
|
|
|
) -> bool {
|
|
|
|
unimplemented!();
|
|
|
|
}
|