@@ -320,7 +320,7 @@ fn invalid_types() {
320320 "MyContainer" ,
321321 vec ! [ usize_t( ) . into( ) ] ,
322322 EXT_ID ,
323- TypeBound :: Any ,
323+ TypeBound :: Linear ,
324324 & Arc :: downgrade ( & ext) ,
325325 ) ) ;
326326 let mut hugr = identity_hugr_with_type ( valid. clone ( ) ) . 0 ;
@@ -332,7 +332,7 @@ fn invalid_types() {
332332 "MyContainer" ,
333333 vec ! [ valid. clone( ) . into( ) ] ,
334334 EXT_ID ,
335- TypeBound :: Any ,
335+ TypeBound :: Linear ,
336336 & Arc :: downgrade ( & ext) ,
337337 ) ;
338338 assert_eq ! (
@@ -354,7 +354,7 @@ fn invalid_types() {
354354 validate_to_sig_error( bad_bound. clone( ) ) ,
355355 SignatureError :: WrongBound {
356356 actual: TypeBound :: Copyable ,
357- expected: TypeBound :: Any
357+ expected: TypeBound :: Linear
358358 }
359359 ) ;
360360
@@ -363,22 +363,22 @@ fn invalid_types() {
363363 "MyContainer" ,
364364 vec ! [ Type :: new_extension( bad_bound) . into( ) ] ,
365365 EXT_ID ,
366- TypeBound :: Any ,
366+ TypeBound :: Linear ,
367367 & Arc :: downgrade ( & ext) ,
368368 ) ;
369369 assert_eq ! (
370370 validate_to_sig_error( nested) ,
371371 SignatureError :: WrongBound {
372372 actual: TypeBound :: Copyable ,
373- expected: TypeBound :: Any
373+ expected: TypeBound :: Linear
374374 }
375375 ) ;
376376
377377 let too_many_type_args = CustomType :: new (
378378 "MyContainer" ,
379379 vec ! [ usize_t( ) . into( ) , 3u64 . into( ) ] ,
380380 EXT_ID ,
381- TypeBound :: Any ,
381+ TypeBound :: Linear ,
382382 & Arc :: downgrade ( & ext) ,
383383 ) ;
384384 assert_eq ! (
@@ -393,8 +393,8 @@ fn typevars_declared() -> Result<(), Box<dyn std::error::Error>> {
393393 let f = FunctionBuilder :: new (
394394 "myfunc" ,
395395 PolyFuncType :: new (
396- [ TypeBound :: Any . into ( ) ] ,
397- Signature :: new_endo ( vec ! [ Type :: new_var_use( 0 , TypeBound :: Any ) ] ) ,
396+ [ TypeBound :: Linear . into ( ) ] ,
397+ Signature :: new_endo ( vec ! [ Type :: new_var_use( 0 , TypeBound :: Linear ) ] ) ,
398398 ) ,
399399 ) ?;
400400 let [ w] = f. input_wires_arr ( ) ;
@@ -403,8 +403,8 @@ fn typevars_declared() -> Result<(), Box<dyn std::error::Error>> {
403403 let f = FunctionBuilder :: new (
404404 "myfunc" ,
405405 PolyFuncType :: new (
406- [ TypeBound :: Any . into ( ) ] ,
407- Signature :: new_endo ( vec ! [ Type :: new_var_use( 1 , TypeBound :: Any ) ] ) ,
406+ [ TypeBound :: Linear . into ( ) ] ,
407+ Signature :: new_endo ( vec ! [ Type :: new_var_use( 1 , TypeBound :: Linear ) ] ) ,
408408 ) ,
409409 ) ?;
410410 let [ w] = f. input_wires_arr ( ) ;
@@ -413,7 +413,7 @@ fn typevars_declared() -> Result<(), Box<dyn std::error::Error>> {
413413 let f = FunctionBuilder :: new (
414414 "myfunc" ,
415415 PolyFuncType :: new (
416- [ TypeBound :: Any . into ( ) ] ,
416+ [ TypeBound :: Linear . into ( ) ] ,
417417 Signature :: new_endo ( vec ! [ Type :: new_var_use( 1 , TypeBound :: Copyable ) ] ) ,
418418 ) ,
419419 ) ?;
@@ -486,10 +486,10 @@ fn no_polymorphic_consts() -> Result<(), Box<dyn std::error::Error>> {
486486}
487487
488488pub ( crate ) fn extension_with_eval_parallel ( ) -> Arc < Extension > {
489- let rowp = TypeParam :: new_list_type ( TypeBound :: Any ) ;
489+ let rowp = TypeParam :: new_list_type ( TypeBound :: Linear ) ;
490490 Extension :: new_test_arc ( EXT_ID , |ext, extension_ref| {
491- let inputs = TypeRV :: new_row_var_use ( 0 , TypeBound :: Any ) ;
492- let outputs = TypeRV :: new_row_var_use ( 1 , TypeBound :: Any ) ;
491+ let inputs = TypeRV :: new_row_var_use ( 0 , TypeBound :: Linear ) ;
492+ let outputs = TypeRV :: new_row_var_use ( 1 , TypeBound :: Linear ) ;
493493 let evaled_fn = TypeRV :: new_function ( FuncValueType :: new ( inputs. clone ( ) , outputs. clone ( ) ) ) ;
494494 let pf = PolyFuncTypeRV :: new (
495495 [ rowp. clone ( ) , rowp. clone ( ) ] ,
@@ -498,7 +498,7 @@ pub(crate) fn extension_with_eval_parallel() -> Arc<Extension> {
498498 ext. add_op ( "eval" . into ( ) , String :: new ( ) , pf, extension_ref)
499499 . unwrap ( ) ;
500500
501- let rv = |idx| TypeRV :: new_row_var_use ( idx, TypeBound :: Any ) ;
501+ let rv = |idx| TypeRV :: new_row_var_use ( idx, TypeBound :: Linear ) ;
502502 let pf = PolyFuncTypeRV :: new (
503503 [ rowp. clone ( ) , rowp. clone ( ) , rowp. clone ( ) , rowp. clone ( ) ] ,
504504 Signature :: new (
@@ -548,13 +548,13 @@ fn list1ty(t: TypeRV) -> Term {
548548#[ test]
549549fn row_variables ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
550550 let e = extension_with_eval_parallel ( ) ;
551- let tv = TypeRV :: new_row_var_use ( 0 , TypeBound :: Any ) ;
551+ let tv = TypeRV :: new_row_var_use ( 0 , TypeBound :: Linear ) ;
552552 let inner_ft = Type :: new_function ( FuncValueType :: new_endo ( tv. clone ( ) ) ) ;
553553 let ft_usz = Type :: new_function ( FuncValueType :: new_endo ( vec ! [ tv. clone( ) , usize_t( ) . into( ) ] ) ) ;
554554 let mut fb = FunctionBuilder :: new (
555555 "id" ,
556556 PolyFuncType :: new (
557- [ TypeParam :: new_list_type ( TypeBound :: Any ) ] ,
557+ [ TypeParam :: new_list_type ( TypeBound :: Linear ) ] ,
558558 Signature :: new ( inner_ft. clone ( ) , ft_usz) ,
559559 ) ,
560560 ) ?;
@@ -582,8 +582,8 @@ fn test_polymorphic_load() -> Result<(), Box<dyn std::error::Error>> {
582582 let id = m. declare (
583583 "id" ,
584584 PolyFuncType :: new (
585- vec ! [ TypeBound :: Any . into( ) ] ,
586- Signature :: new_endo ( vec ! [ Type :: new_var_use( 0 , TypeBound :: Any ) ] ) ,
585+ vec ! [ TypeBound :: Linear . into( ) ] ,
586+ Signature :: new_endo ( vec ! [ Type :: new_var_use( 0 , TypeBound :: Linear ) ] ) ,
587587 ) ,
588588 ) ?;
589589 let sig = Signature :: new (
0 commit comments