@@ -28,16 +28,17 @@ use super::{
2828 ConstraintCharacteristics , CopySource , CreateIndex , CreateTable , CreateTableOptions , Cte ,
2929 Delete , DoUpdate , ExceptSelectItem , ExcludeSelectItem , Expr , ExprWithAlias , Fetch , FromTable ,
3030 Function , FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList ,
31- FunctionArguments , GroupByExpr , HavingBound , IfStatement , IlikeSelectItem , Insert , Interpolate ,
32- InterpolateExpr , Join , JoinConstraint , JoinOperator , JsonPath , JsonPathElem , LateralView ,
33- LimitClause , MatchRecognizePattern , Measure , NamedParenthesizedList , NamedWindowDefinition ,
34- ObjectName , ObjectNamePart , Offset , OnConflict , OnConflictAction , OnInsert , OpenStatement ,
35- OrderBy , OrderByExpr , OrderByKind , Partition , PivotValueSource , ProjectionSelect , Query ,
36- RaiseStatement , RaiseStatementValue , ReferentialAction , RenameSelectItem , ReplaceSelectElement ,
37- ReplaceSelectItem , Select , SelectInto , SelectItem , SetExpr , SqlOption , Statement , Subscript ,
38- SymbolDefinition , TableAlias , TableAliasColumnDef , TableConstraint , TableFactor , TableObject ,
39- TableOptionsClustered , TableWithJoins , UpdateTableFromKind , Use , Value , Values , ViewColumnDef ,
40- WhileStatement , WildcardAdditionalOptions , With , WithFill ,
31+ FunctionArguments , GroupByExpr , HavingBound , IfStatement , IlikeSelectItem , IndexColumn , Insert ,
32+ Interpolate , InterpolateExpr , Join , JoinConstraint , JoinOperator , JsonPath , JsonPathElem ,
33+ LateralView , LimitClause , MatchRecognizePattern , Measure , NamedParenthesizedList ,
34+ NamedWindowDefinition , ObjectName , ObjectNamePart , Offset , OnConflict , OnConflictAction ,
35+ OnInsert , OpenStatement , OrderBy , OrderByExpr , OrderByKind , Partition , PivotValueSource ,
36+ ProjectionSelect , Query , RaiseStatement , RaiseStatementValue , ReferentialAction ,
37+ RenameSelectItem , ReplaceSelectElement , ReplaceSelectItem , Select , SelectInto , SelectItem ,
38+ SetExpr , SqlOption , Statement , Subscript , SymbolDefinition , TableAlias , TableAliasColumnDef ,
39+ TableConstraint , TableFactor , TableObject , TableOptionsClustered , TableWithJoins ,
40+ UpdateTableFromKind , Use , Value , Values , ViewColumnDef , WhileStatement ,
41+ WildcardAdditionalOptions , With , WithFill ,
4142} ;
4243
4344/// Given an iterator of spans, return the [Span::union] of all spans.
@@ -650,7 +651,7 @@ impl Spanned for TableConstraint {
650651 name. iter ( )
651652 . map ( |i| i. span )
652653 . chain ( index_name. iter ( ) . map ( |i| i. span ) )
653- . chain ( columns. iter ( ) . map ( |i| i. span ) )
654+ . chain ( columns. iter ( ) . map ( |i| i. span ( ) ) )
654655 . chain ( characteristics. iter ( ) . map ( |i| i. span ( ) ) ) ,
655656 ) ,
656657 TableConstraint :: PrimaryKey {
@@ -664,7 +665,7 @@ impl Spanned for TableConstraint {
664665 name. iter ( )
665666 . map ( |i| i. span )
666667 . chain ( index_name. iter ( ) . map ( |i| i. span ) )
667- . chain ( columns. iter ( ) . map ( |i| i. span ) )
668+ . chain ( columns. iter ( ) . map ( |i| i. span ( ) ) )
668669 . chain ( characteristics. iter ( ) . map ( |i| i. span ( ) ) ) ,
669670 ) ,
670671 TableConstraint :: ForeignKey {
@@ -700,7 +701,7 @@ impl Spanned for TableConstraint {
700701 } => union_spans (
701702 name. iter ( )
702703 . map ( |i| i. span )
703- . chain ( columns. iter ( ) . map ( |i| i. span ) ) ,
704+ . chain ( columns. iter ( ) . map ( |i| i. span ( ) ) ) ,
704705 ) ,
705706 TableConstraint :: FulltextOrSpatial {
706707 fulltext : _,
@@ -711,7 +712,7 @@ impl Spanned for TableConstraint {
711712 opt_index_name
712713 . iter ( )
713714 . map ( |i| i. span )
714- . chain ( columns. iter ( ) . map ( |i| i. span ) ) ,
715+ . chain ( columns. iter ( ) . map ( |i| i. span ( ) ) ) ,
715716 ) ,
716717 }
717718 }
@@ -745,6 +746,12 @@ impl Spanned for CreateIndex {
745746 }
746747}
747748
749+ impl Spanned for IndexColumn {
750+ fn span ( & self ) -> Span {
751+ self . column . span ( )
752+ }
753+ }
754+
748755impl Spanned for CaseStatement {
749756 fn span ( & self ) -> Span {
750757 let CaseStatement {
0 commit comments