Skip to content

Commit 1488c64

Browse files
jrudolphneko-kai
authored andcommitted
docs: convert _ to * in Importing Givens
1 parent 09ac695 commit 1488c64

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/docs/reference/contextual/given-imports.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object B:
2727
...
2828
```
2929

30-
Generally, a normal wildcard selector `_` brings all definitions other than givens or extensions into scope
30+
Generally, a normal wildcard selector `*` brings all definitions other than givens or extensions into scope
3131
whereas a `given` selector brings all givens (including those resulting from extensions) into scope.
3232

3333
There are two main benefits arising from these rules:
@@ -90,11 +90,11 @@ normal imports to givens and given imports.
9090
The following modifications avoid this hurdle to migration.
9191

9292
1. A `given` import selector also brings old style implicits into scope. So, in Scala 3.0
93-
an old-style implicit definition can be brought into scope either by a `_` or a `given` wildcard selector.
93+
an old-style implicit definition can be brought into scope either by a `*` or a `given` wildcard selector.
9494

95-
2. In Scala 3.1, old-style implicits accessed through a `_` wildcard import will give a deprecation warning.
95+
2. In Scala 3.1, old-style implicits accessed through a `*` wildcard import will give a deprecation warning.
9696

97-
3. In some version after 3.1, old-style implicits accessed through a `_` wildcard import will give a compiler error.
97+
3. In some version after 3.1, old-style implicits accessed through a `*` wildcard import will give a compiler error.
9898

9999
These rules mean that library users can use `given` selectors to access old-style implicits in Scala 3.0,
100100
and will be gently nudged and then forced to do so in later versions. Libraries can then switch to

0 commit comments

Comments
 (0)