Skip to content

Commit 3edd875

Browse files
committed
Remove rewrite rules that are not needed anymore
1 parent ba42911 commit 3edd875

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

input/src/main/scala/fix/Collectionstrawman_v0_Traversable.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ package fix
55

66
object Collectionstrawman_v0_Traversable {
77
def foo(xs: Traversable[(Int, String)], ys: List[Int]): Unit = {
8-
xs.toList
9-
xs.toSet
10-
ys.toSeq
118
xs.to[List]
129
xs.to[Set]
13-
xs.toMap
1410
xs.toIterator
1511
ys.iterator
1612
}

output/src/main/scala/fix/Collectionstrawman_v0_Traversable.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ import strawman.collection.Iterable
44
import strawman.collection.immutable.{ List, Set }
55
object Collectionstrawman_v0_Traversable {
66
def foo(xs: Iterable[(Int, String)], ys: List[Int]): Unit = {
7-
xs.to(strawman.collection.immutable.List)
8-
xs.to(strawman.collection.immutable.Set)
9-
ys.toSeq
107
xs.to(List)
118
xs.to(Set)
12-
xs.to(strawman.collection.Map)
139
xs.iterator()
1410
ys.iterator()
1511
}

rules/src/main/scala/fix/Collectionstrawman_v0.scala

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ case class Collectionstrawman_v0(index: SemanticdbIndex)
102102
)
103103
}
104104

105-
val toGenericX = SymbolMatcher.normalized(
106-
Symbol("_root_.scala.collection.TraversableOnce.toMap.")
107-
)
108-
val toImmutableX = SymbolMatcher.normalized(
109-
Symbol("_root_.scala.collection.TraversableOnce.toList."),
110-
Symbol("_root_.scala.collection.TraversableOnce.toSet.")
111-
)
112105
val toTpe = SymbolMatcher.normalized(
113106
Symbol("_root_.scala.collection.TraversableLike.to.")
114107
)
@@ -125,10 +118,6 @@ case class Collectionstrawman_v0(index: SemanticdbIndex)
125118
ctx.tree.collect {
126119
case iterator(t: Name) =>
127120
ctx.replaceTree(t, "iterator()")
128-
case toImmutableX(t @ Name(n)) =>
129-
ctx.replaceTree(t, s"to(strawman.collection.immutable.${n.stripPrefix("to")})")
130-
case toGenericX(t @ Name(n)) =>
131-
ctx.replaceTree(t, s"to(strawman.collection.${n.stripPrefix("to")})")
132121
case toTpe(n: Name) =>
133122
(for {
134123
name <- n.tokens.lastOption

0 commit comments

Comments
 (0)