Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest version #3

Merged
merged 272 commits into from
Dec 11, 2024
Merged

latest version #3

merged 272 commits into from
Dec 11, 2024

Conversation

Tiger0202
Copy link
Owner

No description provided.

don't capitalize Undefined Behavior
This rewrites std_links for two major changes:

- Uses pulldown_cmark to parse the markdown instead of using regular
  expressions. The RegEx approach was just too unreliable.
- Call rustdoc only once, instead of once per chapter. The overhead of
  calling rustdoc is significant, and calling it for each chapter was
  extremely slow.

  Unfortunately the error messages are a little worse now, since it
  doesn't show which chapter a bad link came from. I'm uncertain how to
  make that better.
This should speed things up a little, particularly when working locally.
This removes the explicit links to the standard library. In particular,
this makes it nicer to view locally since you can set SPEC_RELATIVE=0 to
make the links work.

There are a bunch of changes to the actual URL because rustdoc resolves
re-exports to link to the original definition instead of the re-export
site. From what I can tell, everything should otherwise be the same.

Not all links were able to be converted due to some limitations in
rustdoc, such as:

- Links to rexports from std_arch don't work due to rust-lang/rust#96506.
- Links to keywords aren't supported.
- Links to trait impls where the trait is not in the prelude doesn't work (they must be in scope).
In this commit, we improve some verbiage.
There were some errors in the formatting and the content of the
grammar for unsafe attributes.  Let's fix those.
Let's describe unsafe attributes in the chapter on unsafety.
The _Attr_ production is used for `cfg_attr` attribute and the `meta`
macro fragment specifier, and those need to accept the new `unsafe`
syntax.
This will be required in 2024.
It's better to allocate for the smaller prefix that we're extracting
than to allocate repeatedly for the tail items, especially as
`split_off` doesn't shrink the capacity of what we go on to insert.
Rewrite the automatic std link translation, and switch to automatic links
Tweak `repr(transparent)` to mention requiring *at most* one non-1-ZST
bytes inside implicitly const-promoted expressions are immutable
Say that `pub(in path)` can't depend on `use` statements
This updates some more references to the "default" representation and
instead refers to it directly as the "Rust" representation. This is
intended to more consistently refer to the same concept.
Update lifetimes for pre-expansion validation
Update some "default" representation references
trait object constraint correction
Add s390x to inline-assembly documentation
Add three more WebAssembly features to the list of accepted ones
Add Arm64EC to inline-assembly documentation
Explaining how to link mixed C/Rust binaries.
I think that it could have some potential confusion since it isn't
displayed in the text that these are overflowing, and it requires
an extra layer of reasoning needed to understand how it translates.
Add examples to clarify the casting rules
This is just for navigation, these aren't specific rules.
These are some misc rule name changes. Some of them are to give the
rules more specific names (indicating what they do, instead of using
generic terms).

The `allowed-positions` name is intended to be used for all attributes
to have a specific rule that defines where an attribute may be used. It
is not consistently used, yet. Also, some of the paragraphs mix "where
it goes" with "what it does" that should probably be teased apart so
that we can label those independently.

I expect us to do some more cleanup to bring some consistency to the
attribute rules since there are a lot of attributes, and they generally
have the same requirements of what needs to be specified.
This is keeping in line with using plurals throughout the rest of the
naming convention. This also differentiates it from the `diagnostic`
namespace. The `diagnostic` namespace remains singular, and is not
nested with the plural `diagnostics` just to avoid the repetition.
…utes

Add identifiers to attributes.md and its subchapters
@Tiger0202 Tiger0202 merged commit 4bd3e6e into Gankra-patch-1 Dec 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant