From f96cea0de498bdbde48edbd958e0f0dfc6e3b5c3 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 15 Apr 2026 12:06:53 +0200 Subject: [PATCH 1/8] stray --- src/entities-and-resolution.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 1a9222ee..f2670fbf 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1164,8 +1164,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 From 655bbe31f51443cef921ede9dbe44e1b935c6d6a Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 15 Apr 2026 16:49:38 +0200 Subject: [PATCH 2/8] document missing import restrictions --- src/changelog.rst | 8 ++++++++ src/entities-and-resolution.rst | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 8ea20f53..219838c7 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -28,6 +28,14 @@ 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` + - `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 f2670fbf..232b0288 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1135,6 +1135,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 using :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` to import the current :t:`crate`, you must use a :t:`renaming` to define the :t:`binding` name. + +:dp:`fls_QGdeRTe0H1Uc` +When using :t:`keyword` ``super`` to import a parent :t:`module`, you must use :t:`renaming` to define the :t:`binding` name. + +:dp:`fls_aam34hsRmKU2` +An :t:`external prelude` cannot be imported. + +:dp:`fls_LV94x3HlpBWk` +A :t:`simple import` cannot refer to :t:`[enum variant]s` through a :t:`type alias`. + .. rubric:: Examples :dp:`fls_5dlnffim6fso` From f18f69d50ef0a8af056a35cbfe5acd73ffdcecd6 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 21 Apr 2026 17:31:59 +0200 Subject: [PATCH 3/8] be more formal --- src/entities-and-resolution.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 232b0288..9482a9be 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1136,10 +1136,10 @@ 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 using :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` to import the current :t:`crate`, you must use a :t:`renaming` to define the :t:`binding` name. +When :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, a :t:`renaming` must be used to define the :t:`binding` name. :dp:`fls_QGdeRTe0H1Uc` -When using :t:`keyword` ``super`` to import a parent :t:`module`, you must use :t:`renaming` to define the :t:`binding` name. +When :t:`keyword` ``super`` is used to import a parent :t:`module`, a :t:`renaming` must be used to define the :t:`binding` name. :dp:`fls_aam34hsRmKU2` An :t:`external prelude` cannot be imported. From d02ce01dcbb9f6e118d08a0303d940747602f5cb Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 6 May 2026 18:27:33 +0200 Subject: [PATCH 4/8] use normative language > this is a requirement aimed at the programmer, not a fact of the conforming tool Co-authored-by: Hristian Kirtchev <60669983+kirtchev-adacore@users.noreply.github.com> --- src/entities-and-resolution.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 9482a9be..85f2d5a6 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1145,7 +1145,7 @@ When :t:`keyword` ``super`` is used to import a parent :t:`module`, a :t:`renami An :t:`external prelude` cannot be imported. :dp:`fls_LV94x3HlpBWk` -A :t:`simple import` cannot refer to :t:`[enum variant]s` through a :t:`type alias`. +A :t:`simple import` shall not refer to :t:`[enum variant]s` through a :t:`type alias`. .. rubric:: Examples From f69dd3da6364894a3ba0337b67cc580913fca166 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 8 May 2026 15:15:47 +0200 Subject: [PATCH 5/8] make "simple import" definition more clear, and fix one in main text --- src/changelog.rst | 4 ++++ src/entities-and-resolution.rst | 4 +--- src/glossary.rst | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 219838c7..315ad4fb 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -36,6 +36,10 @@ Language changes in Rust 1.95.0 - :p:`fls_aam34hsRmKU2` - :p:`fls_LV94x3HlpBWk` + - Changed paragraphs: + + - :p:`fls_2bkcn83smy2y` + - `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 85f2d5a6..4a52933c 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -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 ` 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`. From 91092bf953a5df09b71f2c6608d08c200b38432d Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 8 May 2026 15:42:14 +0200 Subject: [PATCH 6/8] use more simple sentences --- src/changelog.rst | 3 +++ src/entities-and-resolution.rst | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 315ad4fb..f1952dfd 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -39,6 +39,9 @@ Language changes in Rust 1.95.0 - Changed paragraphs: - :p:`fls_2bkcn83smy2y` + - :p:`fls_iuzvtr3oax1o` + - :p:`fls_90hQvSh7Bfyg` + - :p:`fls_RUiFQ17bmRLt` - `Stabilize ppc inline assembly `_ diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 4a52933c..e95890b4 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 @@ -1073,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` @@ -1114,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` From 2b56a0b6e53214bf533fef079b4b82f18e10cf93 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 8 May 2026 15:55:56 +0200 Subject: [PATCH 7/8] match existing style --- src/entities-and-resolution.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index e95890b4..a4eeca27 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,10 +1134,10 @@ 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`, a :t:`renaming` must be used to define the :t:`binding` name. +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`, a :t:`renaming` must be used to define the :t:`binding` name. +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. From 9c70941741b6247a77d912021c7211d56eca1401 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 13 May 2026 19:48:23 +0200 Subject: [PATCH 8/8] this fills a prior gap --- src/changelog.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index f1952dfd..14a97896 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -34,7 +34,6 @@ Language changes in Rust 1.95.0 - :p:`fls_sUhnfV62HJrb` - :p:`fls_QGdeRTe0H1Uc` - :p:`fls_aam34hsRmKU2` - - :p:`fls_LV94x3HlpBWk` - Changed paragraphs: @@ -59,7 +58,10 @@ FLS corrections Changed paragraph: :p:`fls_1941wid94hlg` -New paragraph: :p:`fls_CSuxTkwR96j9` +New paragraphs: + +- :p:`fls_CSuxTkwR96j9` +- :p:`fls_LV94x3HlpBWk` Language changes in Rust 1.94.0 -------------------------------