diff --git a/library/src/scala/internal/quoted/Matcher.scala b/library/src/scala/internal/quoted/Matcher.scala index bd8cd2e46e27..ab69eb7e91f0 100644 --- a/library/src/scala/internal/quoted/Matcher.scala +++ b/library/src/scala/internal/quoted/Matcher.scala @@ -30,7 +30,7 @@ private[quoted] object Matcher { class SymBinding(val sym: Symbol, val fromAbove: Boolean) def termMatch(scrutineeTerm: Term, patternTerm: Term, hasTypeSplices: Boolean): Option[Tuple] = { - implicit val env: Env = Map.empty + given Env = Map.empty if (hasTypeSplices) { val ctx: Context = internal.Context_GADT_setFreshGADTBounds(rootContext) given Context = ctx @@ -51,7 +51,7 @@ private[quoted] object Matcher { // TODO factor out common logic with `termMatch` def typeTreeMatch(scrutineeTypeTree: TypeTree, patternTypeTree: TypeTree, hasTypeSplices: Boolean): Option[Tuple] = { - implicit val env: Env = Map.empty + given Env = Map.empty if (hasTypeSplices) { val ctx: Context = internal.Context_GADT_setFreshGADTBounds(rootContext) given Context = ctx diff --git a/library/src/scala/quoted/Expr.scala b/library/src/scala/quoted/Expr.scala index 4ac15be60bbf..87cf37428484 100644 --- a/library/src/scala/quoted/Expr.scala +++ b/library/src/scala/quoted/Expr.scala @@ -6,10 +6,10 @@ import scala.quoted.show.SyntaxHighlight class Expr[+T] private[scala] { /** Show a source code like representation of this expression without syntax highlight */ - def show(implicit qctx: QuoteContext): String = qctx.show(this, SyntaxHighlight.plain) + def show(using qctx: QuoteContext): String = qctx.show(this, SyntaxHighlight.plain) /** Show a source code like representation of this expression */ - def show(syntaxHighlight: SyntaxHighlight)(implicit qctx: QuoteContext): String = qctx.show(this, syntaxHighlight) + def show(syntaxHighlight: SyntaxHighlight)(using qctx: QuoteContext): String = qctx.show(this, syntaxHighlight) /** Return the value of this expression. * diff --git a/library/src/scala/quoted/util/ExprMap.scala b/library/src/scala/quoted/util/ExprMap.scala index 7475fecdc8bf..2d262c9d76a3 100644 --- a/library/src/scala/quoted/util/ExprMap.scala +++ b/library/src/scala/quoted/util/ExprMap.scala @@ -28,11 +28,11 @@ trait ExprMap { def localCtx(definition: Definition): Context = definition.symbol.localContext tree match { case tree: ValDef => - implicit val ctx = localCtx(tree) + given Context = localCtx(tree) val rhs1 = tree.rhs.map(x => transformTerm(x, tree.tpt.tpe)) ValDef.copy(tree)(tree.name, tree.tpt, rhs1) case tree: DefDef => - implicit val ctx = localCtx(tree) + given Context = localCtx(tree) DefDef.copy(tree)(tree.name, tree.typeParams, tree.paramss, tree.returnTpt, tree.rhs.map(x => transformTerm(x, tree.returnTpt.tpe))) case tree: TypeDef => tree