summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/html/highlight/fixtures/sample.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/html/highlight/fixtures/sample.rs')
-rw-r--r--src/librustdoc/html/highlight/fixtures/sample.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/librustdoc/html/highlight/fixtures/sample.rs b/src/librustdoc/html/highlight/fixtures/sample.rs
new file mode 100644
index 000000000..fbfdc6767
--- /dev/null
+++ b/src/librustdoc/html/highlight/fixtures/sample.rs
@@ -0,0 +1,26 @@
+#![crate_type = "lib"]
+
+use std::path::{Path, PathBuf};
+
+#[cfg(target_os = "linux")]
+fn main() -> () {
+ let foo = true && false || true;
+ let _: *const () = 0;
+ let _ = &foo;
+ let _ = &&foo;
+ let _ = *foo;
+ mac!(foo, &mut bar);
+ assert!(self.length < N && index <= self.length);
+ ::std::env::var("gateau").is_ok();
+ #[rustfmt::skip]
+ let s:std::path::PathBuf = std::path::PathBuf::new();
+ let mut s = String::new();
+
+ match &s {
+ ref mut x => {}
+ }
+}
+
+macro_rules! bar {
+ ($foo:tt) => {};
+}