Rustup can't find std on old rusts

So I was experimenting with what is the first sable rust that can compile my library. I am on windows.

> rustup  -V
rustup 1.0.0 (17b6d21 2016-12-15)
> rustup override set 1.4.0
info: using existing install for '1.4.0-x86_64-pc-windows-gnu'
> cargo test
test result: ok. 7 passed; 0 failed;
> rustup override set 1.2.0
info: using existing install for '1.2.0-x86_64-pc-windows-gnu'
> cargo test

And I get a error box:

I have tried uninstalling the toolchains, same.
What did I do wrong and how do I fix it?

Thanks for the report @Eh2406. I don't see this with a simple hello world:

$ cargo new --bin hello
$ cd hello
$ rustup override set 1.2.0-x86_64-pc-windows-gnu
info: using existing install for '1.2.0-x86_64-pc-windows-gnu'
info: override toolchain for 'C:\Users\brian\Documents\dev\hello' set to '1.2.0-x86_64-pc-windows-gnu'

  1.2.0-x86_64-pc-windows-gnu unchanged - rustc 1.2.0 (082e47636 2015-08-03)
$ cargo test
   Compiling hello v0.1.0 (file:///C:/Users/brian/Documents/dev/hello)
src\main.rs:1:1: 3:2 warning: function is never used: `main`, #[warn(dead_code)] on by default
src\main.rs:1 fn main() {
src\main.rs:2     println!("Hello, world!");
src\main.rs:3 }
     Running target\debug\hello-0eb176e89ba6a659.exe

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

Since the error is about a dll the crate in question seems to be dynamically linked, which 'hello' is not. Do you have a link to the source?

I tried to create a dylib project to reproduce this behavior but ran into other difficulties.

Interesting. A test simple hello world doesn't do it for me either. Which makes sense, as my project test on 1.2 and 1.0 ok in the master branch.

This works: master
This dose not: build_script

Thanks for the help!

Indeed I to cannot reproduce with a plane hello world.

If I add a build = "build.rs" to my Cargo.toml and put fn main() {} in build.rs the problam comes back.

So it is something to do with build scripts. Any ideas? What should I try next?