While updating an old crate of mine, I noticed that the beta and nightly compiler is complaining about my use of .as_ref() on a String type.
herman@titan ~/projects/hal-rs !! rustup override set nightly
info: using existing install for 'nightly-x86_64-apple-darwin'
info: override toolchain for '/Users/herman/projects/hal-rs' set to 'nightly-x86_64-apple-darwin'
nightly-x86_64-apple-darwin unchanged - rustc 1.13.0-nightly (aef6971ca 2016-08-17)
herman@titan ~/projects/hal-rs !! cargo test
Compiling rustc-serialize v0.3.16
Compiling hal v0.0.6 (file:///Users/herman/projects/hal-rs)
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
--> src/resource.rs:47:52
|
47 | resource.add_link(link_key.as_ref(), &link);
| ^^^^^^
error: aborting due to previous error
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
--> src/resource.rs:47:52
|
47 | resource.add_link(link_key.as_ref(), &link);
| ^^^^^^
Build failed, waiting for other jobs to finish...
error: aborting due to previous error
error: Could not compile `hal`.
Here is the line of code: https://github.com/hjr3/hal-rs/blob/9328a992a41d5a0239bd95282a7b4ecf17a3d2e3/src/resource.rs#L47
I know how to fix the error, but i am surprised to see code that compiles on stable not compiling on beta/nightly. Was there a PSA i missed? I see nothing on urlo.