The standard library is allowed to use unstable features even in stable Rust. How does the compiler check whether it is compiling standard library code?

60 points -p-e-w-

Just wondering, is it a simple "if the module path starts with std::, enable unstable stuff", or something more sophisticated?