atomic::Ordering: Get rid of misleading parts of intro
Remove the parts of atomic::Ordering's intro that wrongly claimed that
SeqCst prevents all reorderings around it.
Closes#55196
This is a (minimal) alternative to #55233.
I also wonder if it would be worth adding at least some warnings that atomics are often a footgun/hard to use correctly, similarly like `mem::transmute` or other functions have.
avoid features_untracked
The docs say to not use `features_untracked` when we have a tcx.
@oli-obk any particular reason why the untracked version is used all over const qualification?
bootstrap: clean up a few clippy findings
remove useless format!()s
remove redundant field names in a few struct initializations
pass slice instead of a vector to a function
use is_empty() instead of comparisons to .len()
No functional change intended.
`pretty_print` takes a `Token` and `match`es on it. But the particular
`Token` kind is known at each call site, so this commit splits it into
five functions: `pretty_print_eof`, `pretty_print_begin`, etc.
This commit also does likewise with `print`, though there is one
callsite for `print` where the `Token` kind isn't known, so a generic
`print` has to stay (but it now just calls out to the various `print_*`
functions).
`Printer::word` takes a `&str` and converts it into a `String`, which
causes an allocation. But that allocation is rarely necessary, because
`&str` is almost always a `&'static str` or a `String` that won't be
used again.
This commit changes `Token::String` so it holds a `Cow<'static, str>`
instead of a `String`, which avoids a lot of allocations.
Fix alignment of stores to scalar pair
The alignment for the second element of a scalar pair is not the same as for the first element, make sure it is calculated correctly. This fixes#56267.
r? @eddyb
set to zero meant that the nested list was squished up against
subsequent list items/paragraphs
this changes the bottom margin to .6em, same as for paragraphs
an example demonstrating the difference with screenshots is given in the
pull request
The alignment for the second element of a scalar pair is not the
same as for the first element. Make sure it is computed correctly
based on the element size.
submodules: update clippy from 754b4c07 to b2601beb
Changes:
````
Fix NAIVE_BYTECOUNT applicability
Fix dogfood error
Change Applicability of MISTYPED_LITERAL_SUFFIX
Add applicability level to (nearly) every span_lint_and_sugg function
Update stderr file
Fix bugs and improve documentation
Add Applicability::Unspecified to span_lint_and_sugg functions
Introduce snippet_with_applicability and hir_with_applicability functions
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
constants: add u128 i128 builtin types and fix outdated url
Update lints
Lint only the first statment/expression after alloc
Fix some warnings related to Self
Rename some symbols
Split lint into slow and unsafe vector initalization
Add unsafe set_len initialization
Add slow zero-filled vector initialization lint
Travis: Remove `sudo: false`
Downgrade needless_pass_by_value to allow by default
````
Changes:
````
Fix NAIVE_BYTECOUNT applicability
Fix dogfood error
Change Applicability of MISTYPED_LITERAL_SUFFIX
Add applicability level to (nearly) every span_lint_and_sugg function
Update stderr file
Fix bugs and improve documentation
Add Applicability::Unspecified to span_lint_and_sugg functions
Introduce snippet_with_applicability and hir_with_applicability functions
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
constants: add u128 i128 builtin types and fix outdated url
Update lints
Lint only the first statment/expression after alloc
Fix some warnings related to Self
Rename some symbols
Split lint into slow and unsafe vector initalization
Add unsafe set_len initialization
Add slow zero-filled vector initialization lint
Travis: Remove `sudo: false`
Downgrade needless_pass_by_value to allow by default
````