diff --git a/src/changelog.rst b/src/changelog.rst index 09c9ae55..753bf222 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -28,6 +28,21 @@ Language changes in Rust 1.95.0 - Lints are outside the scope of the FLS. - `Support importing path-segment keywords with renaming `_ + + - New paragraphs: + + - :p:`fls_sUhnfV62HJrb` + - :p:`fls_QGdeRTe0H1Uc` + - :p:`fls_aam34hsRmKU2` + - :p:`fls_LV94x3HlpBWk` + + - Changed paragraphs: + + - :p:`fls_2bkcn83smy2y` + - :p:`fls_iuzvtr3oax1o` + - :p:`fls_90hQvSh7Bfyg` + - :p:`fls_RUiFQ17bmRLt` + - `Stabilize ppc inline assembly `_ - The target is outside the scope of the FLS. diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 1a9222ee..a4eeca27 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -327,7 +327,7 @@ If a :t:`simple path` appears in a :t:`use import` and starts with a :t:`path segment` expressed as either :t:`keyword` ``crate``, :t:`keyword` ``$crate``, :t:`keyword` ``self``, or :t:`keyword` ``super``, then the :t:`path` shall be the :t:`simple path prefix` of a :t:`glob import` or a -:t:`nesting import`, or the :t:`simple path` of a :t:`simple import`. +:t:`nesting import`, or the :t:`path` of a :t:`simple import`. :dp:`fls_cw006jhlboa` If a :t:`simple path` appears in a :t:`use import` and starts with a @@ -1049,9 +1049,7 @@ An :dt:`import path prefix` is the fully constructed :t:`path` prefix of a the current :t:`use import`. :dp:`fls_2bkcn83smy2y` -A :t:`simple import` is a :t:`use import` that brings all :t:`entities ` -it refers to into scope, optionally with a different -:t:`name` than they are declared with by using a :t:`renaming`. +A :dt:`simple import` is a :t:`use import` that brings a :t:`simple path` into scope, optionally with a :t:`renaming`. :dp:`fls_v3a6y2ze44v2` A :t:`glob import` is a :t:`use import` that brings all :t:`entities ` @@ -1075,7 +1073,7 @@ A :t:`glob import` brings :t:`[name]s` into :t:`scope` as follows: :dp:`fls_90hQvSh7Bfyg` A :dt:`simple import path` is the :t:`path` constructed by appending the last -:t:`path segment` of a :t:`simple import`'s :t:`simple path` to the +:t:`path segment` of the :t:`path` of the :t:`simple import` to the :t:`import path prefix`. :dp:`fls_wRmvtgQkFA6w` @@ -1116,7 +1114,7 @@ A :t:`glob import` outside of a :t:`nesting import` without a :t:`simple path prefix` is rejected, but may still be consumed by :t:`[macro]s`. :dp:`fls_RUiFQ17bmRLt` -A :t:`simple import` with a :t:`simple path` with a single :t:`path segment` of +A :t:`simple import` with a single :t:`path segment` of keyword ``self`` shall be subject to the following: * :dp:`fls_hv3xT2CjZuxc` @@ -1135,6 +1133,18 @@ same :t:`namespace` but refer to different :t:`entities ` if the If two :t:`[glob import]s` import the same :t:`entity` under the same :t:`name`, the :t:`visibility` of the :t:`name` is the most permissive one. +:dp:`fls_sUhnfV62HJrb` +When :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the keyword shall be subject to a :t:`renaming`. + +:dp:`fls_QGdeRTe0H1Uc` +When :t:`keyword` ``super`` is used to import a parent :t:`module`, the keyword shall be subject to a :t:`renaming`. + +:dp:`fls_aam34hsRmKU2` +An :t:`external prelude` cannot be imported. + +:dp:`fls_LV94x3HlpBWk` +A :t:`simple import` shall not refer to :t:`[enum variant]s` through a :t:`type alias`. + .. rubric:: Examples :dp:`fls_5dlnffim6fso` @@ -1164,8 +1174,6 @@ The following is a selective import. The imported functions are use outer_module::inner_module {crate_visible_function, visible_function} -.. rubric:: Legality Rules - .. _fls_ydmnb7qnmzzq: Shadowing diff --git a/src/glossary.rst b/src/glossary.rst index d7d53531..0a2f5654 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -4099,8 +4099,7 @@ See :s:`SimpleCStringLiteral`. simple import ^^^^^^^^^^^^^ -A :dt:`simple import` is a :t:`use import` that binds a :t:`simple path` to a -local :t:`name` by using an optional :t:`renaming`. +A :dt:`simple import` is a :t:`use import` that brings a :t:`simple path` into scope, optionally with a :t:`renaming`. See :s:`SimpleImport`.