Skip to content

Commit

Permalink
Describe underscore renames
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Aug 9, 2023
1 parent 3655870 commit 6e08967
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion shared
Submodule shared updated 1 files
+41 −41 requirements.txt
13 changes: 9 additions & 4 deletions src/entities-and-resolution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,8 @@ The :dt:`core prelude` is a :t:`prelude` that brings :t:`in scope` of every
An :dt:`external prelude` is a :t:`prelude` that brings :t:`in scope` of the
:t:`crate root module` the :t:`entities <entity>` of the :t:`[crate]s` imported
using external :t:`[crate import]s`. If the external :t:`crate import` uses a
:t:`renaming`, then the :t:`renaming` is instead added to the
:t:`external prelude`. The core :t:`crate` is always added to the
:t:`renaming`, then the :t:`identifier of the `:t:`renaming` is instead added to
the :t:`external prelude`. The core :t:`crate` is always added to the
:t:`external prelude` unless the :t:`crate root` is subject to :t:`attribute`
``no_core``.

Expand Down Expand Up @@ -1091,8 +1091,13 @@ A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows:

:dp:`fls_FILuR3pfwjw3`
An :t:`Entity` imported by a :t:`simple import` subject to a
:t:`renaming` is brought into :t:`scope` under the :t:`name` declared by the
renaming.
:t:`renaming` with :t:`identifier` is brought into :t:`scope` under the
:t:`name` declared by the :t:`renaming`.

:dp:`fls_iQOgxNihUEr7`
A :t:`trait` imported by a :t:`simple import` subject to a
:t:`renaming` with character underscore ``_`` is added into :t:`scope` without
a :t:`name`.

:dp:`fls_ldr7tsuqw34s`
A :t:`nesting import` is a :t:`use import` that provides a common
Expand Down
6 changes: 3 additions & 3 deletions src/program-structure-and-compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ A :t:`crate import` binds an external :t:`crate` to its :t:`crate indication`.
:t:`Crate indication` ``self`` shall require a :t:`renaming`.

:dp:`fls_siv8bl6s2ndu`
A :t:`crate import` with a :t:`renaming` binds the external :t:`crate` to
a local :t:`name` and introduces the local :t:`name` into the enclosing
:t:`scope`.
A :t:`crate import` with a :t:`renaming` with an :t:`identifier` binds the
external :t:`crate` to a local :t:`name` and introduces the local :t:`name` into
the enclosing :t:`scope`.

:dp:`fls_7vz5n3x6jo1s`
If a :t:`crate import` appears at the :t:`crate root module`, then the
Expand Down

0 comments on commit 6e08967

Please sign in to comment.