Sign in
rust
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
lint
/
must_not_suspend
/
mutex.rs
blob: 8dd4cc176151785a4a545ef95c8c5c236bc85534 [
file
] [
log
] [
blame
] [
edit
]
//@ edition:2018
#![
feature
(
must_not_suspend
)]
#![
deny
(
must_not_suspend
)]
async
fn
other
()
{}
pub
async
fn
uhoh
(
m
:
std
::
sync
::
Mutex
<()>)
{
let
_guard
=
m
.
lock
().
unwrap
();
//~ ERROR `std::sync::MutexGuard` held across
other
().
await
;
}
fn
main
()
{
}