diff --git a/docs/clap/index.html b/docs/clap/index.html index 2d400d06..c0cc4785 100644 --- a/docs/clap/index.html +++ b/docs/clap/index.html @@ -43,7 +43,7 @@

Crate clap[stability] [-] [+] - [src]

+ [src]

A simply library for parsing command line arguments when writing command line and console applications.

@@ -57,7 +57,6 @@

Example:

- extern crate clap;
  use clap::{Arg, App};
 
  // ...
diff --git a/docs/clap/struct.App.html b/docs/clap/struct.App.html
index 2b92e576..caac9af3 100644
--- a/docs/clap/struct.App.html
+++ b/docs/clap/struct.App.html
@@ -43,7 +43,7 @@
     

Struct clap::App [-] [+] - [src]

+ [src]
pub struct App {
     pub name: &'static str,
     pub author: Option<&'static str>,
@@ -63,7 +63,8 @@
                       .version("1.0.2")
                    .about("Explains in brief what the program does")
                    .arg(
-                        // Add a possible command line argument
+                            Arg::new("in_file").index(1)
+                        // Add other possible command line argument options here...
                     )
                    .get_matches();
 
@@ -80,37 +81,38 @@ to the user when they print version or help and usage information.

Example:

-let prog = App::new("myprog");
+let prog = App::new("myprog")
 

fn author(&mut self, a: &'static str) -> &mut App

Sets a string of author(s)

Example:

-.author("Kevin <kbknapp@gmail.com>");
+.author("Kevin <kbknapp@gmail.com>")
 

fn about(&mut self, a: &'static str) -> &mut App

Sets a string briefly describing what the program does

Example:

-.about("Does really amazing things to great people");
+.about("Does really amazing things to great people")
 

fn version(&mut self, v: &'static str) -> &mut App

Sets a string of the version number

Example:

-.version("v0.1.24");
+.version("v0.1.24")
 

fn arg(&mut self, a: &Arg) -> &mut App

Adds an argument to the list of valid possibilties

Example:

-.arg(Arg::new("config")
-    // Additional argument configuration goes here...
-);
+ .arg(Arg::new("config")
+                .short("c")
+            // Additional argument configuration goes here...
+ )
 

fn args(&mut self, args: Vec<&Arg>) -> &mut App

Adds arguments to the list of valid possibilties

@@ -118,7 +120,7 @@ to the user when they print version or help and usage information.

Example:

  .args( vec![Arg::new("config").short("c"),
-                Arg::new("debug").short("d")]);
+                Arg::new("debug").short("d")])
 

fn get_matches(&mut self) -> ArgMatches

diff --git a/docs/clap/struct.Arg.html b/docs/clap/struct.Arg.html index 63696a7a..440a8919 100644 --- a/docs/clap/struct.Arg.html +++ b/docs/clap/struct.Arg.html @@ -43,7 +43,7 @@

Struct clap::Arg [-] [+] - [src]

+ [src]
pub struct Arg {
     pub name: &'static str,
     pub short: Option<char>,
diff --git a/docs/clap/struct.ArgMatches.html b/docs/clap/struct.ArgMatches.html
index 30edc292..226dbdae 100644
--- a/docs/clap/struct.ArgMatches.html
+++ b/docs/clap/struct.ArgMatches.html
@@ -43,7 +43,7 @@
     

Struct clap::ArgMatches [-] [+] - [src]

+ [src]
pub struct ArgMatches {
     pub required: Vec<&'static str>,
     pub blacklist: HashSet<&'static str>,
diff --git a/docs/src/clap/app.rs.html b/docs/src/clap/app.rs.html
index f6dd4db6..47da4fd6 100644
--- a/docs/src/clap/app.rs.html
+++ b/docs/src/clap/app.rs.html
@@ -737,6 +737,26 @@
 695
 696
 697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
 
 extern crate libc;
 
@@ -760,13 +780,15 @@
 ///
 /// Example:
 ///
-/// ```rust.example
+/// ```no_run
+/// # use clap::{App, Arg};
 /// let myprog = App::new("myprog")
 ///                   .author("Me, me@mail.com")
 ///	                  .version("1.0.2")
 ///                   .about("Explains in brief what the program does")
 ///                   .arg(
-///                        // Add a possible command line argument
+///							Arg::new("in_file").index(1)
+///                        // Add other possible command line argument options here...
 ///                    )
 ///                   .get_matches();
 ///
@@ -802,8 +824,10 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// let prog = App::new("myprog");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// let prog = App::new("myprog")
+	/// # .get_matches();
 	/// ```
 	pub fn new(n: &'static str) -> App {
 		App {
@@ -831,8 +855,11 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// .author("Kevin <kbknapp@gmail.com>");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
+	/// .author("Kevin <kbknapp@gmail.com>")
+	/// # .get_matches();
 	/// ```
 	pub fn author(&mut self, a: &'static str) -> &mut App {
 		self.author = Some(a);
@@ -843,8 +870,11 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// .about("Does really amazing things to great people");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
+	/// .about("Does really amazing things to great people")
+	/// # .get_matches();
 	/// ```
 	pub fn about(&mut self, a: &'static str) -> &mut App {
 		self.about = Some(a);
@@ -855,8 +885,11 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// .version("v0.1.24");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
+	/// .version("v0.1.24")
+	/// # .get_matches();
 	/// ```
 	pub fn version(&mut self, v: &'static str)-> &mut App  {
 		self.version = Some(v);
@@ -867,10 +900,14 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
 	/// .arg(Arg::new("config")
-	///     // Additional argument configuration goes here...
-	/// );
+	///				.short("c")
+	///     		// Additional argument configuration goes here...
+	/// )
+	/// # .get_matches();
 	/// ```
 	pub fn arg(&mut self, a: &Arg) -> &mut App {
 		if self.arg_list.contains(a.name) {
@@ -968,9 +1005,12 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
 	/// .args( vec![Arg::new("config").short("c"),
-	///				Arg::new("debug").short("d")]);
+	///				Arg::new("debug").short("d")])
+	/// # .get_matches();
 	/// ```
 	pub fn args(&mut self, args: Vec<&Arg>) -> &mut App {
 		for arg in args.iter() {
diff --git a/docs/src/clap/arg.rs.html b/docs/src/clap/arg.rs.html
index 58f6b7d4..fbf0aa86 100644
--- a/docs/src/clap/arg.rs.html
+++ b/docs/src/clap/arg.rs.html
@@ -364,6 +364,20 @@
 322
 323
 324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
 
 /// The abstract representation of a command line argument used by the consumer of the library.
 /// 
@@ -375,7 +389,8 @@
 ///
 /// Example:
 ///
-/// ```rust.example
+/// ```no_run
+/// # use clap::{App, Arg};
 /// # let matches = App::new("myprog")
 /// #                 .arg(
 /// Arg::new("conifg")
@@ -429,10 +444,12 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// Arg::new("conifg")
+	/// # .short("c")
 	/// # ).get_matches();
 	pub fn new(n: &'static str) -> Arg {
 		Arg {
@@ -461,7 +478,8 @@
 	/// mistakenly sets the short to `-o` or the like.
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -485,7 +503,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -501,7 +520,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -523,7 +543,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -543,7 +564,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .mutually_excludes("debug")
 	/// # ).get_matches();
@@ -565,7 +587,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .mutually_excludes_all(
 	///		vec!["debug", "input"])
@@ -588,7 +611,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .requires("debug")
 	/// # ).get_matches();
@@ -609,7 +633,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .requires_all(
 	///		vec!["debug", "input"])
@@ -632,7 +657,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -653,7 +679,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -676,7 +703,8 @@
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("debug")
diff --git a/docs/src/clap/argmatches.rs.html b/docs/src/clap/argmatches.rs.html
index ec09cb4c..1dd973de 100644
--- a/docs/src/clap/argmatches.rs.html
+++ b/docs/src/clap/argmatches.rs.html
@@ -190,6 +190,14 @@
 148
 149
 150
+151
+152
+153
+154
+155
+156
+157
+158
 
 use std::collections::HashMap;
 use std::collections::HashSet;
@@ -204,7 +212,8 @@
 /// Fields of `ArgMatches` aren't designed to be used directly, only 
 /// the methods in order to query information.
 ///
-/// ```rust.example
+/// ```no_run
+/// # use clap::{App, Arg};
 ///  let matches = App::new("MyApp")
 /// // adding of arguments and configuration goes here...
 /// #                    .arg(Arg::new("config")
@@ -213,7 +222,7 @@
 /// #                               .takes_value(true))
 /// #                    .arg(Arg::new("debug")
 /// #                                   .short("d")
-/// #                                   .multiple(true)
+/// #                                   .multiple(true))
 ///                     .get_matches();
 ///    // if you had an argument named "output" that takes a value 
 ///    if let Some(o) = matches.value_of("output") {
@@ -256,7 +265,8 @@
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
     /// let matches = App::new("myprog").get_matches();
     /// ```
 	pub fn new(app: &App) -> ArgMatches {
@@ -279,7 +289,9 @@
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
+    /// # let matches = App::new("myapp").arg(Arg::new("output").takes_value(true)).get_matches();
     /// if let Some(o) = matches.value_of("output") {
     ///        println!("Value for output: {}", o);
     /// }
@@ -304,7 +316,9 @@
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
+    /// # let matches = App::new("myapp").arg(Arg::new("output").takes_value(true)).get_matches();
     /// if matches.is_present("output") {
     ///        println!("The output argument was used!");
     /// }
@@ -327,7 +341,9 @@
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
+    /// # let matches = App::new("myapp").arg(Arg::new("output").takes_value(true)).get_matches();
     /// if matches.occurrences_of("debug") > 1 {
     ///     println!("Debug mode is REALLY on");
     /// } else {
diff --git a/docs/src/clap/lib.rs.html b/docs/src/clap/lib.rs.html
index c34bcf7e..4f9df101 100644
--- a/docs/src/clap/lib.rs.html
+++ b/docs/src/clap/lib.rs.html
@@ -130,11 +130,10 @@
 88
 89
 90
-91
 
 #![crate_type= "lib"]
 
-#![feature(collections, core, libc, env)]
+#![feature(collections, core, libc)]
 
 //! A simply library for parsing command line arguments when writing 
 //! command line and console applications.
@@ -150,8 +149,7 @@
 //!
 //! Example:
 //! 
-//! ```rust.example
-//! extern crate clap;
+//! ```no_run
 //! use clap::{Arg, App};
 //!
 //! // ...
diff --git a/src/app.rs b/src/app.rs
index 09708bd1..31085652 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -20,13 +20,15 @@ use args::PosArg;
 ///
 /// Example:
 ///
-/// ```rust.example
+/// ```no_run
+/// # use clap::{App, Arg};
 /// let myprog = App::new("myprog")
 ///                   .author("Me, me@mail.com")
 ///	                  .version("1.0.2")
 ///                   .about("Explains in brief what the program does")
 ///                   .arg(
-///                        // Add a possible command line argument
+///							Arg::new("in_file").index(1)
+///                        // Add other possible command line argument options here...
 ///                    )
 ///                   .get_matches();
 ///
@@ -62,8 +64,10 @@ impl App {
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// let prog = App::new("myprog");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// let prog = App::new("myprog")
+	/// # .get_matches();
 	/// ```
 	pub fn new(n: &'static str) -> App {
 		App {
@@ -91,8 +95,11 @@ impl App {
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// .author("Kevin ");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
+	/// .author("Kevin ")
+	/// # .get_matches();
 	/// ```
 	pub fn author(&mut self, a: &'static str) -> &mut App {
 		self.author = Some(a);
@@ -103,8 +110,11 @@ impl App {
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// .about("Does really amazing things to great people");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
+	/// .about("Does really amazing things to great people")
+	/// # .get_matches();
 	/// ```
 	pub fn about(&mut self, a: &'static str) -> &mut App {
 		self.about = Some(a);
@@ -115,8 +125,11 @@ impl App {
 	///
 	/// Example:
 	///
-	/// ```rust.example
-	/// .version("v0.1.24");
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
+	/// .version("v0.1.24")
+	/// # .get_matches();
 	/// ```
 	pub fn version(&mut self, v: &'static str)-> &mut App  {
 		self.version = Some(v);
@@ -127,10 +140,14 @@ impl App {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
 	/// .arg(Arg::new("config")
-	///     // Additional argument configuration goes here...
-	/// );
+	///				.short("c")
+	///     		// Additional argument configuration goes here...
+	/// )
+	/// # .get_matches();
 	/// ```
 	pub fn arg(&mut self, a: &Arg) -> &mut App {
 		if self.arg_list.contains(a.name) {
@@ -228,9 +245,12 @@ impl App {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
+	/// # let app = App::new("myprog")
 	/// .args( vec![Arg::new("config").short("c"),
-	///				Arg::new("debug").short("d")]);
+	///				Arg::new("debug").short("d")])
+	/// # .get_matches();
 	/// ```
 	pub fn args(&mut self, args: Vec<&Arg>) -> &mut App {
 		for arg in args.iter() {
diff --git a/src/arg.rs b/src/arg.rs
index 2e9cbfeb..97d7bcb8 100644
--- a/src/arg.rs
+++ b/src/arg.rs
@@ -8,7 +8,8 @@
 ///
 /// Example:
 ///
-/// ```rust.example
+/// ```no_run
+/// # use clap::{App, Arg};
 /// # let matches = App::new("myprog")
 /// #                 .arg(
 /// Arg::new("conifg")
@@ -62,10 +63,12 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// Arg::new("conifg")
+	/// # .short("c")
 	/// # ).get_matches();
 	pub fn new(n: &'static str) -> Arg {
 		Arg {
@@ -94,7 +97,8 @@ impl Arg {
 	/// mistakenly sets the short to `-o` or the like.
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -118,7 +122,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -134,7 +139,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -156,7 +162,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -176,7 +183,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .mutually_excludes("debug")
 	/// # ).get_matches();
@@ -198,7 +206,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .mutually_excludes_all(
 	///		vec!["debug", "input"])
@@ -221,7 +230,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .requires("debug")
 	/// # ).get_matches();
@@ -242,7 +252,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let myprog = App::new("myprog").arg(Arg::new("conifg")
 	/// .requires_all(
 	///		vec!["debug", "input"])
@@ -265,7 +276,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -286,7 +298,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("conifg")
@@ -309,7 +322,8 @@ impl Arg {
 	///
 	/// Example:
 	///
-	/// ```rust.example
+	/// ```no_run
+	/// # use clap::{App, Arg};
 	/// # let matches = App::new("myprog")
 	/// #                 .arg(
 	/// # Arg::new("debug")
diff --git a/src/argmatches.rs b/src/argmatches.rs
index 87b9be5b..7232f6ca 100644
--- a/src/argmatches.rs
+++ b/src/argmatches.rs
@@ -11,7 +11,8 @@ use args::{ FlagArg, OptArg, PosArg };
 /// Fields of `ArgMatches` aren't designed to be used directly, only 
 /// the methods in order to query information.
 ///
-/// ```rust.example
+/// ```no_run
+/// # use clap::{App, Arg};
 ///  let matches = App::new("MyApp")
 /// // adding of arguments and configuration goes here...
 /// #                    .arg(Arg::new("config")
@@ -20,7 +21,7 @@ use args::{ FlagArg, OptArg, PosArg };
 /// #                               .takes_value(true))
 /// #                    .arg(Arg::new("debug")
 /// #                                   .short("d")
-/// #                                   .multiple(true)
+/// #                                   .multiple(true))
 ///                     .get_matches();
 ///    // if you had an argument named "output" that takes a value 
 ///    if let Some(o) = matches.value_of("output") {
@@ -63,7 +64,8 @@ impl ArgMatches {
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
     /// let matches = App::new("myprog").get_matches();
     /// ```
 	pub fn new(app: &App) -> ArgMatches {
@@ -86,7 +88,9 @@ impl ArgMatches {
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
+    /// # let matches = App::new("myapp").arg(Arg::new("output").takes_value(true)).get_matches();
     /// if let Some(o) = matches.value_of("output") {
     ///        println!("Value for output: {}", o);
     /// }
@@ -111,7 +115,9 @@ impl ArgMatches {
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
+    /// # let matches = App::new("myapp").arg(Arg::new("output").takes_value(true)).get_matches();
     /// if matches.is_present("output") {
     ///        println!("The output argument was used!");
     /// }
@@ -134,7 +140,9 @@ impl ArgMatches {
     ///
     /// Example:
     ///
-    /// ```rust.example
+    /// ```no_run
+    /// # use clap::{App, Arg};
+    /// # let matches = App::new("myapp").arg(Arg::new("output").takes_value(true)).get_matches();
     /// if matches.occurrences_of("debug") > 1 {
     ///     println!("Debug mode is REALLY on");
     /// } else {
diff --git a/src/lib.rs b/src/lib.rs
index c6091ad9..2a67c69f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,6 @@
 #![crate_type= "lib"]
 
-#![feature(collections, core, libc, env)]
+#![feature(collections, core, libc)]
 
 //! A simply library for parsing command line arguments when writing 
 //! command line and console applications.
@@ -16,8 +16,7 @@
 //!
 //! Example:
 //! 
-//! ```rust.example
-//! extern crate clap;
+//! ```no_run
 //! use clap::{Arg, App};
 //!
 //! // ...