Skip to content

Commit 313c30c

Browse files
committed
Make ast no_std compatible
1 parent d375710 commit 313c30c

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ authors = ["RustPython Team"]
55
edition = "2018"
66

77
[dependencies]
8-
num-bigint = "0.3"
8+
num-bigint = { version = "0.3", default-features = false }

ast/src/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! location of the node.
66
77
pub use crate::location::Location;
8+
use alloc::{boxed::Box, string::String, vec::Vec};
89
use num_bigint::BigInt;
910

1011
#[allow(clippy::large_enum_variant)]

ast/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#![no_std]
2+
3+
extern crate alloc;
4+
15
mod ast;
26
mod location;
37

ast/src/location.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Datatypes to support source location information.
22
3-
use std::fmt;
3+
use core::fmt;
44

55
/// A location somewhere in the sourcecode.
66
#[derive(Clone, Copy, Debug, Default, PartialEq)]

0 commit comments

Comments
 (0)