Mam naprawdę prostą funkcję kota napisaną w rdzy 1.0 alpha.Co to jest # [warn (unstable)] w Rust?
use std::io;
fn main(){
let mut reader = io::stdin();
loop {
let input = reader.read_line().ok().expect("Failed to read line");
print!("{}", input);
}
}
Kiedy go skompilować, otrzymuję następujące ostrzeżenia:
bindings.rs:5:26: 5:35 warning: use of unstable item, #[warn(unstable)] on by default
bindings.rs:5 let mut reader = io::stdin();
^~~~~~~~~
bindings.rs:6:28: 6:39 warning: use of unstable item, #[warn(unstable)] on by default
bindings.rs:6 let input = reader.read_line().ok().expect("Failed to read line");
^~~~~~~~~~~
Czy istnieje sposób, aby rozwiązać te ostrzeżenia?
Nie jest, to z powodu kodu. :-) – Shepmaster
To odpowiada potencjalnemu ostrzeżeniu o wycofaniu, ale tam, gdzie zastąpienie nie zostało jeszcze zaimplementowane. Jak zmiękczyć takie ostrzeżenia? – dhardy
Aby odpowiedzieć na moje pytanie: '#! [Allow (unstable)]' robi lewę. – dhardy