@@ -387,7 +387,7 @@ class CheckCaptures extends Recheck, SymTransformer:
387387
388388      def  checkUseDeclared (c : CaptureRef , env : Env ) = 
389389        c.pathRoot match 
390-           case  ref : NamedType  if  ! ref.symbol.hasAnnotation(defn.UnboxAnnot ) => 
390+           case  ref : NamedType  if  ! ref.symbol.hasAnnotation(defn.UseAnnot ) => 
391391            val  what  =  if  ref.isType then  " Capture set parameter" else  " Local reach capability" 
392392            report.error(
393393              em """ $what  $c leaks into capture scope of  ${env.ownerString}. 
@@ -519,7 +519,7 @@ class CheckCaptures extends Recheck, SymTransformer:
519519    override  def  prepareFunction (funtpe : MethodType , meth : Symbol )(using  Context ):  MethodType  = 
520520      val  paramInfosWithUses  =  funtpe.paramInfos.zipWithConserve(funtpe.paramNames):  (formal, pname) => 
521521        val  paramOpt  =  meth.rawParamss.nestedFind(_.name ==  pname)
522-         paramOpt.flatMap(_.getAnnotation(defn.UnboxAnnot )) match 
522+         paramOpt.flatMap(_.getAnnotation(defn.UseAnnot )) match 
523523          case  Some (ann) =>  AnnotatedType (formal, ann)
524524          case  _ =>  formal
525525      funtpe.derivedLambdaType(paramInfos =  paramInfosWithUses)
@@ -567,7 +567,7 @@ class CheckCaptures extends Recheck, SymTransformer:
567567    def  recheckArg (arg : Tree , formal : Type )(using  Context ):  Type  = 
568568      val  argType  =  recheck(arg, formal)
569569      formal match 
570-         case  AnnotatedType (formal1, ann) if  ann.symbol ==  defn.UnboxAnnot  => 
570+         case  AnnotatedType (formal1, ann) if  ann.symbol ==  defn.UseAnnot  => 
571571          capt.println(i " charging deep capture set of  $arg:  ${argType} =  ${argType.deepCaptureSet}" )
572572          markFree(argType.deepCaptureSet, arg.srcPos)
573573        case  _ => 
@@ -581,13 +581,13 @@ class CheckCaptures extends Recheck, SymTransformer:
581581     *  --------------------- 
582582     *  E |- f(a): Tr^C 
583583     * 
584-      *  If the function `f` does not have an `@unboxed ` parameter, then 
584+      *  If the function `f` does not have an `@use ` parameter, then 
585585     *  any unboxing it does would be charged to the environment of the function 
586586     *  so they have to appear in Cq. Since any capabilities of the result of the 
587587     *  application must already be present in the application, an upper 
588588     *  approximation of the result capture set is Cq \union Ca, where `Ca` 
589589     *  is the capture set of the argument. 
590-      *  If the function `f` does have an `@unboxed ` parameter, then it could in addition 
590+      *  If the function `f` does have an `@use ` parameter, then it could in addition 
591591     *  unbox reach capabilities over its formal parameter. Therefore, the approximation 
592592     *  would be `Cq \union dcs(Ca)` instead. 
593593     *  If the approximation is known to subcapture the declared result Cr, we pick it for C 
@@ -600,7 +600,7 @@ class CheckCaptures extends Recheck, SymTransformer:
600600      val  argCaptures  = 
601601        for  (argType, formal) <-  argTypes.lazyZip(funType.paramInfos) yield 
602602          formal match 
603-             case  AnnotatedType (_, ann) if  ann.symbol ==  defn.UnboxAnnot  =>  argType.deepCaptureSet
603+             case  AnnotatedType (_, ann) if  ann.symbol ==  defn.UseAnnot  =>  argType.deepCaptureSet
604604            case  _ =>  argType.captureSet
605605      appType match 
606606        case  appType @  CapturingType (appType1, refs)
@@ -1379,16 +1379,16 @@ class CheckCaptures extends Recheck, SymTransformer:
13791379
13801380        override  def  checkInheritedTraitParameters :  Boolean  =  false 
13811381
1382-         /**  Check that overrides don't change the @unbox  status of their parameters */  
1382+         /**  Check that overrides don't change the @use  status of their parameters */  
13831383        override  def  additionalChecks (member : Symbol , other : Symbol )(using  Context ):  Unit  = 
13841384          for 
13851385            (params1, params2) <-  member.rawParamss.lazyZip(other.rawParamss)
13861386            (param1, param2) <-  params1.lazyZip(params2)
13871387          do 
1388-             if  param1.hasAnnotation(defn.UnboxAnnot ) !=  param2.hasAnnotation(defn.UnboxAnnot ) then 
1388+             if  param1.hasAnnotation(defn.UseAnnot ) !=  param2.hasAnnotation(defn.UseAnnot ) then 
13891389              report.error(
13901390                OverrideError (
1391-                     i " has a parameter  ${param1.name} with different @unbox  status than the corresponding parameter in the overridden definition " ,
1391+                     i " has a parameter  ${param1.name} with different @use  status than the corresponding parameter in the overridden definition " ,
13921392                    self, member, other, self.memberInfo(member), self.memberInfo(other)
13931393                  ),
13941394                if  member.owner ==  clazz then  member.srcPos else  clazz.srcPos
0 commit comments