makepad/libs/relax/compiler/std/alloc/lib.rs
Admin 60b47409e8 makepad run / Relax: rustc tests/ui agreement ~89%, a method-lookup miscompile fixed, faster cold start
Suite (rustc 1.97.1 tests/ui, `makepad check` verdicts; lane full sweeps of the tip reach ~10.9k of 11,881):
- valid programs: 98.4% accepted (false rejects fixed across std, parser, typeck, solver, closures, upcasts)
- traits/typeck: missing obligations (E0277/E0308/...), item well-formedness, the packed + needs-drop rule
- name resolution and privacy follow-ups: import clashes are per namespace (false E0255 on
  `pub use m::m;` with a module and fn of one name), use-line edits no longer refuse a hot reload,
  diagnostics-only checks gated off the run path, `gen` reserved by the span's edition
- lints: a rustc-faithful lint framework (levels, groups, expect) and the unused/dead/unreachable/
  nonstandard-style passes; warn-level stays warn, check-only
- const eval: E0391 layout and bound cycles, E0080 for huge types, static self access, failing
  signature consts and invalid bool/char values; a sound constant-branch fold (check only)
- crashes and timeouts: duplicate validations removed, generic-arg arity at declaration collection

Correctness: method/path probes no longer pick another crate's private inherent items over an
accessible trait item (`w.apply(3)` ran the private no-op); runtime regression test added.

Cold start (M4 mini): a thread-owned compiler arena fast path and a persistent worker pool:
Calculator cold 3.78 -> 3.47 s (CPU -5%), Stage cold 12.3 -> 9.9 s (CPU -10%).
Cache: provided-crate boundary views keep shared std/framework entries stale-free across apps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:50:47 +02:00

77 lines
2.4 KiB
Rust

//! Relax's alloc: a facade over Relax's core (where the alloc-level types live, coord.md
//! S1), at real alloc's paths.
pub mod alloc {
pub use core::heap::{alloc, alloc_zeroed, dealloc, handle_alloc_error, realloc, GlobalAlloc, Layout, LayoutErr, LayoutError, System};
}
pub mod borrow {
pub use core::borrow::{Borrow, BorrowMut, Cow, ToOwned};
}
pub mod boxed {
pub use core::boxed::Box;
}
pub mod collections {
pub use core::collections::binary_heap;
pub use core::collections::btree_map;
pub use core::collections::btree_set;
pub use core::collections::linked_list;
pub use core::collections::vec_deque;
pub use core::collections::BTreeMap;
pub use core::collections::BTreeSet;
pub use core::collections::BinaryHeap;
pub use core::collections::LinkedList;
pub use core::collections::TryReserveError;
pub use core::collections::VecDeque;
}
/// alloc::ffi (CString lives in core/ffi/c_string.rs; std-os lane)
pub mod ffi {
pub use core::ffi::{CString, IntoStringError, NulError};
}
pub mod fmt {
pub use core::fmt::format;
pub use core::fmt::{
write, Alignment, Arguments, Binary, Debug, DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple, Display, Error,
Formatter, LowerExp, LowerHex, Octal, Pointer, Result, UpperExp, UpperHex, Write,
};
}
pub mod rc {
pub use core::rc::{Rc, Weak};
}
pub mod slice {
pub use core::slice::{
from_mut, from_raw_parts, from_raw_parts_mut, from_ref, Chunks, ChunksExact, ChunksExactMut, ChunksMut, Concat, Iter,
IterMut, Join, RChunks, RSplit, RSplitN, SliceIndex, Split, SplitInclusive, SplitMut, SplitN, Windows,
};
}
pub mod str {
pub use core::str::{
from_utf8, from_utf8_mut, from_utf8_unchecked, from_utf8_unchecked_mut, pattern, Bytes, CharIndices, Chars,
EncodeUtf16, EscapeDebug, EscapeDefault, EscapeUnicode, FromStr, Lines, MatchIndices, Matches, ParseBoolError,
RMatchIndices, RMatches, RSplit, RSplitN, RSplitTerminator, Split, SplitAsciiWhitespace, SplitInclusive, SplitN,
SplitTerminator, SplitWhitespace, Utf8Chunk, Utf8Chunks, Utf8Error,
};
}
pub mod string {
pub use core::string::{Drain, FromUtf16Error, FromUtf8Error, String, ToString};
}
pub mod sync {
pub use core::sync::{Arc, Weak};
}
pub mod vec {
pub use core::vec::{from_elem, Drain, IntoIter, Vec};
}
pub mod task {
pub use core::task::Wake;
}