@@ -6,7 +6,6 @@ use std::{collections::HashMap, rc::Rc};
66
77use crate :: {
88 eval:: cache:: { Cache as EvalCache , CacheIndex } ,
9- files:: Files ,
109 identifier:: LocIdent ,
1110 position:: { RawSpan , TermPos } ,
1211 term:: {
@@ -281,7 +280,7 @@ pub struct Label {
281280 pub diagnostics : Vec < ContractDiagnostic > ,
282281
283282 /// The position of the original contract.
284- pub span : RawSpan ,
283+ pub span : Option < RawSpan > ,
285284
286285 /// The index corresponding to the value being checked. Set at run-time by the interpreter.
287286 pub arg_idx : Option < CacheIndex > ,
@@ -411,11 +410,6 @@ impl Label {
411410 Label {
412411 typ : Rc :: new ( Type :: from ( TypeF :: Number ) ) ,
413412 diagnostics : vec ! [ ContractDiagnostic :: new( ) . with_message( String :: from( "testing" ) ) ] ,
414- span : RawSpan {
415- src_id : Files :: new ( ) . add ( "<test>" , String :: from ( "empty" ) ) ,
416- start : 0 . into ( ) ,
417- end : 1 . into ( ) ,
418- } ,
419413 polarity : Polarity :: Positive ,
420414 ..Default :: default ( )
421415 }
@@ -508,11 +502,7 @@ impl Default for Label {
508502 fn default ( ) -> Label {
509503 Label {
510504 typ : Rc :: new ( Type :: from ( TypeF :: Dyn ) ) ,
511- span : RawSpan {
512- src_id : Files :: new ( ) . add ( "<null>" , String :: from ( "" ) ) ,
513- start : 0 . into ( ) ,
514- end : 1 . into ( ) ,
515- } ,
505+ span : None ,
516506 polarity : Polarity :: Positive ,
517507 diagnostics : Default :: default ( ) ,
518508 arg_idx : Default :: default ( ) ,
@@ -554,7 +544,7 @@ pub enum MergeKind {
554544#[ derive( Copy , Clone , Debug , Eq , PartialEq ) ]
555545pub struct MergeLabel {
556546 /// The span of the original merge (which might then decompose into many others).
557- pub span : RawSpan ,
547+ pub span : Option < RawSpan > ,
558548 pub kind : MergeKind ,
559549}
560550
0 commit comments