diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-31 12:20:46 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-02-02 13:40:18 -0500 |
| commit | d5d7e6565a4034b93d19be1edafd20730a4276bc (patch) | |
| tree | f978751c20a214c9fe0cd2d60645a4e1a3b760fd /src/librustc_driver/lib.rs | |
| parent | 9f90d666e0cd9a73ef35b76b6605f9d1f69df849 (diff) | |
| download | rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.tar.gz rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.zip | |
`for x in xs.iter()` -> `for x in &xs`
Diffstat (limited to 'src/librustc_driver/lib.rs')
| -rw-r--r-- | src/librustc_driver/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 2eada1ff174..a8f5cfa6b3f 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -435,7 +435,7 @@ Available lint options: fn describe_debug_flags() { println!("\nAvailable debug options:\n"); - for &(name, _, opt_type_desc, desc) in config::DB_OPTIONS.iter() { + for &(name, _, opt_type_desc, desc) in config::DB_OPTIONS { let (width, extra) = match opt_type_desc { Some(..) => (21, "=val"), None => (25, "") @@ -447,7 +447,7 @@ fn describe_debug_flags() { fn describe_codegen_flags() { println!("\nAvailable codegen options:\n"); - for &(name, _, opt_type_desc, desc) in config::CG_OPTIONS.iter() { + for &(name, _, opt_type_desc, desc) in config::CG_OPTIONS { let (width, extra) = match opt_type_desc { Some(..) => (21, "=val"), None => (25, "") @@ -542,7 +542,7 @@ fn print_crate_info(sess: &Session, if sess.opts.prints.len() == 0 { return false } let attrs = input.map(|input| parse_crate_attrs(sess, input)); - for req in sess.opts.prints.iter() { + for req in &sess.opts.prints { match *req { PrintRequest::Sysroot => println!("{}", sess.sysroot().display()), PrintRequest::FileNames | @@ -566,7 +566,7 @@ fn print_crate_info(sess: &Session, let crate_types = driver::collect_crate_types(sess, attrs); let metadata = driver::collect_crate_metadata(sess, attrs); *sess.crate_metadata.borrow_mut() = metadata; - for &style in crate_types.iter() { + for &style in &crate_types { let fname = link::filename_for_input(sess, style, id.as_slice(), &t_outputs.with_extension("")); @@ -645,7 +645,7 @@ pub fn monitor<F:FnOnce()+Send>(f: F) { BUG_REPORT_URL), "run with `RUST_BACKTRACE=1` for a backtrace".to_string(), ]; - for note in xs.iter() { + for note in &xs { emitter.emit(None, ¬e[], None, diagnostic::Note) } |
