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 11 pull requests #101074

Merged
merged 28 commits into from
Aug 27, 2022
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
152c851
Make forward compatibility lint deprecated_cfg_attr_crate_type_name d…
est31 Jul 26, 2022
8998024
Correct test-args to compiletest on Windows
czzrr Aug 19, 2022
6a1f7af
Use direct pointer to filter_dirs function
est31 Aug 23, 2022
0a6af98
Simplify unicode_downloads.rs
est31 Aug 23, 2022
754b3e7
Change hint to correct path
est31 Aug 23, 2022
a788650
Remove some documentation duplicated between `writeln!` and `write!`
joshtriplett Aug 24, 2022
3c8618f
Update `write!` docs: can now import traits as `_` to avoid conflicts
joshtriplett Aug 24, 2022
589db1f
Expand example to show how to implement qualified trait names
joshtriplett Aug 24, 2022
ae937cc
Clarify comment to fit `as _` better
joshtriplett Aug 24, 2022
ad93272
Stabilize `const_ptr_offset_from`.
fee1-dead Apr 20, 2022
69ad634
Do not include `const_ptr_sub_ptr` in this stabilization
fee1-dead May 12, 2022
e7b7f88
rustdoc: omit start/end tags for empty item description blocks
notriddle Aug 26, 2022
832fd23
rustdoc: remove unused CSS for `hidden-by-*-hider`
notriddle Aug 26, 2022
25eb52f
rustdoc: remove incorrect CSS selector `.impl-items table td`
notriddle Aug 26, 2022
20012ea
Merge implementations of HIR fn_decl and fn_sig.
cjgillot Aug 22, 2022
52582d3
rustdoc: remove empty extern_crates and type="text/javascript" on script
notriddle Aug 26, 2022
a74f453
Merge duplicated CSS rules
GuillaumeGomez Aug 26, 2022
539e408
Rollup merge of #96240 - fee1-dead-contrib:stabilize_const_offset_fro…
JohnTitor Aug 27, 2022
134cc2d
Rollup merge of #99784 - est31:deny_cfg_attr_crate_type_name, r=Mark-…
JohnTitor Aug 27, 2022
7214f0c
Rollup merge of #100811 - czzrr:master, r=Mark-Simulacrum
JohnTitor Aug 27, 2022
e31bedc
Rollup merge of #100924 - est31:closure_to_fn_ptr, r=Mark-Simulacrum
JohnTitor Aug 27, 2022
f4d4a40
Rollup merge of #100953 - joshtriplett:write-docs, r=Mark-Simulacrum
JohnTitor Aug 27, 2022
6ccad25
Rollup merge of #101018 - notriddle:notriddle/item-right-docblock-sho…
JohnTitor Aug 27, 2022
84f5ccd
Rollup merge of #101044 - notriddle:notriddle/css-hidden-by, r=jsha
JohnTitor Aug 27, 2022
0cad274
Rollup merge of #101046 - notriddle:notriddle/table-css, r=jsha
JohnTitor Aug 27, 2022
aa6b750
Rollup merge of #101057 - cjgillot:one-fn-sig, r=compiler-errors
JohnTitor Aug 27, 2022
bdbbbe6
Rollup merge of #101062 - notriddle:notriddle/text-javascript, r=Guil…
JohnTitor Aug 27, 2022
bd89372
Rollup merge of #101063 - GuillaumeGomez:merge-duplicated-css, r=notr…
JohnTitor Aug 27, 2022
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
Expand example to show how to implement qualified trait names
  • Loading branch information
joshtriplett committed Aug 24, 2022
commit 589db1f73af1837d633024c297abbe36074d4aca
17 changes: 17 additions & 0 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,23 @@ macro_rules! r#try {
/// }
/// ```
///
/// If you also need the trait names themselves, such as to implement one or both on your types,
/// import the containing module and then name them with a prefix:
///
/// ```
/// # #![allow(unused_imports)]
/// use std::fmt::{self, Write as _};
/// use std::io::{self, Write as _};
///
/// struct Example;
///
/// impl fmt::Write for Example {
/// fn write_str(&mut self, _s: &str) -> core::fmt::Result {
/// unimplemented!();
/// }
/// }
/// ```
///
/// Note: This macro can be used in `no_std` setups as well.
/// In a `no_std` setup you are responsible for the implementation details of the components.
///
Expand Down