From 240c818667df5df236e7fd741b274151446cfa62 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 15 Apr 2026 12:06:53 +0200 Subject: [PATCH 1/3] 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 a073e3e3b1931a0300a8fd8e5e31198839ce3f40 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 15 Apr 2026 16:49:38 +0200 Subject: [PATCH 2/3] 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 09c9ae55..d738a8e7 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 0b31ecc72d8cfe10af1bb4c443537eabccbeaad8 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Tue, 21 Apr 2026 17:31:59 +0200 Subject: [PATCH 3/3] 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.