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

Rollup of 10 pull requests #122039

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d74d67c
Implement async closure signature deduction
compiler-errors Mar 1, 2024
e71f207
Add new Tier-3 target: `loongarch64-unknown-linux-musl`
heiher Jun 5, 2023
aa1ab01
tests: Add loongarch64-unknown-linux-musl target
heiher Mar 1, 2024
374607d
const_eval_select: make it safe but be careful with what we expose on…
RalfJung Mar 2, 2024
d858809
typo
RalfJung Mar 2, 2024
4dbd256
Explain use of display adapters
CAD97 Feb 14, 2024
215a4b6
doc wording improvements
CAD97 Mar 5, 2024
b5d7da8
Decouple `DummyAstNode` and `DummyResult`.
nnethercote Mar 1, 2024
a9dff2d
Remove unused `impl DummyAstNode for Block`.
nnethercote Mar 1, 2024
c98be32
Stop using Bubble in coherence and instead emulate it with an intercr…
oli-obk Feb 28, 2024
960dd38
will_wake tests fail on Miri and that is expected
RalfJung Mar 5, 2024
8dd126d
Change some attributes to only_local.
surechen Mar 5, 2024
f391c07
only set noalias on Box with the global allocator
RalfJung Mar 5, 2024
8255618
Update src/doc/rustc/src/platform-support.md
wesleywiser Mar 5, 2024
5a16aeb
Remove some dead code
oli-obk Mar 5, 2024
4d0a71b
Rollup merge of #121065 - CAD97:display-i18n, r=cuviper
matthiaskrgr Mar 5, 2024
74b281f
Rollup merge of #121744 - oli-obk:eager_opaque_checks2, r=lcnr
matthiaskrgr Mar 5, 2024
a73b7e6
Rollup merge of #121829 - nnethercote:dummy-tweaks-2, r=petrochenkov
matthiaskrgr Mar 5, 2024
d2a2350
Rollup merge of #121832 - heiher:loongarch64-musl, r=wesleywiser
matthiaskrgr Mar 5, 2024
d54254e
Rollup merge of #121857 - compiler-errors:async-closure-signature-ded…
matthiaskrgr Mar 5, 2024
dcdb2c3
Rollup merge of #121894 - RalfJung:const_eval_select, r=oli-obk
matthiaskrgr Mar 5, 2024
59ada09
Rollup merge of #122014 - surechen:change_attributes_to_local_2024030…
matthiaskrgr Mar 5, 2024
2af5b05
Rollup merge of #122016 - RalfJung:will_wake, r=dtolnay
matthiaskrgr Mar 5, 2024
8f0b1e4
Rollup merge of #122018 - RalfJung:box-custom-alloc, r=oli-obk
matthiaskrgr Mar 5, 2024
776afd3
Rollup merge of #122028 - oli-obk:drop_in_place_leftovers, r=compiler…
matthiaskrgr Mar 5, 2024
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
Prev Previous commit
Next Next commit
Explain use of display adapters
CAD97 committed Mar 5, 2024
commit 4dbd2562b4e2c464218a2949442becad34d55955
17 changes: 17 additions & 0 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
@@ -633,6 +633,23 @@ pub use macros::Debug;
/// [tostring]: ../../std/string/trait.ToString.html
/// [tostring_function]: ../../std/string/trait.ToString.html#tymethod.to_string
///
/// # Internationalization
///
/// Because a type only has one `Display` implementation, it is often preferable
/// to only implement `Display` when there is a single most "obvious" way that
/// values can be formatted as text. This could mean formatting according to the
/// "invariant" culture and "undefined" locale, or it could mean that the type
/// display is designed for a specific culture/locale, such as developer logs.
///
/// If not all values have a justifiably canonical textual format or if you want
/// to support alternative formats not covered by the standard set of possible
/// [formatting traits], the most flexible approach is display adapters: methods
/// like [`str::escape_default`] or [`Path::display`] which create a wrapper
/// implementing `Display` to output the specific display format.
///
/// [formatting traits]: ../../std/fmt/index.html#formatting-traits
/// [`Path::display`]: ../../std/path/struct.Path.html#method.display
///
/// # Examples
///
/// Implementing `Display` on a type: