about summary refs log tree commit diff
path: root/src/librustc/traits
diff options
context:
space:
mode:
authorInokentiy Babushkin <twk@twki.de>2018-04-15 15:47:56 +0200
committerInokentiy Babushkin <twk@twki.de>2018-04-26 22:17:57 +0200
commit388defad2d754cf9fc6ec69d67692f437393fd03 (patch)
treeca0ae3c0dfbabe55bc328e8e1113ff2cc9eaa77a /src/librustc/traits
parentd101753cd8a010abef238e616ac2f5bd5cbbf756 (diff)
downloadrust-388defad2d754cf9fc6ec69d67692f437393fd03.tar.gz
rust-388defad2d754cf9fc6ec69d67692f437393fd03.zip
Simplified name mapping in auto trait handling.
Diffstat (limited to 'src/librustc/traits')
-rw-r--r--src/librustc/traits/auto_trait.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/librustc/traits/auto_trait.rs b/src/librustc/traits/auto_trait.rs
index 4d52d7132df..db8f59ce954 100644
--- a/src/librustc/traits/auto_trait.rs
+++ b/src/librustc/traits/auto_trait.rs
@@ -55,7 +55,7 @@ impl<A> AutoTraitResult<A> {
 pub struct AutoTraitInfo<'cx> {
     pub full_user_env: ty::ParamEnv<'cx>,
     pub region_data: RegionConstraintData<'cx>,
-    pub names_map: FxHashMap<String, String>,
+    pub names_map: FxHashSet<String>,
     pub vid_to_region: FxHashMap<ty::RegionVid, ty::Region<'cx>>,
 }
 
@@ -206,12 +206,10 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
                 )
             });
 
-            let names_map: FxHashMap<String, String> = generics
+            let names_map: FxHashSet<String> = generics
                 .regions
                 .iter()
-                .map(|l| (l.name.to_string(), l.name.to_string()))
-                // TODO(twk): Lifetime branding and why is this map a set?!
-                //     l.clean(self.cx) was present in the original code
+                .map(|l| l.name.to_string())
                 .collect();
 
             let body_ids: FxHashSet<_> = infcx