Sign in
rust
/
rust-lang
/
rust
/
refs/heads/try
/
.
/
tests
/
ui
/
lint
/
must_not_suspend
/
mutex.rs
blob: d14f7130b4cfff81285e025fd48c4d19e061d46c [
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 `MutexGuard` held across
other
().
await
;
}
fn
main
()
{
}