about summary refs log tree commit diff
path: root/src/librustc_interface
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-26 15:48:58 +0000
committerbors <bors@rust-lang.org>2020-04-26 15:48:58 +0000
commit7f3b3df9e2f2efe3434b4f6fc76462d2c8ad332f (patch)
tree473644e3095ec29d92b0c68880f49599c402cbfa /src/librustc_interface
parentec1f28f9614292c36b371d3758afffdd52cb9786 (diff)
parentaa9dc6952235a58d4c37b63bed15992f5225fbf0 (diff)
Auto merge of #71579 - Dylan-DPC:rollup-h9om2g3, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #71490 (Cleanup and document `-C relocation-model`)
 - #71562 (fix more clippy warnings)
 - #71571 (Fix since attribute for nonzero_bitor impl's)
 - #71574 (proc_macro: Fix since attributes for new Span methods)
 - #71575 (Fix stable(since) attribute for BTreeMap::remove_entry)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_interface')
-rw-r--r--src/librustc_interface/tests.rs4
-rw-r--r--src/librustc_interface/util.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs
index 211850486c0..f0e7581b760 100644
--- a/src/librustc_interface/tests.rs
+++ b/src/librustc_interface/tests.rs
@@ -14,7 +14,7 @@ use rustc_session::{build_session, Session};
 use rustc_span::edition::{Edition, DEFAULT_EDITION};
 use rustc_span::symbol::sym;
 use rustc_span::SourceFileHashAlgorithm;
-use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelroLevel};
+use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelocModel, RelroLevel};
 use std::collections::{BTreeMap, BTreeSet};
 use std::iter::FromIterator;
 use std::path::PathBuf;
@@ -430,7 +430,7 @@ fn test_codegen_options_tracking_hash() {
     tracked!(prefer_dynamic, true);
     tracked!(profile_generate, SwitchWithOptPath::Enabled(None));
     tracked!(profile_use, Some(PathBuf::from("abc")));
-    tracked!(relocation_model, Some(String::from("relocation model")));
+    tracked!(relocation_model, Some(RelocModel::Pic));
     tracked!(soft_float, true);
     tracked!(target_cpu, Some(String::from("abc")));
     tracked!(target_feature, String::from("all the features, all of them"));
diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs
index fda01725443..367dc4dee7e 100644
--- a/src/librustc_interface/util.rs
+++ b/src/librustc_interface/util.rs
@@ -625,8 +625,8 @@ impl<'a, 'b> ReplaceBodyWithLoop<'a, 'b> {
                     | ast::TyKind::Rptr(_, ast::MutTy { ty: ref subty, .. })
                     | ast::TyKind::Paren(ref subty) => involves_impl_trait(subty),
                     ast::TyKind::Tup(ref tys) => any_involves_impl_trait(tys.iter()),
-                    ast::TyKind::Path(_, ref path) => path.segments.iter().any(|seg| {
-                        match seg.args.as_ref().map(|generic_arg| &**generic_arg) {
+                    ast::TyKind::Path(_, ref path) => {
+                        path.segments.iter().any(|seg| match seg.args.as_deref() {
                             None => false,
                             Some(&ast::GenericArgs::AngleBracketed(ref data)) => {
                                 data.args.iter().any(|arg| match arg {
@@ -647,8 +647,8 @@ impl<'a, 'b> ReplaceBodyWithLoop<'a, 'b> {
                                 any_involves_impl_trait(data.inputs.iter())
                                     || ReplaceBodyWithLoop::should_ignore_fn(&data.output)
                             }
-                        }
-                    }),
+                        })
+                    }
                     _ => false,
                 }
             }