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:
parent
74eef05e7d
commit
67350bc868
41 changed files with 413 additions and 145 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue