fn cannot_move_out_of_interior_noncopy(
        self,
        move_from_span: Span,
        ty: ty::Ty,
        is_index: Option<bool>,
        o: Origin,
    ) -> DiagnosticBuilder<'cx> {
        let type_name = match (&ty.sty, is_index) {
            (&ty::Array(_, _), Some(true)) | (&ty::Array(_, _), None) => "array",
            (&ty::Slice(_), _) => "slice",
            _ => span_bug!(move_from_span, "this path should not cause illegal move"),
        };
        let mut err = struct_span_err!(
            self,
            move_from_span,
            E0508,
            "cannot move out of type `{}`, \
             a non-copy {}{OGN}",
            ty,
            type_name,
            OGN = o
        );
        err.span_label(move_from_span, "cannot move out of here");

        self.cancel_if_wrong_origin(err, o)
    }
/// Signal an error due to an attempt to move out of the interior
/// of an array or slice. `is_index` is None when error origin
/// didn't capture whether there was an indexing operation or not.
Signal an error due to an attempt to move out of the interior
of an array or slice. `is_index` is None when error origin
didn't capture whether there was an indexing operation or not.
Signal an error due to an attempt to move out of the interior of an array or slice . ` is_index ` is None when error origin didn ' t capture whether there was an indexing operation or not .
fn cannot_move_out_of_interior_noncopy(
        self,
        move_from_span: Span,
        ty: ty::Ty,
        is_index: Option<bool>,
        o: Origin,
    ) -> DiagnosticBuilder<'cx> {
        let type_name = match (&ty.sty, is_index) {
            (&ty::Array(_, _), Some(true)) | (&ty::Array(_, _), None) => "array",
            (&ty::Slice(_), _) => "slice",
            _ => span_bug!(move_from_span, "this path should not cause illegal move"),
        };
        let mut err = struct_span_err!(
            self,
            move_from_span,
            E0508,
            "cannot move out of type `{}`, \
             a non-copy {}{OGN}",
            ty,
            type_name,
            OGN = o
        );
        err.span_label(move_from_span, "cannot move out of here");
        self.cancel_if_wrong_origin(err, o)
    }
fn cannot_move_out_of_interior_noncopy ( self , move_from_span : Span , ty : ty :: Ty , is_index : Option < bool > , o : Origin , ) -> DiagnosticBuilder < ' cx > { let type_name = match ( & ty . sty , is_index ) { ( & ty :: Array ( _ , _ ) , Some ( true ) ) | ( & ty :: Array ( _ , _ ) , None ) => " " , ( & ty :: Slice ( _ ) , _ ) => " " , _ => span_bug ! ( move_from_span " " ) , } ; let mut err = struct_span_err ! ( self move_from_span E0508 " \
 " ty type_name OGN o ) ; err . span_label ( move_from_span , " " ) ; self . cancel_if_wrong_origin ( err , o ) }
Signal an error due to an attempt to move out of the interior
of an array or slice.
Signal an error due to an attempt to move out of the interior of an array or slice .
self
move_from_span
Span
ty
ty::Ty
is_index
Option<bool>
o
Origin
self
move_from_span
Span
ty
ty::Ty
is_index
Option<bool>
o
Origin