-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
future_prelude_collision
false positive
- Loading branch information
1 parent
a1411de
commit bf0da44
Showing
2 changed files
with
23 additions
and
0 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
16 changes: 16 additions & 0 deletions
16
src/test/ui/rust-2021/future-prelude-collision-unneeded.rs
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,16 @@ | ||
// edition:2018 | ||
// check-pass | ||
#![allow(unused)] | ||
#![deny(future_prelude_collision)] | ||
|
||
struct S; | ||
|
||
impl S { | ||
fn try_into(self) -> S { S } | ||
} | ||
|
||
// See https://github.com/rust-lang/rust/issues/86633 | ||
fn main() { | ||
let s = S; | ||
let s2 = s.try_into(); | ||
} |