-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
244 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# SPDX-License-Identifier: MIT OR Apache-2.0 | ||
# SPDX-FileCopyrightText: The Ferrocene Developers | ||
|
||
from docutils import nodes | ||
from sphinx.transforms import SphinxTransform, SortIds | ||
|
||
|
||
# Sphinx by default sorts all ids of the form `id[0-9]+` to the end. | ||
# Our IDs are section name and fls_ id pairs, so in some cases this transform | ||
# will instead sort the section name to the back, but not always! | ||
# So we overwrite the transform instead so that our fls ids are sorted to the back. | ||
# In addition to that we normalize them, as sphinx turns the `_` in `fls_{id}` | ||
# into `fls-{id}` which can break the link check from working correctly. | ||
class FerroceneSortIds(SphinxTransform): | ||
# Run this step after sphinx sorted. | ||
default_priority = SortIds.default_priority + 1 | ||
|
||
def apply(self): | ||
for node in self.document.findall(nodes.section): | ||
for n, id in enumerate(node["ids"]): | ||
node["ids"][n] = normalize_fls_id(id) | ||
# sort the fls id to the back | ||
if len(node["ids"]) > 1 and node["ids"][0].startswith("fls_"): | ||
node["ids"] = node["ids"][1:] + [node["ids"][0]] | ||
|
||
|
||
class NormalizeFlsReferences(SphinxTransform): | ||
default_priority = 500 | ||
|
||
def apply(self): | ||
for reference in self.document.findall(nodes.reference): | ||
if "internal" not in reference or not reference["internal"]: | ||
continue | ||
if "refuri" not in reference or "#" not in reference["refuri"]: | ||
continue | ||
path, hash = reference["refuri"].rsplit("#", 1) | ||
reference["refuri"] = f"{path}#{normalize_fls_id(hash)}" | ||
|
||
|
||
def normalize_fls_id(id): | ||
if id.startswith("fls-"): | ||
return id.replace("fls-", "fls_", 1) | ||
else: | ||
return id | ||
|
||
|
||
def setup(app): | ||
app.add_transform(FerroceneSortIds) | ||
app.add_post_transform(NormalizeFlsReferences) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
.. SPDX-License-Identifier: MIT OR Apache-2.0 | ||
SPDX-FileCopyrightText: The Ferrocene Developers | ||
.. default-domain:: spec | ||
.. informational-page:: | ||
|
||
FLS Changelog | ||
============= | ||
|
||
This page describes the changes that have been applied to the FLS itself to | ||
address changes and new features introduced in each Rust release. Every item | ||
listed in the "Language" section of the release note is reproduced here, along | ||
with the change that has been applied due to it. | ||
|
||
.. caution:: | ||
|
||
This page is **not** an exhaustive list of all of the changes in a release, | ||
just the language changes that had an impact to the FLS. See the `release | ||
notes`_ for a full list of changes. | ||
|
||
Language changes in Rust 1.79.0 | ||
------------------------------- | ||
|
||
* `Stabilize inline \`const {}\` expressions. <https://github.com/rust-lang/rust/pull/104087/>`_ | ||
|
||
* New section: :ref:`fls_G59PiNQkVUnQ` | ||
|
||
* `Prevent opaque types being instantiated twice with different regions within the same function. <https://github.com/rust-lang/rust/pull/116935/>`_ | ||
|
||
* No change: already described in :p:`fls_hza5n5eb18ta` | ||
|
||
* `Stabilize WebAssembly target features that are in phase 4 and 5. <https://github.com/rust-lang/rust/pull/117457/>`_ | ||
|
||
* No change: ``cfg`` and ``cfg_attr`` configuration predicates are not part of the FLS | ||
|
||
* `Add the \`redundant_lifetimes\` lint to detect lifetimes which are semantically redundant. <https://github.com/rust-lang/rust/pull/118391/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Stabilize the \`unnameable_types\` lint for public types that can't be named. <https://github.com/rust-lang/rust/pull/120144/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Enable debuginfo in macros, and stabilize \`-C collapse-macro-debuginfo\` and \`#[collapse_debuginfo]\`. <https://github.com/rust-lang/rust/pull/120845/>`_ | ||
|
||
* New section: :ref:`fls_qyudjGHZfyJH` | ||
|
||
* `Propagate temporary lifetime extension into \`if\` and \`match\` expressions. <https://github.com/rust-lang/rust/pull/121346/>`_ | ||
|
||
* New paragraphs: :p:`fls_Rj9zhVutfQod`, :p:`fls_oodpp3LpXC13`, :p:`fls_xGThCPoTUSAi` | ||
|
||
* `Restrict promotion of \`const fn\` calls. <https://github.com/rust-lang/rust/pull/121557/>`_ | ||
|
||
* No change: already described in :p:`fls_3h5vr7xk2rrt` | ||
|
||
* `Warn against refining impls of crate-private traits with \`refining_impl_trait\` lint. <https://github.com/rust-lang/rust/pull/121720/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Stabilize associated type bounds (RFC 2289). <https://github.com/rust-lang/rust/pull/122055/>`_ | ||
|
||
* New paragraph: :p:`fls_mcUMWsYcxzmZ` | ||
|
||
* `Stabilize importing \`main\` from other modules or crates. <https://github.com/rust-lang/rust/pull/122060/>`_ | ||
|
||
* No change: this lifted restriction was not previously described in the FLS | ||
|
||
* While updating the FLS to account for this feature, we realized that the | ||
way the FLS described crate types was incorrect. We rectified this: | ||
|
||
* New section: :ref:`fls_8JB3SJqamdpU` | ||
* New glossary entry: :t:`crate type` | ||
* New paragraphs: :p:`fls_unxalgMqIr3v`, :p:`fls_e7jGvXvTsFpC`, :p:`fls_kQiJPwb2Hjcc`, :p:`fls_OyFwBtDGVimT` | ||
* Updated glossary entries: :t:`binary crate`, :t:`proc-macro crate` | ||
* Updated paragraphs: :p:`fls_9ub6ks8qrang`, :p:`fls_Mf62VqAhoZ3c` | ||
* Moved paragraph: :p:`fls_sbGnkm8Ephiu` | ||
* Removed paragraph about library crates | ||
|
||
* `Check return types of function types for well-formedness <https://github.com/rust-lang/rust/pull/115538>`_ | ||
|
||
* No change: the exact trait resolution implementation is not part of the FLS | ||
|
||
* `Rework \`impl Trait\` lifetime inference <https://github.com/rust-lang/rust/pull/116891/>`_ | ||
|
||
* No change: capturing of lifestime within ``impl Trait`` types is not described in the FLS | ||
|
||
* `Change inductive trait solver cycles to be ambiguous <https://github.com/rust-lang/rust/pull/122791>`_ | ||
|
||
* No change: the exact trait solver is not part of the FLS | ||
|
||
Language changes in Rust 1.78.0 | ||
------------------------------- | ||
|
||
* `Stabilize \`#[cfg(target_abi = ...)]\` <https://github.com/rust-lang/rust/pull/119590/>`_ | ||
|
||
* No change: ``cfg`` and ``cfg_attr`` configuration predicates are not part of the FLS | ||
|
||
* `Stabilize the \`#[diagnostic]\` namespace and \`#[diagnostic::on_unimplemented]\` attribute <https://github.com/rust-lang/rust/pull/119888/>`_ | ||
|
||
* No change: tool attributes are not part of the FLS | ||
|
||
* `Make async-fn-in-trait implementable with concrete signatures <https://github.com/rust-lang/rust/pull/120103/>`_ | ||
|
||
* No change: no paragraph in the FLS forbids this prior incompatability | ||
|
||
* `Make matching on NaN a hard error, and remove the rest of \`illegal_floating_point_literal_pattern\` <https://github.com/rust-lang/rust/pull/116284/>`_ | ||
|
||
* New paragraph: :p:`fls_JP8YSbxSN0Ym` | ||
|
||
* `static mut: allow mutable reference to arbitrary types, not just slices and arrays <https://github.com/rust-lang/rust/pull/117614/>`_ | ||
|
||
* No change: this lifted restriction was not previously described in the FLS | ||
|
||
* `Extend \`invalid_reference_casting\` to include references casting to bigger memory layout <https://github.com/rust-lang/rust/pull/118983/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Add \`non_contiguous_range_endpoints\` lint for singleton gaps after exclusive ranges <https://github.com/rust-lang/rust/pull/118879/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Add \`wasm_c_abi\` lint for use of older wasm-bindgen versions <https://github.com/rust-lang/rust/pull/117918/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Update \`indirect_structural_match\` and \`pointer_structural_match\` lints to match RFC <https://github.com/rust-lang/rust/pull/120423/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Make non-\`PartialEq\`-typed consts as patterns a hard error <https://github.com/rust-lang/rust/pull/120805/>`_ | ||
|
||
* No change: already described in :p:`fls_zCswsyuitexI` | ||
|
||
* `Split \`refining_impl_trait\` lint into \`_reachable\`, \`_internal\` variants <https://github.com/rust-lang/rust/pull/121720/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Remove unnecessary type inference when using associated types inside of higher ranked \`where\`-bounds <https://github.com/rust-lang/rust/pull/119849>`_ | ||
|
||
* No change: the FLS does not specify type inference to such a degree | ||
|
||
* `Weaken eager detection of cyclic types during type inference <https://github.com/rust-lang/rust/pull/119989>`_ | ||
|
||
* No change: the FLS does not specify type inference to such a degree | ||
|
||
* `\`trait Trait: Auto {}\`: allow upcasting from \`dyn Trait\` to \`dyn Trait + Auto\` <https://github.com/rust-lang/rust/pull/119338>`_ | ||
|
||
language changes in Rust 1.77.0 | ||
------------------------------- | ||
|
||
* `Reveal opaque types within the defining body for exhaustiveness checking. <https://github.com/rust-lang/rust/pull/116821/>`_ | ||
|
||
* No change: the FLS does not specify introspection of the concrete type of the match expression scrutinee to such a degree | ||
|
||
* `Stabilize C-string literals. <https://github.com/rust-lang/rust/pull/117472/>`_ | ||
|
||
* New section: :ref:`fls_U1gHCy16emVe` | ||
|
||
* `Stabilize THIR unsafeck. <https://github.com/rust-lang/rust/pull/117673/>`_ | ||
|
||
* No change: not a language change | ||
|
||
* `Add lint \`static_mut_refs\` to warn on references to mutable statics. <https://github.com/rust-lang/rust/pull/117556/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Support async recursive calls (as long as they have indirection). <https://github.com/rust-lang/rust/pull/117703/>`_ | ||
|
||
* No change: this lifted restriction was not previously described in the FLS | ||
|
||
* `Undeprecate lint \`unstable_features\` and make use of it in the compiler. <https://github.com/rust-lang/rust/pull/118639/>`_ | ||
|
||
* No change: lints are not part of the FLS | ||
|
||
* `Make inductive cycles in coherence ambiguous always. <https://github.com/rust-lang/rust/pull/118649/>`_ | ||
|
||
* No change: the FLS does not describe the trait solver to such a degree | ||
|
||
* `Get rid of type-driven traversal in const-eval interning <https://github.com/rust-lang/rust/pull/119044/>`_, only as a `future compatibility lint <https://github.com/rust-lang/rust/pull/122204>`_ for now. | ||
|
||
* No change: this lifted restriction was not previously described in the FLS | ||
|
||
* `Deny braced macro invocations in let-else. <https://github.com/rust-lang/rust/pull/119062/>`_ | ||
|
||
* New paragraph: :p:`fls_1s1UikGU5YQb` | ||
|
||
.. Note: for the publicly rendered version of the FLS we want to link to | ||
upstream's release notes. In the Ferrocene subtree this should be replaced | ||
to the link to the Ferrocene release notes! | ||
.. _release notes: https://doc.rust-lang.org/releases.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters