diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 76d9b0b7..76af7e0c 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -944,8 +944,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 ` of the :t:`[crate]s` imported using external :t:`[crate import]s` or supplied by a tool. If the external -:t:`crate import` uses a :t:`renaming`, then the :t:`identifier of the -`:t:`renaming` is instead added to the :t:`external prelude`. The core +:t:`crate import` uses a :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``. @@ -1124,8 +1124,8 @@ keyword ``self`` shall be subject to the following: :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 :t:`name` is -used or :t:`shadowed `. +same :t:`namespace` but refer to different :t:`entities ` if the +:t:`name` is used or :t:`shadowed `. :dp:`fls_zmYSBW995kSN` If two :t:`[glob import]s` import the same :t:`entity` under the same :t:`name`, @@ -1474,8 +1474,8 @@ operand` of the:t:`call expression` :t:`under resolution`. From then on, the :t:`candidate callee type chain` #. :dp:`fls_TWR5GIUxPcaJ` - If the :t:`candidate call type` is a :t:`callee type`, then the :t:`callee - type` of the :t:`call expression` is that :t:`candidate call type` and + If the :t:`candidate callee type` is a :t:`callee type`, then the :t:`callee + type` of the :t:`call expression` is that :t:`candidate callee type` and :t:`call resolution` stops. .. _fls_i6qzga6dyaee: diff --git a/src/expressions.rst b/src/expressions.rst index d639916d..9464d08f 100644 --- a/src/expressions.rst +++ b/src/expressions.rst @@ -260,7 +260,7 @@ involve :t:`[type]s` that require :t:`destruction`: * :dp:`fls_e0a1e8ddph7` :t:`[Type cast expression]s` that are not :t:`[pointer-to-address cast]s`, - :t:`[function-pointer-to-address cast]s`, and :t:`[unsized cast]s` that + :t:`[function-pointer-to-address cast]s`, and :t:`[unsized coercion]s` that involve a :t:`trait object type`, * :dp:`fls_zcuzhw7qkzkr` @@ -2053,12 +2053,16 @@ A :t:`type cast expression` with the following characteristics performs a * :dp:`fls_133j6xw8k4qe` An :t:`operand` of a :t:`function pointer type` and a :t:`target type` ``*const V`` or ``*mut V`` where ``V`` implements the - :std:`core::marker::Sized` :t:`trait` perform function-pointer-to-pointer - cast. + :std:`core::marker::Sized` :t:`trait` perform + :dt:`function-pointer-to-pointer cast`. * :dp:`fls_bhw2j9wjpf2x` An :t:`operand` of a :t:`function pointer type` and a target :t:`integer type` - perform function-pointer-to-address cast. + perform :t:`function-pointer-to-address` cast. A + :dt:`function-pointer-to-address cast` produces an integer that represents the + machine address of the referenced :t:`function`. If the :t:`integer type` is + smaller than the size of the :t:`function pointer type`, the address is + truncated. :dp:`fls_3ww5gbk9w4ys` A :t:`cast` is legal when it either performs :t:`type coercion` or is a @@ -4924,7 +4928,7 @@ the :t:`capturing expression` and it is defined outside of the :t:`Capture mode` is the mechanism by which a :t:`capture target` is captured. :dp:`fls_O6WYL8AUyPje` -A :t:`captured` :t:`capture target` with :t:`capture mode` :dt:`by copy capture` +A :t:`captured` :t:`capture target` with :t:`capture mode` :dt:`by value capture` :t:`passes ` the :t:`value` of the :t:`capture target` into the :t:`capturing environment`. diff --git a/src/glossary.rst b/src/glossary.rst index 8f7f83b0..3ff1ae06 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -1070,6 +1070,16 @@ A :dt:`call operand` is the :t:`function` being invoked or the :dp:`fls_w6wu4wi6srjj` See :s:`CallOperand`. +.. _fls_zSh4enFjxeaN: + +call resolution +^^^^^^^^^^^^^^^ + +:dp:`fls_fS1ZjGGypvbn` +:dt:`Call resolution` is a kind of :t:`resolution` that applies to a +:t:`call expression`. + + .. _fls_AK8mL1LeftO0: call site hygiene diff --git a/src/types-and-traits.rst b/src/types-and-traits.rst index 2c4e4fe2..710369cc 100644 --- a/src/types-and-traits.rst +++ b/src/types-and-traits.rst @@ -1348,7 +1348,7 @@ and always a power of two. A :t:`value` of :t:`alignment` ``N`` is stored at an address that is a multiple of ``N``. :dp:`fls_1pbwigq6f3ha` -The :t:`size` of a :t:`value` is the offset in bytes between successive elements +The :t:`size` of a :t:`type` is the offset in bytes between successive elements in :t:`array type` ``[T, N]`` where ``T`` is the :t:`type` of the :t:`value`, including any padding for :t:`alignment`. :t:`Size` is a multiple of the :t:`alignment`. @@ -1416,6 +1416,10 @@ For a :t:`closure type`, the :t:`layout` is tool-defined. For a :t:`thin pointer`, the :t:`size` and :t:`alignment` are those of :t:`type` :c:`usize`. +:dp:`fls_nrqG8i3fmpm4` +For a :t:`function pointer type`, the :t:`size` and :t:`alignment` are those of +a :c:`thin pointer`. + :dp:`fls_e5hivr6m5s3h` For a :t:`fat pointer`, the :t:`size` and :t:`alignment` are tool-defined, but are at least those of a :t:`thin pointer`.