fn collect_var_errors(
        &self,
        var_data: &LexicalRegionResolutions<'tcx>,
        graph: &RegionGraph<'tcx>,
        errors: &mut Vec<RegionResolutionError<'tcx>>,
    ) {
        debug!("collect_var_errors");

        // This is the best way that I have found to suppress
        // duplicate and related errors. Basically we keep a set of
        // flags for every node. Whenever an error occurs, we will
        // walk some portion of the graph looking to find pairs of
        // conflicting regions to report to the user. As we walk, we
        // trip the flags from false to true, and if we find that
        // we've already reported an error involving any particular
        // node we just stop and don't report the current error.  The
        // idea is to report errors that derive from independent
        // regions of the graph, but not those that derive from
        // overlapping locations.
        let mut dup_vec = vec![u32::MAX; self.num_vars()];

        for (node_vid, value) in var_data.values.iter_enumerated() {
            match *value {
                VarValue::Value(_) => { /* Inference successful */ }
                VarValue::ErrorValue => {
                    /* Inference impossible, this value contains
                       inconsistent constraints.

                       I think that in this case we should report an
                       error now---unlike the case above, we can't
                       wait to see whether the user needs the result
                       of this variable.  The reason is that the mere
                       existence of this variable implies that the
                       region graph is inconsistent, whether or not it
                       is used.

                       For example, we may have created a region
                       variable that is the GLB of two other regions
                       which do not have a GLB.  Even if that variable
                       is not used, it implies that those two regions
                       *should* have a GLB.

                       At least I think this is true. It may be that
                       the mere existence of a conflict in a region variable
                       that is not used is not a problem, so if this rule
                       starts to create problems we'll have to revisit
                       this portion of the code and think hard about it. =) */
                    self.collect_error_for_expanding_node(graph, &mut dup_vec, node_vid, errors);
                }
            }
        }
    }
/// Go over the variables that were declared to be error variables
/// and create a `RegionResolutionError` for each of them.
Go over the variables that were declared to be error variables
and create a `RegionResolutionError` for each of them.
Go over the variables that were declared to be error variables and create a ` RegionResolutionError ` for each of them .
fn collect_var_errors(
        &self,
        var_data: &LexicalRegionResolutions<'tcx>,
        graph: &RegionGraph<'tcx>,
        errors: &mut Vec<RegionResolutionError<'tcx>>,
    ) {
        debug!("collect_var_errors");
        // This is the best way that I have found to suppress
        // duplicate and related errors. Basically we keep a set of
        // flags for every node. Whenever an error occurs, we will
        // walk some portion of the graph looking to find pairs of
        // conflicting regions to report to the user. As we walk, we
        // trip the flags from false to true, and if we find that
        // we've already reported an error involving any particular
        // node we just stop and don't report the current error.  The
        // idea is to report errors that derive from independent
        // regions of the graph, but not those that derive from
        // overlapping locations.
        let mut dup_vec = vec![u32::MAX; self.num_vars()];
        for (node_vid, value) in var_data.values.iter_enumerated() {
            match *value {
                VarValue::Value(_) => { /* Inference successful */ }
                VarValue::ErrorValue => {
                    /* Inference impossible, this value contains
                       inconsistent constraints.
                       I think that in this case we should report an
                       error now---unlike the case above, we can't
                       wait to see whether the user needs the result
                       of this variable.  The reason is that the mere
                       existence of this variable implies that the
                       region graph is inconsistent, whether or not it
                       is used.
                       For example, we may have created a region
                       variable that is the GLB of two other regions
                       which do not have a GLB.  Even if that variable
                       is not used, it implies that those two regions
                       *should* have a GLB.
                       At least I think this is true. It may be that
                       the mere existence of a conflict in a region variable
                       that is not used is not a problem, so if this rule
                       starts to create problems we'll have to revisit
                       this portion of the code and think hard about it. =) */
                    self.collect_error_for_expanding_node(graph, &mut dup_vec, node_vid, errors);
                }
            }
        }
    }
fn collect_var_errors ( & self , var_data : & LexicalRegionResolutions < ' tcx > , graph : & RegionGraph < ' tcx > , errors : & mut Vec < RegionResolutionError < ' tcx > > , ) { debug ! ( " " ) ; // This is the best way that I have found to suppress // duplicate and related errors. Basically we keep a set of // flags for every node. Whenever an error occurs, we will // walk some portion of the graph looking to find pairs of // conflicting regions to report to the user. As we walk, we // trip the flags from false to true, and if we find that // we've already reported an error involving any particular // node we just stop and don't report the current error.  The // idea is to report errors that derive from independent // regions of the graph, but not those that derive from // overlapping locations. let mut dup_vec = vec ! [ u32 MAX self num_vars ( ) ] ; for ( node_vid , value ) in var_data . values . iter_enumerated ( ) { match * value { VarValue :: Value ( _ ) => { /* Inference successful */ } VarValue :: ErrorValue => { /* Inference impossible, this value contains
                       inconsistent constraints.

                       I think that in this case we should report an
                       error now---unlike the case above, we can't
                       wait to see whether the user needs the result
                       of this variable.  The reason is that the mere
                       existence of this variable implies that the
                       region graph is inconsistent, whether or not it
                       is used.

                       For example, we may have created a region
                       variable that is the GLB of two other regions
                       which do not have a GLB.  Even if that variable
                       is not used, it implies that those two regions
                       *should* have a GLB.

                       At least I think this is true. It may be that
                       the mere existence of a conflict in a region variable
                       that is not used is not a problem, so if this rule
                       starts to create problems we'll have to revisit
                       this portion of the code and think hard about it. =) */ self . collect_error_for_expanding_node ( graph , & mut dup_vec , node_vid , errors ) ; } } } }
Go over the variables that were declared to be error variables
and create a `RegionResolutionError` for each of them.
Go over the variables that were declared to be error variables and create a ` RegionResolutionError ` for each of them .
&self
var_data
&LexicalRegionResolutions<'tcx>
graph
&RegionGraph<'tcx>
errors
&mut Vec<RegionResolutionError<'tcx>>
&self
var_data
&LexicalRegionResolutions<'tcx>
graph
&RegionGraph<'tcx>
errors
&mut Vec<RegionResolutionError<'tcx>>