pub fn try_expand_target_pattern<F>(
        &mut self,
        target_path: &Rc<Path>,
        source_path: &Rc<Path>,
        root_rustc_type: Ty<'tcx>,
        strong_update: F,
    ) -> bool
    where
        F: Fn(&mut Self, Rc<Path>, Rc<Path>, Ty<'tcx>),
    {
        trace!(
            "try_expand_target_pattern(target_path {:?}, source_path {:?}, root_rustc_type {:?},)",
            target_path,
            source_path,
            root_rustc_type
        );
        if let PathEnum::QualifiedPath {
            ref qualifier,
            ref selector,
            ..
        } = &target_path.value
        {
            if let PathSelector::Slice(count) = &**selector {
                // if the count is known at this point, expand it like a pattern.
                if let Expression::CompileTimeConstant(ConstantDomain::U128(val)) =
                    &count.expression
                {
                    self.expand_slice(
                        qualifier,
                        source_path,
                        root_rustc_type,
                        0,
                        *val as u64,
                        strong_update,
                    );
                    return true;
                }
                if !source_path.is_rooted_by_parameter() {
                    // The local environment is the authority on what is known about source_path
                    // What we do not know, is how many elements of target is being over written
                    // by elements from source. We therefore provide a conditional assignment
                    // for every known element of source.
                    self.conditionally_expand_slice(
                        qualifier,
                        source_path,
                        root_rustc_type,
                        count,
                        strong_update,
                    );
                    return true;
                }
            }
        }

        // Assigning to a fixed length array is like a slice.
        if let TyKind::Array(_, length) = root_rustc_type.kind() {
            let length = self.get_array_length(length);
            self.expand_slice(
                target_path,
                source_path,
                root_rustc_type,
                0,
                length as u64,
                strong_update,
            );
            let target_len_path = Path::new_length(target_path.clone());
            let len_value = self.get_u128_const_val(length as u128);
            self.update_value_at(target_len_path, len_value);
            return true;
        }
        false
    }
/// If target_path is a slice (or an array), this amounts to a series of assignments to each element.
/// In this case the function returns true.
If target_path is a slice (or an array), this amounts to a series of assignments to each element.
In this case the function returns true.
If target_path is a slice ( or an array ) this amounts to a series of assignments to each element . In this case the function returns true .
pub fn try_expand_target_pattern<F>(
        &mut self,
        target_path: &Rc<Path>,
        source_path: &Rc<Path>,
        root_rustc_type: Ty<'tcx>,
        strong_update: F,
    ) -> bool
    where
        F: Fn(&mut Self, Rc<Path>, Rc<Path>, Ty<'tcx>),
    {
        trace!(
            "try_expand_target_pattern(target_path {:?}, source_path {:?}, root_rustc_type {:?},)",
            target_path,
            source_path,
            root_rustc_type
        );
        if let PathEnum::QualifiedPath {
            ref qualifier,
            ref selector,
            ..
        } = &target_path.value
        {
            if let PathSelector::Slice(count) = &**selector {
                // if the count is known at this point, expand it like a pattern.
                if let Expression::CompileTimeConstant(ConstantDomain::U128(val)) =
                    &count.expression
                {
                    self.expand_slice(
                        qualifier,
                        source_path,
                        root_rustc_type,
                        0,
                        *val as u64,
                        strong_update,
                    );
                    return true;
                }
                if !source_path.is_rooted_by_parameter() {
                    // The local environment is the authority on what is known about source_path
                    // What we do not know, is how many elements of target is being over written
                    // by elements from source. We therefore provide a conditional assignment
                    // for every known element of source.
                    self.conditionally_expand_slice(
                        qualifier,
                        source_path,
                        root_rustc_type,
                        count,
                        strong_update,
                    );
                    return true;
                }
            }
        }
        // Assigning to a fixed length array is like a slice.
        if let TyKind::Array(_, length) = root_rustc_type.kind() {
            let length = self.get_array_length(length);
            self.expand_slice(
                target_path,
                source_path,
                root_rustc_type,
                0,
                length as u64,
                strong_update,
            );
            let target_len_path = Path::new_length(target_path.clone());
            let len_value = self.get_u128_const_val(length as u128);
            self.update_value_at(target_len_path, len_value);
            return true;
        }
        false
    }
pub fn try_expand_target_pattern < F > ( & mut self , target_path : & Rc < Path > , source_path : & Rc < Path > , root_rustc_type : Ty < ' tcx > , strong_update : F , ) -> bool where F : Fn ( & mut Self , Rc < Path > , Rc < Path > , Ty < ' tcx > ) , { trace ! ( " " target_path source_path root_rustc_type ) ; if let PathEnum :: QualifiedPath { ref qualifier , ref selector , .. } = & target_path . value { if let PathSelector :: Slice ( count ) = & * * selector { // if the count is known at this point, expand it like a pattern. if let Expression :: CompileTimeConstant ( ConstantDomain :: U128 ( val ) ) = & count . expression { self . expand_slice ( qualifier , source_path , root_rustc_type , 0 , * val as u64 , strong_update , ) ; return true ; } if ! source_path . is_rooted_by_parameter ( ) { // The local environment is the authority on what is known about source_path // What we do not know, is how many elements of target is being over written // by elements from source. We therefore provide a conditional assignment // for every known element of source. self . conditionally_expand_slice ( qualifier , source_path , root_rustc_type , count , strong_update , ) ; return true ; } } } // Assigning to a fixed length array is like a slice. if let TyKind :: Array ( _ , length ) = root_rustc_type . kind ( ) { let length = self . get_array_length ( length ) ; self . expand_slice ( target_path , source_path , root_rustc_type , 0 , length as u64 , strong_update , ) ; let target_len_path = Path :: new_length ( target_path . clone ( ) ) ; let len_value = self . get_u128_const_val ( length as u128 ) ; self . update_value_at ( target_len_path , len_value ) ; return true ; } false }
If target_path is a slice (or an array), this amounts to a series of assignments to each element.
If target_path is a slice ( or an array ) this amounts to a series of assignments to each element .
&mut self
target_path
&Rc<Path>
source_path
&Rc<Path>
root_rustc_type
Ty<'tcx>
strong_update
F
&mut self
target_path
&Rc<Path>
source_path
&Rc<Path>
root_rustc_type
Ty<'tcx>
strong_update
F