You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::process::Command;fnmain(){Command::new("true").before_exec(|| {}).status().unwrap();}
shows an error saying
error[E0599]: no method named `before_exec` found for type `std::process::Command` in the current scope
--> src/main.rs:5:10
|
5 | .before_exec(|| {})
| ^^^^^^^^^^^
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
|
1 | use std::os::ext::process::CommandExt;
|
However, following that suggestions leads to a program that errors saying
error[E0433]: failed to resolve. Could not find `ext` in `os`
--> src/main.rs:2:14
|
2 | use std::os::ext::process::CommandExt;
| ^^^ Could not find `ext` in `os`
warning: unused import: `std::os::ext::process::CommandExt`
--> src/main.rs:2:5
|
2 | use std::os::ext::process::CommandExt;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
error[E0599]: no method named `before_exec` found for type `std::process::Command` in the current scope
--> src/main.rs:6:10
|
6 | .before_exec(|| {})
| ^^^^^^^^^^^
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
|
1 | use std::os::ext::process::CommandExt;
|
The text was updated successfully, but these errors were encountered:
The following program:
shows an error saying
However, following that suggestions leads to a program that errors saying
The text was updated successfully, but these errors were encountered: