1
Fork 0

Don't use std:: paths in syntax extensions when compiling a #![no_std] crate

Fixes #16803.
Fixes #14342.
Fixes half of #21827 -- slice syntax is still broken.
This commit is contained in:
Keegan McAllister 2014-09-07 14:57:26 -07:00
parent 74eef05e7d
commit 67350bc868
41 changed files with 413 additions and 145 deletions

View file

@ -37,7 +37,7 @@ pub fn maybe_inject_prelude(krate: ast::Crate) -> ast::Crate {
}
}
fn use_std(krate: &ast::Crate) -> bool {
pub fn use_std(krate: &ast::Crate) -> bool {
!attr::contains_name(&krate.attrs[], "no_std")
}