-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd6eafd
commit 81a9113
Showing
8 changed files
with
127 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use std::boxed::Box; | ||
use std::rc::Rc; | ||
|
||
pub fn test(a: Rc<Rc<bool>>) {} | ||
|
||
pub fn test2(a: Rc<Box<bool>>) {} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
error: usage of `Rc<Rc<T>>` | ||
--> $DIR/rc_rc.rs:4:16 | ||
| | ||
LL | pub fn test(a: Rc<Rc<bool>>) {} | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::rc-rc` implied by `-D warnings` | ||
= help: Rc<Rc<T>> can be simplified to Rc<T> | ||
|
||
error: usage of `Rc<Box<T>>` | ||
--> $DIR/rc_rc.rs:6:17 | ||
| | ||
LL | pub fn test2(a: Rc<Box<bool>>) {} | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::rc-box` implied by `-D warnings` | ||
= help: Rc<Box<T>> can be simplified to Rc<T> | ||
|
||
error: aborting due to 2 previous errors | ||
|