forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop considering moved-out locals when computing auto traits for gene…
…rators
- Loading branch information
1 parent
1dedae4
commit dddb7cf
Showing
3 changed files
with
89 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// check-pass | ||
// edition:2021 | ||
|
||
use core::marker::PhantomData; | ||
|
||
struct B(PhantomData<*const ()>); | ||
|
||
fn do_sth(_: &B) {} | ||
|
||
async fn foo() {} | ||
|
||
async fn test() { | ||
let b = B(PhantomData); | ||
do_sth(&b); | ||
drop(b); | ||
foo().await; | ||
} | ||
|
||
fn assert_send<T: Send>(_: T) {} | ||
|
||
fn main() { | ||
assert_send(test()); | ||
} |