Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ Language changes in Rust 1.95.0
- The target is outside the scope of the FLS.

- `const-eval: be more consistent in the behavior of padding during typed copies <https://github.com/rust-lang/rust/pull/148967>`_

New paragraphs:

- :p:`fls_LmPbrh0Cba8g`
- :p:`fls_nwgIMLkvD2Ol`
- :p:`fls_hOIImCr1c6IF`

- `Const blocks are no longer evaluated to determine if expressions involving fallible operations can implicitly be constant-promoted <https://github.com/rust-lang/rust/pull/150557>`_
- `Make operational semantics of pattern matching independent of crate and module <https://github.com/rust-lang/rust/pull/150681>`_

Expand Down
3 changes: 3 additions & 0 deletions src/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ control reaches the invocation of :t:`macro` :std:`core::panic`.
It is a static error if the evaluation of a :t:`constant expression` results in
a :t:`value` that is unaligned.

:dp:`fls_hOIImCr1c6IF`
In a :t:`constant context`, it is undefined behavior to convert a :t:`pointer` that has :t:`provenance` into a non-pointer type.
Comment thread
tshepang marked this conversation as resolved.
Outdated

.. rubric:: Dynamic Semantics

:dp:`fls_tg0kya5125jt`
Expand Down
6 changes: 6 additions & 0 deletions src/values.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ The :t:`expression` of a :t:`constant initializer` shall be a
The value of a :t:`constant` is determined by evaluating its
:t:`constant initializer`.

:dp:`fls_LmPbrh0Cba8g`
The representation of the value of a :t:`constant initializer` or :t:`static initializer` must only contain bytes with :t:`provenance` where all bytes of some original :t:`pointer` are in the correct order.
Comment thread
tshepang marked this conversation as resolved.
Outdated

:dp:`fls_nwgIMLkvD2Ol`
:dt:`Provenance` is the memory that a :t:`pointer` has permission to access, the timespan during which it can acesss that memory, and if it can access the memory for writes.
Copy link
Copy Markdown
Contributor

@kirtchev-adacore kirtchev-adacore Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this definition from? To me, "provenance" is a property (of something, TBD). According to Merriam-Webster, "provenance" is the origin or source, or the history of ownership.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://doc.rust-lang.org/stable/core/ptr/index.html#provenance

maybe I should just call it pointer provenance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bigger risk here is not just where this definition came from, but that it commits FLS to a general provenance model that the upstream Reference text did not define in these PRs. The local wording reads more like a paraphrase of pointer access permissions, while the neighboring rules are about bytes carrying provenance and fragments of an original pointer value. Would it be safer to avoid defining provenance locally unless we have upstream wording to anchor it, or else narrow the term explicitly to the byte-level notion needed by this rule?


.. rubric:: Dynamic Semantics

:dp:`fls_xezt9hl069h4`
Expand Down
Loading