1 error[E0609]: no field `sleep` on type `&mut S`
2 --> $DIR/issue-67971.rs:5:9
7 error[E0308]: mismatched types
8 --> $DIR/issue-67971.rs:3:24
10 LL | fn foo(ctx: &mut S) -> String {
11 | --- ^^^^^^ expected struct `String`, found `()`
13 | implicitly returns `()` as its body has no tail or `return` expression
15 error: aborting due to 2 previous errors
17 Some errors have detailed explanations: E0308, E0609.
18 For more information about an error, try `rustc --explain E0308`.