Why is this deprecation error not displayed?


#1

This does not produce any warning:

println!("{:?}", "abc".find_str("b"));

But this does:

let a = "abc".find_str("b");    
println!("{:?}", a);

Here:

src/main.rs:4:19: 4:32 warning: use of unstable library feature 'collections': use `find()` with a `&str`
src/main.rs:4     let a = "abc".find_str("b");
                                ^~~~~~~~~~~~~
src/main.rs:4:19: 4:32 help: add #![feature(collections)] to the crate attributes to silence this warning
src/main.rs:4     let a = "abc".find_str("b");
                                ^~~~~~~~~~~~~
src/main.rs:4:19: 4:32 warning: use of deprecated item: use `find()` with a `&str`, #[warn(deprecated)] on by default
src/main.rs:4     let a = "abc".find_str("b");
                                ^~~~~~~~~~~~~

#2

The stability checking currently isn’t perfectly precise in the presence of macros, and println! (well, format_args!) is a big missing piece, it currently just makes everything inside it be considered ok, including the code passed in externally.

I’m actually just now working on a patch to help improve the situation but… I’m having to track down some missing pieces.