diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-06-14 23:40:09 +0200 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-06-14 23:40:09 +0200 |
| commit | e3ca81fd5a33406078db0fc7f5f1c47ccfcd58b8 (patch) | |
| tree | ef305e0bbcf029d6a67b38be2fe77d0756ad29a1 /compiler/rustc_session | |
| parent | a216131c3566858b78f45ccc0c36b5578f5c5155 (diff) | |
| download | rust-e3ca81fd5a33406078db0fc7f5f1c47ccfcd58b8.tar.gz rust-e3ca81fd5a33406078db0fc7f5f1c47ccfcd58b8.zip | |
Use the now available implementation of `IntoIterator` for arrays
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 2b547f8be92..1ed336f6ed3 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -833,7 +833,7 @@ fn default_configuration(sess: &Session) -> CrateConfig { if sess.target.has_elf_tls { ret.insert((sym::target_thread_local, None)); } - for &(i, align) in &[ + for (i, align) in [ (8, layout.i8_align.abi), (16, layout.i16_align.abi), (32, layout.i32_align.abi), @@ -1169,7 +1169,7 @@ pub fn get_cmd_lint_options( let mut lint_opts_with_position = vec![]; let mut describe_lints = false; - for &level in &[lint::Allow, lint::Warn, lint::Deny, lint::Forbid] { + for level in [lint::Allow, lint::Warn, lint::Deny, lint::Forbid] { for (passed_arg_pos, lint_name) in matches.opt_strs_pos(level.as_str()) { let arg_pos = if let lint::Forbid = level { // HACK: forbid is always specified last, so it can't be overridden. |
