mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Auto merge of #6298 - JohnTitor:fix-example, r=llogiq
Fix `await_holding_refcell_ref` examples for clarify - Remove redundant `()` - Fix variable name changelog: none
This commit is contained in:
commit
5effc99812
@ -65,8 +65,8 @@ declare_clippy_lint! {
|
||||
/// use std::cell::RefCell;
|
||||
///
|
||||
/// async fn foo(x: &RefCell<u32>) {
|
||||
/// let b = x.borrow_mut()();
|
||||
/// *ref += 1;
|
||||
/// let mut y = x.borrow_mut();
|
||||
/// *y += 1;
|
||||
/// bar.await;
|
||||
/// }
|
||||
/// ```
|
||||
@ -77,8 +77,8 @@ declare_clippy_lint! {
|
||||
///
|
||||
/// async fn foo(x: &RefCell<u32>) {
|
||||
/// {
|
||||
/// let b = x.borrow_mut();
|
||||
/// *ref += 1;
|
||||
/// let mut y = x.borrow_mut();
|
||||
/// *y += 1;
|
||||
/// }
|
||||
/// bar.await;
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user