@@ -22,9 +22,9 @@ import Capabilities.*
22
22
*
23
23
* - Hidden sets of arguments must not be referred to in the same application
24
24
* - Hidden sets of (result-) types must not be referred to alter in the same scope.
25
- * - Returned hidden sets can only refer to @ consume parameters.
25
+ * - Returned hidden sets can only refer to consume parameters.
26
26
* - If returned hidden sets refer to an encloding this, the reference must be
27
- * from a @ consume method.
27
+ * from a consume method.
28
28
* - Consumed entities cannot be used subsequently.
29
29
* - Entitites cannot be consumed in a loop.
30
30
*/
@@ -422,7 +422,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
422
422
def consumeError (ref : Capability , loc : SrcPos , pos : SrcPos )(using Context ): Unit =
423
423
report.error(
424
424
em """ Separation failure: Illegal access to $ref, which was passed to a
425
- |@ consume parameter or was used as a prefix to a @ consume method on line ${loc.line + 1 }
425
+ |consume parameter or was used as a prefix to a consume method on line ${loc.line + 1 }
426
426
|and therefore is no longer available. """ ,
427
427
pos)
428
428
@@ -433,7 +433,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
433
433
def consumeInLoopError (ref : Capability , pos : SrcPos )(using Context ): Unit =
434
434
report.error(
435
435
em """ Separation failure: $ref appears in a loop, therefore it cannot
436
- |be passed to a @ consume parameter or be used as a prefix of a @ consume method call. """ ,
436
+ |be passed to a consume parameter or be used as a prefix of a consume method call. """ ,
437
437
pos)
438
438
439
439
// ------------ Checks -----------------------------------------------------
@@ -587,16 +587,16 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
587
587
588
588
/** Check validity of consumed references `refsToCheck`. The references are consumed
589
589
* because they are hidden in a Fresh result type or they are referred
590
- * to in an argument to a @ consume parameter or in a prefix of a @ consume method --
590
+ * to in an argument to a consume parameter or in a prefix of a consume method --
591
591
* which one applies is determined by the role parameter.
592
592
*
593
593
* This entails the following checks:
594
594
* - The reference must be defined in the same as method or class as
595
595
* the access.
596
596
* - If the reference is to a term parameter, that parameter must be
597
- * marked as @ consume as well.
597
+ * marked as consume as well.
598
598
* - If the reference is to a this type of the enclosing class, the
599
- * access must be in a @ consume method.
599
+ * access must be in a consume method.
600
600
*
601
601
* References that extend caps.Sharable are excluded from checking.
602
602
* As a side effect, add all checked references with the given position `pos`
@@ -631,7 +631,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
631
631
then
632
632
report.error(
633
633
em """ Separation failure: $descr non-local this of class ${ref.cls}.
634
- |The access must be in a @ consume method to allow this. """ ,
634
+ |The access must be in a consume method to allow this. """ ,
635
635
pos)
636
636
case _ =>
637
637
@@ -643,7 +643,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
643
643
val (pluralS, singleS) = if badParams.tail.isEmpty then (" " , " s" ) else (" s" , " " )
644
644
report.error(
645
645
em """ Separation failure: $descr parameter $pluralS ${paramsStr(badParams.toList)}.
646
- |The parameter $pluralS need $singleS to be annotated with @ consume to allow this. """ ,
646
+ |The parameter $pluralS need $singleS to be annotated with consume to allow this. """ ,
647
647
pos)
648
648
649
649
role match
@@ -769,7 +769,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
769
769
770
770
/** If `tpe` appears as a (result-) type of a definition, treat its
771
771
* hidden set minus its explicitly declared footprint as consumed.
772
- * If `tpe` appears as an argument to a @ consume parameter, treat
772
+ * If `tpe` appears as an argument to a consume parameter, treat
773
773
* its footprint as consumed.
774
774
*/
775
775
def checkLegalRefs () = role match
@@ -786,7 +786,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
786
786
case TypeRole .Argument (arg) =>
787
787
if tpe.hasAnnotation(defn.ConsumeAnnot ) then
788
788
val capts = captures(arg).footprint
789
- checkConsumedRefs(capts, tpe, role, i " argument to @ consume parameter with type ${arg.nuType} refers to " , pos)
789
+ checkConsumedRefs(capts, tpe, role, i " argument to consume parameter with type ${arg.nuType} refers to " , pos)
790
790
case _ =>
791
791
792
792
if ! tpe.hasAnnotation(defn.UntrackedCapturesAnnot ) then
@@ -910,7 +910,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
910
910
checkConsumedRefs(
911
911
captures(qual).footprint, qual.nuType,
912
912
TypeRole .Qualifier (qual, tree.symbol),
913
- i " call prefix of @ consume ${tree.symbol} refers to " , qual.srcPos)
913
+ i " call prefix of consume ${tree.symbol} refers to " , qual.srcPos)
914
914
case tree : GenericApply =>
915
915
traverseChildren(tree)
916
916
tree.tpe match
0 commit comments