]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/infer/outlives/free_region_map.rs
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / librustc / infer / outlives / free_region_map.rs
index 6163ec1642001f603e4a7e53690596652a53a77f..588a00eb503613af0709ba9036371e428c5bd30e 100644 (file)
@@ -11,7 +11,7 @@
 use ty::{self, Lift, TyCtxt, Region};
 use rustc_data_structures::transitive_relation::TransitiveRelation;
 
-#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Default)]
 pub struct FreeRegionMap<'tcx> {
     // Stores the relation `a < b`, where `a` and `b` are regions.
     //
@@ -21,10 +21,6 @@ pub struct FreeRegionMap<'tcx> {
 }
 
 impl<'tcx> FreeRegionMap<'tcx> {
-    pub fn new() -> Self {
-        FreeRegionMap { relation: TransitiveRelation::new() }
-    }
-
     pub fn is_empty(&self) -> bool {
         self.relation.is_empty()
     }
@@ -84,14 +80,14 @@ impl<'tcx> FreeRegionRelations<'tcx> for FreeRegionMap<'tcx> {
     }
 }
 
-fn is_free(r: Region) -> bool {
+fn is_free(r: Region<'_>) -> bool {
     match *r {
         ty::ReEarlyBound(_) | ty::ReFree(_) => true,
         _ => false
     }
 }
 
-fn is_free_or_static(r: Region) -> bool {
+fn is_free_or_static(r: Region<'_>) -> bool {
     match *r {
         ty::ReStatic => true,
         _ => is_free(r),