home/test/highlight/rust/comment/in
2020-07-09 00:21:11 +08:00

118 lines
1.6 KiB
Plaintext

//! # Hello World
//!
//! ```shell
//! $ cargo install
//! ```
//!
//! ```
//! # use foo;
//! foo::bar("Hello world");
//! ```
//!! ```
//!! foo::bar("Hello world");
//!! ```
//// ```
//// foo::bar("Hello world");
//// ```
// ```
// foo::bar("Hello world");
// ```
// make sure the color does not break
/// ```
/// # use foo;
/// foo::bar("Hello world");
/// ```
fn bar(s: &str) {
println!("{}", s);
}
/// ```shell
/// $ cargo install
/// ```
///
/// ```edition2018,no_run
/// # use foo;
/// foo::bar("Hello world");
/// ```
///
/// ```
/// # use foo;
/// foo::bar("Hello world");
/// ```
//!! ```
//!! foo::bar("Hello world");
//!! ```
//// ```
//// foo::bar("Hello world");
//// ```
// ```
// foo::bar("Hello world");
// ```
/**
* ```shell
* $ cargo install
* ```
*
* ```edition2018,no_run
* # use foo;
* foo::bar("Hello world");
* ```
*/
/**
```
# use foo;
foo::bar("Hello world");
```
*/
/***
* ```
* foo::bar("Hello world");
* ```
*/
/*
* ```
* foo::bar("Hello world");
* ```
*/
//! ```
//! // not hidden #
//! #![feature(x)]
//! # // hidden #
//! # #![feature(x)]
//! ```
/**
* ```
* // not hidden #
* #![feature(x)]
* # // hidden #
* # #![feature(x)]
* ```
*/
/// ```
/// println!("empty line");
///
/// println!("continue line");
/// ```
/**
* ```
* println!("empty line");
*
* println!("continue line");
* ```
*/