From f96cea0de498bdbde48edbd958e0f0dfc6e3b5c3 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 15 Apr 2026 12:06:53 +0200 Subject: [PATCH 01/40] 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 02/40] 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 03/40] 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 04/40] 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 05/40] 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 06/40] 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 07/40] 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 08/40] 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 ------------------------------- From 215f85e198ad70bcfe9236faf609f8a2ee6ff31c Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 29 May 2026 11:30:14 +0200 Subject: [PATCH 09/40] clarify rule --- 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 a4eeca27..a94ce4e8 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1140,7 +1140,7 @@ When :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the cur 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. +A :t:`simple path` consisting of namespace qualifier ``::``, followed by a :t:`path segment` expressed as :t:`keyword` ``self``, shall not be used. :dp:`fls_LV94x3HlpBWk` A :t:`simple import` shall not refer to :t:`[enum variant]s` through a :t:`type alias`. From 0f2c9c16348a429b83d0de47031fe3286335c925 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 29 May 2026 11:34:41 +0200 Subject: [PATCH 10/40] extra precision 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 a94ce4e8..a8dec31c 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,7 +1134,7 @@ 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`. +When a :t:`simple path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`simple import` 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`. From d7e8007424593264405ba965ac3e914e7f1fec66 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 29 May 2026 11:39:43 +0200 Subject: [PATCH 11/40] the ranaming applies specifically to the path segment --- 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 a8dec31c..204c49ef 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,7 +1134,7 @@ 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 a :t:`simple path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`simple import` shall be subject to a :t:`renaming`. +When a :t:`simple path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`path segment` 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`. From 276507752bc4836ee64d660139fb6f2ae4b72954 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 29 May 2026 11:40:14 +0200 Subject: [PATCH 12/40] remove the overspecification --- 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 204c49ef..951ef0b5 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,7 +1134,7 @@ 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 a :t:`simple path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`path segment` shall be subject to a :t:`renaming`. +When a :t:`path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`path segment` 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`. From 857cd5e4f9af222fedbd91259f58a4a454461186 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 2 Jun 2026 15:35:04 +0200 Subject: [PATCH 13/40] re-word to match parent changes --- 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 951ef0b5..9af7569b 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1137,7 +1137,7 @@ the :t:`visibility` of the :t:`name` is the most permissive one. When a :t:`path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`path segment` 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`. +When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the :t:`path segment` shall be subject to a :t:`renaming`. :dp:`fls_aam34hsRmKU2` A :t:`simple path` consisting of namespace qualifier ``::``, followed by a :t:`path segment` expressed as :t:`keyword` ``self``, shall not be used. From 29ca7f81ca4d9b9ff38d8a2e02309f1daa553835 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 2 Jun 2026 15:56:26 +0200 Subject: [PATCH 14/40] better grammar, maybe 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 9af7569b..724def36 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1140,7 +1140,7 @@ When a :t:`path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$ When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the :t:`path segment` shall be subject to a :t:`renaming`. :dp:`fls_aam34hsRmKU2` -A :t:`simple path` consisting of namespace qualifier ``::``, followed by a :t:`path segment` expressed as :t:`keyword` ``self``, shall not be used. +A :t:`simple path` consisting of namespace qualifier ``::`` followed by a :t:`path segment` expressed as :t:`keyword` ``self`` shall not be used. :dp:`fls_LV94x3HlpBWk` A :t:`simple import` shall not refer to :t:`[enum variant]s` through a :t:`type alias`. From 542679c7e16fba2f1db7abd50d00c2ef0aa43778 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 12 Jun 2026 19:48:54 +0200 Subject: [PATCH 15/40] fix case --- 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 724def36..afbec9cb 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1096,7 +1096,7 @@ A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows: :t:`simple import` into :t:`scope`. :dp:`fls_FILuR3pfwjw3` -An :t:`Entity` imported by a :t:`simple import` subject to a +An :t:`entity` imported by a :t:`simple import` subject to a :t:`renaming` with :t:`identifier` is brought into :t:`scope` under the :t:`name` declared by the :t:`renaming`. From c57f5c6787bc0e03d4780a5266e4bc316f23da73 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 12 Jun 2026 19:56:49 +0200 Subject: [PATCH 16/40] use better terminology This matches fls_FILuR3pfwjw3, where the term "entity" is used to refer to the thing brought into scope. --- 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 afbec9cb..007dd726 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 a :t:`path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the :t:`path segment` shall be subject to a :t:`renaming`. +When a :t:`path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the imported :t:`entity` shall be subject to a :t:`renaming`. :dp:`fls_QGdeRTe0H1Uc` -When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the :t:`path segment` shall be subject to a :t:`renaming`. +When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. :dp:`fls_aam34hsRmKU2` A :t:`simple path` consisting of namespace qualifier ``::`` followed by a :t:`path segment` expressed as :t:`keyword` ``self`` shall not be used. From d6f50e9efb5eee1b023e8b5196c10a467774391f Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 13 Jun 2026 09:17:10 +0200 Subject: [PATCH 17/40] there already exists a rule definiting what the 2 keywords mean --- 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 007dd726..ebd4596a 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,7 +1134,7 @@ 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 a :t:`path segment` expressed as :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` is used to import the current :t:`crate`, the imported :t:`entity` shall be subject to a :t:`renaming`. +An import with a single :t:`path segment` of either :t:`keyword` ``crate`` or ``$crate`` shall be subject to a :t:`renaming`. :dp:`fls_QGdeRTe0H1Uc` When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. From 51e5a8d7192f286e2ca3733af35dd03cc990eacb Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 13 Jun 2026 09:35:25 +0200 Subject: [PATCH 18/40] this is a special term, so link to definition --- 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 ebd4596a..c9739f11 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,7 +1134,7 @@ 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` -An import with a single :t:`path segment` of either :t:`keyword` ``crate`` or ``$crate`` shall be subject to a :t:`renaming`. +An :t:`import ` with a single :t:`path segment` of either :t:`keyword` ``crate`` or ``$crate`` shall be subject to a :t:`renaming`. :dp:`fls_QGdeRTe0H1Uc` When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. From 106dab1985a0037f1f3b1a6a4b1fc7b69cccfa53 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 13 Jun 2026 13:32:21 +0200 Subject: [PATCH 19/40] clarity --- 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 c9739f11..8c86ca5c 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1134,7 +1134,7 @@ 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` -An :t:`import ` with a single :t:`path segment` of either :t:`keyword` ``crate`` or ``$crate`` shall be subject to a :t:`renaming`. +An :t:`import ` with a single :t:`path segment` of either :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` shall be subject to a :t:`renaming`. :dp:`fls_QGdeRTe0H1Uc` When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. From 9e87caf9562f00d766a3b562b43fe5637d7a6983 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 15 Jun 2026 19:46:55 +0200 Subject: [PATCH 20/40] `self` is more special than the other path keywords --- src/changelog.rst | 2 ++ src/entities-and-resolution.rst | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/changelog.rst b/src/changelog.rst index 14a97896..544ec528 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -34,6 +34,7 @@ Language changes in Rust 1.95.0 - :p:`fls_sUhnfV62HJrb` - :p:`fls_QGdeRTe0H1Uc` - :p:`fls_aam34hsRmKU2` + - :p:`fls_uSajfdSsbxna` - Changed paragraphs: @@ -41,6 +42,7 @@ Language changes in Rust 1.95.0 - :p:`fls_iuzvtr3oax1o` - :p:`fls_90hQvSh7Bfyg` - :p:`fls_RUiFQ17bmRLt` + - :p:`fls_opn5n5t2mo3m` - `Stabilize ppc inline assembly `_ diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 8c86ca5c..e1aeba95 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -296,9 +296,12 @@ A :t:`path` is subject to :t:`path resolution`. :dp:`fls_opn5n5t2mo3m` If a :t:`path segment` is expressed as either :t:`keyword` ``crate``, -:t:`keyword` ``$crate``, :t:`keyword` ``self``, or :t:`keyword` ``Self``, then +:t:`keyword` ``$crate``, or :t:`keyword` ``Self``, then the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`. +:dp:`fls_uSajfdSsbxna` +If a :t:`path segment` is expressed as :t:`keyword` ``self``, then the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`, except that it may also be the last :t:`path segment` of a :t:`simple import` that appears in a :t:`nesting import`. + :dp:`fls_774uryecc2sx` A :t:`path` that starts with a :t:`path segment` that is expressed as :t:`keyword` ``$crate`` shall appear only within a :t:`macro transcriber`. From c2ca8e173ec9837bf14eae3eb1a2e7f68967f540 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 15 Jun 2026 19:47:26 +0200 Subject: [PATCH 21/40] unwrap --- src/entities-and-resolution.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index e1aeba95..95f931a5 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -295,9 +295,7 @@ A :t:`path segment` is an element of a :t:`path`. A :t:`path` is subject to :t:`path resolution`. :dp:`fls_opn5n5t2mo3m` -If a :t:`path segment` is expressed as either :t:`keyword` ``crate``, -:t:`keyword` ``$crate``, or :t:`keyword` ``Self``, then -the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`. +If a :t:`path segment` is expressed as either :t:`keyword` ``crate``, :t:`keyword` ``$crate``, or :t:`keyword` ``Self``, then the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`. :dp:`fls_uSajfdSsbxna` If a :t:`path segment` is expressed as :t:`keyword` ``self``, then the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`, except that it may also be the last :t:`path segment` of a :t:`simple import` that appears in a :t:`nesting import`. From a2fd6c13f980307a8159a68329d9ae62617f4472 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 18 Jun 2026 16:53:05 +0200 Subject: [PATCH 22/40] simplify a rule --- src/changelog.rst | 6 ++++++ src/entities-and-resolution.rst | 16 +--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 544ec528..9af42234 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -44,6 +44,12 @@ Language changes in Rust 1.95.0 - :p:`fls_RUiFQ17bmRLt` - :p:`fls_opn5n5t2mo3m` + - Removed paragraphs: + + - :p:`fls_cw006jhlboa` + - :p:`fls_hv3xT2CjZuxc` + - :p:`fls_Pxc0Ts8Y7pfW` + - `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 95f931a5..617f6b02 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -330,12 +330,6 @@ If a :t:`simple path` appears in a :t:`use import` and starts with a :t:`path` shall be the :t:`simple path prefix` of a :t:`glob import` or a :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 -:t:`path segment` expressed as :t:`keyword` ``self``, then the :t:`path` shall -be part of the :s:`UseImportContent` of a :t:`nesting import` as long as the -:t:`path` is a :t:`single segment path`. - :dp:`fls_kv5bpq8rf1j9` A :t:`simple path` is subject to :t:`simple path resolution`. @@ -1115,15 +1109,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 single :t:`path segment` of -keyword ``self`` shall be subject to the following: - -* :dp:`fls_hv3xT2CjZuxc` - It shall either appear in a :t:`nesting import` with a non-empty - :t:`import path prefix`, or - -* :dp:`fls_Pxc0Ts8Y7pfW` - It shall be subject to a :t:`renaming`. +A :t:`simple import` with a single :t:`path segment` of :t:`keyword` ``self`` shall be subject to a :t:`renaming`. :dp:`fls_wB3fVglLOqbZ` It is a static error if two :t:`[glob import]s` import the same :t:`name` in the From 8724822d72aa60c6a08865afa33e462ab4f6431d Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 18 Jun 2026 16:54:42 +0200 Subject: [PATCH 23/40] move import renaming rules closer together --- src/entities-and-resolution.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 617f6b02..31873fca 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1108,9 +1108,6 @@ A :t:`nesting import` is a :t:`use import` that provides a common 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 single :t:`path segment` of :t:`keyword` ``self`` shall be subject to a :t:`renaming`. - :dp:`fls_wB3fVglLOqbZ` It is a static error if two :t:`[glob import]s` import the same :t:`name` in the same :t:`namespace` but refer to different :t:`entities ` if the @@ -1120,6 +1117,9 @@ 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_RUiFQ17bmRLt` +A :t:`simple import` with a single :t:`path segment` of :t:`keyword` ``self`` shall be subject to a :t:`renaming`. + :dp:`fls_sUhnfV62HJrb` An :t:`import ` with a single :t:`path segment` of either :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` shall be subject to a :t:`renaming`. From 8bc4ab2933cfcd8c211b04feede5bd33c0d5825f Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 18 Jun 2026 19:52:57 +0200 Subject: [PATCH 24/40] update the super import rule --- src/changelog.rst | 1 + src/entities-and-resolution.rst | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 9af42234..6811f1f4 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -43,6 +43,7 @@ Language changes in Rust 1.95.0 - :p:`fls_90hQvSh7Bfyg` - :p:`fls_RUiFQ17bmRLt` - :p:`fls_opn5n5t2mo3m` + - :p:`fls_7k88ypcgaoff` - Removed paragraphs: diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 31873fca..8fb669e8 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -305,10 +305,7 @@ A :t:`path` that starts with a :t:`path segment` that is expressed as :t:`keyword` ``$crate`` shall appear only within a :t:`macro transcriber`. :dp:`fls_7k88ypcgaoff` -If a :t:`path segment` is expressed as :t:`keyword` ``super``, then the -:t:`path segment` shall either be the first :t:`path segment` of a :t:`path`, -or the previous :t:`path segment` of the :t:`path` shall also be expressed as -:t:`keyword` ``super``. +If a :t:`path segment` is expressed as :t:`keyword` ``super``, then each :t:`path segment` that precedes it in the :t:`path` shall be expressed as :t:`keyword` ``super``, except that the first :t:`path segment` of the :t:`path` may be expressed as :t:`keyword` ``self``. :dp:`fls_7kb6ltajgiou` A :t:`global path` is a :t:`path` that starts with :t:`namespace qualifier` From 001ba7440c553790951e6c9ece0c4ad82a503791 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 19 Jun 2026 19:16:35 +0200 Subject: [PATCH 25/40] global path: add a new rule and expand an existing one --- src/changelog.rst | 1 + src/entities-and-resolution.rst | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/changelog.rst b/src/changelog.rst index 6811f1f4..93500af8 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -35,6 +35,7 @@ Language changes in Rust 1.95.0 - :p:`fls_QGdeRTe0H1Uc` - :p:`fls_aam34hsRmKU2` - :p:`fls_uSajfdSsbxna` + - :p:`fls_aam34hsRmKU2` - Changed paragraphs: diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 8fb669e8..51e1a4fc 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -311,6 +311,9 @@ If a :t:`path segment` is expressed as :t:`keyword` ``super``, then each :t:`pat A :t:`global path` is a :t:`path` that starts with :t:`namespace qualifier` ``::``. +:dp:`fls_P6dFw89ZDKv2` +The first :t:`path segment` of a :t:`global path` shall be expressed as an :t:`identifier` whose :t:`name` matches the :t:`name` of a :t:`candidate external prelude entity`. + :dp:`fls_n77icl6idazp` A :t:`simple path` is a :t:`path` whose :t:`[path segment]s` consist of either :t:`[identifier]s` or certain :t:`[keyword]s` as defined in the syntax rules @@ -1124,7 +1127,7 @@ An :t:`import ` with a single :t:`path segment` of either :t:`keywor When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. :dp:`fls_aam34hsRmKU2` -A :t:`simple path` consisting of namespace qualifier ``::`` followed by a :t:`path segment` expressed as :t:`keyword` ``self`` shall not be used. +A :t:`global path` where any of its :t:`[path segment]s` are expressed as any of the :t:`[keyword]s`, ``self``, ``super``, ``crate``, and ``$crate``, shall not be used. :dp:`fls_LV94x3HlpBWk` A :t:`simple import` shall not refer to :t:`[enum variant]s` through a :t:`type alias`. From f237bce8863892ab064854863bf4859b610d15f8 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 23 Jun 2026 09:53:14 +0200 Subject: [PATCH 26/40] consistency 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 51e1a4fc..3cf2ffd0 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1118,7 +1118,7 @@ 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_RUiFQ17bmRLt` -A :t:`simple import` with a single :t:`path segment` of :t:`keyword` ``self`` shall be subject to a :t:`renaming`. +A :t:`simple import` with a single :t:`path segment` expressed as :t:`keyword` ``self`` shall be subject to a :t:`renaming`. :dp:`fls_sUhnfV62HJrb` An :t:`import ` with a single :t:`path segment` of either :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` shall be subject to a :t:`renaming`. From 9170045861d9e0134c0c3aeb5a2444d348f0ec67 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 23 Jun 2026 09:54:20 +0200 Subject: [PATCH 27/40] be more precise, and consistent 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 3cf2ffd0..ca05a6e0 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1121,7 +1121,7 @@ the :t:`visibility` of the :t:`name` is the most permissive one. A :t:`simple import` with a single :t:`path segment` expressed as :t:`keyword` ``self`` shall be subject to a :t:`renaming`. :dp:`fls_sUhnfV62HJrb` -An :t:`import ` with a single :t:`path segment` of either :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` shall be subject to a :t:`renaming`. +A :t:`use import` with a single :t:`path segment` expressed as either :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` shall be subject to a :t:`renaming`. :dp:`fls_QGdeRTe0H1Uc` When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. From 56129b0f79c55724520d3c9476e3c6ebbad97a3e Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 24 Jun 2026 16:52:05 +0200 Subject: [PATCH 28/40] use more precise terminology, and removed what is already a separate rule --- 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 ca05a6e0..e77b69c3 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1044,7 +1044,7 @@ An :dt:`import path prefix` is the fully constructed :t:`path` prefix of a the current :t:`use import`. :dp:`fls_2bkcn83smy2y` -A :dt:`simple import` is a :t:`use import` that brings a :t:`simple path` into scope, optionally with a :t:`renaming`. +A :dt:`simple import` is a :t:`use import` that bring an :t:`entity` selected by its :t:`simple import path`, or by its :t:`import path prefix` when its :t:`simple path` ends in :t:`keyword` ``self`` and it appears in a :t:`nesting import`, into :t:`scope`. :dp:`fls_v3a6y2ze44v2` A :t:`glob import` is a :t:`use import` that brings all :t:`entities ` From e3a53f6e70b585a1105f268c60c4b16f3cb19c84 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 24 Jun 2026 19:22:20 +0200 Subject: [PATCH 29/40] use consistent terminology, and flatten list Here we are avoiding "simple path" in favor of "path segment" --- src/changelog.rst | 3 +++ src/entities-and-resolution.rst | 13 ++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 93500af8..ecc486c1 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -45,12 +45,15 @@ Language changes in Rust 1.95.0 - :p:`fls_RUiFQ17bmRLt` - :p:`fls_opn5n5t2mo3m` - :p:`fls_7k88ypcgaoff` + - :dp:`fls_yY58pFpkig9o` + - :dp:`fls_ar03D5rxjzy0` - Removed paragraphs: - :p:`fls_cw006jhlboa` - :p:`fls_hv3xT2CjZuxc` - :p:`fls_Pxc0Ts8Y7pfW` + - :p:`fls_kz2Gij5wHXnl` - `Stabilize ppc inline assembly `_ diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index e77b69c3..3f48cb7e 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1074,16 +1074,11 @@ A :dt:`simple import path` is the :t:`path` constructed by appending the last :dp:`fls_wRmvtgQkFA6w` A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows: -* :dp:`fls_kz2Gij5wHXnl` - If the :t:`simple path` is keyword ``self`` and: +* :dp:`fls_yY58pFpkig9o` + If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then bring the :t:`entity` in :t:`type namespace` that the :t:`import path prefix` resolves to into :t:`scope`. - * :dp:`fls_yY58pFpkig9o` - The :t:`simple import` is in a :t:`nesting import`, then bring the - :t:`entity` in :t:`type namespace` that the :t:`import path prefix` resolves - to into :t:`scope`. - - * :dp:`fls_ar03D5rxjzy0` - Otherwise bring the containing :t:`module` into :t:`scope`. +* :dp:`fls_ar03D5rxjzy0` + If the :t:`simple path` is :t:`keyword` ``self``, then bring the containing :t:`module` into :t:`scope`. * :dp:`fls_ce73bg0BqV1X` Otherwise bring all :t:`entities ` that the :t:`simple import path` From 55ab2bc4259aa87bbe1a6efa203b8fcd29eeee27 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 24 Jun 2026 19:58:21 +0200 Subject: [PATCH 30/40] be more consistent and complete It's not just traits that are affected --- src/entities-and-resolution.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 3f48cb7e..61f85a82 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1091,9 +1091,7 @@ An :t:`entity` imported by a :t:`simple import` subject to a :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`. +An :t:`entity` 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 From e43764837b51ea1d1275be2935372207955d63e1 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 25 Jun 2026 10:31:04 +0200 Subject: [PATCH 31/40] fix grammar and be more precise --- 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 61f85a82..c6c52994 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1044,7 +1044,7 @@ An :dt:`import path prefix` is the fully constructed :t:`path` prefix of a the current :t:`use import`. :dp:`fls_2bkcn83smy2y` -A :dt:`simple import` is a :t:`use import` that bring an :t:`entity` selected by its :t:`simple import path`, or by its :t:`import path prefix` when its :t:`simple path` ends in :t:`keyword` ``self`` and it appears in a :t:`nesting import`, into :t:`scope`. +A :dt:`simple import` is a :t:`use import` that brings into :t:`scope` an :t:`entity` selected by its :t:`simple import path`, or by its :t:`import path prefix` when its :t:`simple path` ends in :t:`keyword` ``self`` and the :t:`simple path` appears in a :t:`nesting import`. :dp:`fls_v3a6y2ze44v2` A :t:`glob import` is a :t:`use import` that brings all :t:`entities ` From 65a5da61eec9dd49e8e26dfb59ea0c40aa784d8d Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 25 Jun 2026 10:58:35 +0200 Subject: [PATCH 32/40] improve wording 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 c6c52994..c773ac11 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1075,7 +1075,7 @@ A :dt:`simple import path` is the :t:`path` constructed by appending the last A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows: * :dp:`fls_yY58pFpkig9o` - If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then bring the :t:`entity` in :t:`type namespace` that the :t:`import path prefix` resolves to into :t:`scope`. + If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the :t:`entity` that the :t:`import path prefix` resolves to in :t:`scope` of the :t:`type namespace`. * :dp:`fls_ar03D5rxjzy0` If the :t:`simple path` is :t:`keyword` ``self``, then bring the containing :t:`module` into :t:`scope`. From 90feab24916425aec5383d42a2c0ccbcd2691368 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 25 Jun 2026 11:00:16 +0200 Subject: [PATCH 33/40] whitespace --- 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 c773ac11..28478ef5 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1075,7 +1075,7 @@ A :dt:`simple import path` is the :t:`path` constructed by appending the last A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows: * :dp:`fls_yY58pFpkig9o` - If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the :t:`entity` that the :t:`import path prefix` resolves to in :t:`scope` of the :t:`type namespace`. + If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the :t:`entity` that the :t:`import path prefix` resolves to in :t:`scope` of the :t:`type namespace`. * :dp:`fls_ar03D5rxjzy0` If the :t:`simple path` is :t:`keyword` ``self``, then bring the containing :t:`module` into :t:`scope`. From d261d1c418a449c0629a4c6540795d782dd9c875 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 25 Jun 2026 11:00:58 +0200 Subject: [PATCH 34/40] fix markup --- src/changelog.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index ecc486c1..60fb4d55 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -45,8 +45,8 @@ Language changes in Rust 1.95.0 - :p:`fls_RUiFQ17bmRLt` - :p:`fls_opn5n5t2mo3m` - :p:`fls_7k88ypcgaoff` - - :dp:`fls_yY58pFpkig9o` - - :dp:`fls_ar03D5rxjzy0` + - :p:`fls_yY58pFpkig9o` + - :p:`fls_ar03D5rxjzy0` - Removed paragraphs: From ed408f722289a8c42ebf0969fe351d4ceae586a3 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 25 Jun 2026 11:08:54 +0200 Subject: [PATCH 35/40] be more precise, and consistent 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 28478ef5..c7ec69c4 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1078,7 +1078,7 @@ A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows: If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the :t:`entity` that the :t:`import path prefix` resolves to in :t:`scope` of the :t:`type namespace`. * :dp:`fls_ar03D5rxjzy0` - If the :t:`simple path` is :t:`keyword` ``self``, then bring the containing :t:`module` into :t:`scope`. + If the :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the containing :t:`module` into :t:`scope`. * :dp:`fls_ce73bg0BqV1X` Otherwise bring all :t:`entities ` that the :t:`simple import path` From f6cf2fce5c0816a6e585f8ca552e14c7c2915921 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Thu, 25 Jun 2026 11:10:27 +0200 Subject: [PATCH 36/40] much better wording 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 c7ec69c4..8521f5be 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -298,7 +298,7 @@ A :t:`path` is subject to :t:`path resolution`. If a :t:`path segment` is expressed as either :t:`keyword` ``crate``, :t:`keyword` ``$crate``, or :t:`keyword` ``Self``, then the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`. :dp:`fls_uSajfdSsbxna` -If a :t:`path segment` is expressed as :t:`keyword` ``self``, then the :t:`path segment` shall be the first :t:`path segment` of a :t:`path`, except that it may also be the last :t:`path segment` of a :t:`simple import` that appears in a :t:`nesting import`. +If a :t:`path segment` is expressed as :t:`keyword` ``self``, then the :t:`path segment` shall be either the first :t:`path segment` of a :t:`path`, or the last :t:`path segment` of a :t:`simple import` that appears in a :t:`nesting import`. :dp:`fls_774uryecc2sx` A :t:`path` that starts with a :t:`path segment` that is expressed as From 57ceb2fa962ce348555a927ea4afac464306c2e7 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 29 Jun 2026 18:39:16 +0200 Subject: [PATCH 37/40] re-word --- 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 8521f5be..442b5970 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1111,7 +1111,7 @@ 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_RUiFQ17bmRLt` -A :t:`simple import` with a single :t:`path segment` expressed as :t:`keyword` ``self`` shall be subject to a :t:`renaming`. +When a :t:`path segment` expressed as :t:`keyword` ``self`` is used to import the current :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. :dp:`fls_sUhnfV62HJrb` A :t:`use import` with a single :t:`path segment` expressed as either :t:`keyword` ``crate`` or :t:`keyword` ``$crate`` shall be subject to a :t:`renaming`. From 70947a6edbab34462ba0286bc2cd7f25adceddf2 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 29 Jun 2026 18:58:55 +0200 Subject: [PATCH 38/40] fix rule that is overly broad --- 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 442b5970..6c163ac0 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1120,7 +1120,7 @@ A :t:`use import` with a single :t:`path segment` expressed as either :t:`keywor When a :t:`path segment` expressed as :t:`keyword` ``super`` is used to import a parent :t:`module`, the imported :t:`entity` shall be subject to a :t:`renaming`. :dp:`fls_aam34hsRmKU2` -A :t:`global path` where any of its :t:`[path segment]s` are expressed as any of the :t:`[keyword]s`, ``self``, ``super``, ``crate``, and ``$crate``, shall not be used. +A :t:`simple import` whose :t:`import path prefix` consists only of :t:`namespace qualifier` ``::`` and whose :t:`simple path` consists of a single :t:`path segment` expressed as :t:`keyword` ``self`` shall not be used. :dp:`fls_LV94x3HlpBWk` A :t:`simple import` shall not refer to :t:`[enum variant]s` through a :t:`type alias`. From 4332f41477ca1be94d55dd069d54dc2443063643 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 29 Jun 2026 19:25:16 +0200 Subject: [PATCH 39/40] re-word --- 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 6c163ac0..5287e460 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -1075,7 +1075,7 @@ A :dt:`simple import path` is the :t:`path` constructed by appending the last A :t:`simple import` brings :t:`[name]s` into :t:`scope` as follows: * :dp:`fls_yY58pFpkig9o` - If the :t:`simple import` appears in a :t:`nesting import`, and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the :t:`entity` that the :t:`import path prefix` resolves to in :t:`scope` of the :t:`type namespace`. + If the :t:`simple import` appears in a :t:`nesting import` and the last :t:`path segment` of its :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the :t:`entity` in :t:`type namespace` that the :t:`import path prefix` resolves to into :t:`scope`. * :dp:`fls_ar03D5rxjzy0` If the :t:`simple path` is expressed as :t:`keyword` ``self``, then the :t:`simple import` brings the containing :t:`module` into :t:`scope`. From 79aefcbd298729a14cdd5a152156f02e59580ae8 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 30 Jun 2026 18:56:22 +0200 Subject: [PATCH 40/40] rename "simple path prefix" to "common path prefix" Makes things more clear, given that "path prefix" means something rather different. Also, remove the glossary entry since the plan is auto-generate it. --- src/changelog.rst | 14 ++++++++------ src/entities-and-resolution.rst | 20 ++++++++++---------- src/glossary.rst | 8 -------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 60fb4d55..f2a3c17d 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -66,15 +66,17 @@ Language changes in Rust 1.95.0 - `Make operational semantics of pattern matching independent of crate and module `_ -FLS corrections ---------------- +FLS fixes/improvements +---------------------- + +- Changed paragraph: :p:`fls_1941wid94hlg` -Changed paragraph: :p:`fls_1941wid94hlg` +- New paragraphs: -New paragraphs: + - :p:`fls_CSuxTkwR96j9` + - :p:`fls_LV94x3HlpBWk` -- :p:`fls_CSuxTkwR96j9` -- :p:`fls_LV94x3HlpBWk` +- Replace the term "simple path prefix" with "common path prefix", to improve clarity. Language changes in Rust 1.94.0 ------------------------------- diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 5287e460..b3647c55 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -327,7 +327,7 @@ A :dt:`path prefix` is a :t:`path` with its last :t:`path segment` and 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:`path` shall be the :t:`common path prefix` of a :t:`glob import` or a :t:`nesting import`, or the :t:`path` of a :t:`simple import`. :dp:`fls_kv5bpq8rf1j9` @@ -991,15 +991,15 @@ Use Imports | SimpleImport GlobImport ::= - SimplePathPrefix? $$*$$ + CommonPathPrefix? $$*$$ NestingImport ::= - SimplePathPrefix? $${$$ UseImportContentList? $$}$$ + CommonPathPrefix? $${$$ UseImportContentList? $$}$$ SimpleImport ::= SimplePath Renaming? - SimplePathPrefix ::= + CommonPathPrefix ::= SimplePath? $$::$$ UseImportContentList ::= @@ -1013,7 +1013,7 @@ A :t:`use import` brings :t:`entities ` :t:`in scope` within the :t:`use import` resides. :dp:`fls_sxo1jb25pl8a` -A :t:`simple path prefix` is the leading :t:`simple path` of a :t:`glob import` +A :dt:`common path prefix` is the leading :t:`simple path` of a :t:`glob import` or a :t:`nesting import`. :dp:`fls_WAA4WmohGu6T` @@ -1031,15 +1031,15 @@ An :dt:`import path prefix` is the fully constructed :t:`path` prefix of a * :dp:`fls_2UyFcB6Our1v` If the :t:`use import` is a :t:`glob import` then start with the - :t:`[path segment]s` of the :t:`glob import`'s :t:`simple path prefix`. + :t:`[path segment]s` of the :t:`glob import`'s :t:`common path prefix`. * :dp:`fls_irdKqoYzBM0M` If the :t:`use import` is a :t:`nesting import` then start with the - :t:`[path segment]s` of the :t:`nesting import`'s :t:`simple path prefix`. + :t:`[path segment]s` of the :t:`nesting import`'s :t:`common path prefix`. #. :dp:`fls_gAWsqibl4GLq` Then if the current :t:`use import` is the child of a :t:`nesting import`, - prepend the :t:`nesting import`'s :t:`simple path prefix` to the + prepend the :t:`nesting import`'s :t:`common path prefix` to the :t:`import path prefix`. Repeat this step with the :t:`nesting import` as the current :t:`use import`. @@ -1095,10 +1095,10 @@ An :t:`entity` imported by a :t:`simple import` subject to a :t:`renaming` with :dp:`fls_ldr7tsuqw34s` A :t:`nesting import` is a :t:`use import` that provides a common -:t:`simple path prefix` for its nested :t:`[use import]s`. +:t:`common path prefix` for its nested :t:`[use import]s`. :dp:`fls_iNUBX5fJAI1N` -A :t:`glob import` outside of a :t:`nesting import` without a :t:`simple path +A :t:`glob import` outside of a :t:`nesting import` without a :t:`common path prefix` is rejected, but may still be consumed by :t:`[macro]s`. :dp:`fls_wB3fVglLOqbZ` diff --git a/src/glossary.rst b/src/glossary.rst index 0a2f5654..883a17cf 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -4111,14 +4111,6 @@ A :dt:`simple path` is a :t:`path` whose :t:`[path segment]s` consist of either See :s:`SimplePath`. -simple path prefix -^^^^^^^^^^^^^^^^^^ - -A :dt:`simple path prefix` is the leading :t:`simple path` of a -:t:`glob import` or a :t:`nesting import`. - -See :s:`SimplePathPrefix`. - simple path public modifier ^^^^^^^^^^^^^^^^^^^^^^^^^^^