cl-typeck: More type inference
- Renamed "intrinsic" -> "primitive" - I thought it was funny, but it's just annoying. - Rename "Uninferred" -> "Inferred" - It's a concrete type, but an inferred one. - Add lifetimes to the Entry API - Categorize does not care about recursive types. You can't have a recursive AST. - Added helpful constructors to the inference engine - Added some overloadable operators to the inference engine - These are a MAJOR work in progress - Reorganized the Inference implementation file by functionality. stdlib: - Updated standard library.
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
//! Iterable ranges
|
||||
|
||||
type T = _;
|
||||
|
||||
/// An Exclusive Range `a .. b` iterates from a to b, excluding b
|
||||
#[intrinsic = "range_exc", T]
|
||||
struct RangeExc(T, T)
|
||||
// #[lang = "range_exc", T]
|
||||
pub struct RangeExc(T, T)
|
||||
|
||||
/// An Inclusive Range `a ..= b` iterates from a to b, including b
|
||||
#[intrinsic = "range_inc", T]
|
||||
struct RangeInc(T, T)
|
||||
// #[lang = "range_inc", T]
|
||||
pub struct RangeInc(T, T)
|
||||
|
||||
impl RangeExc {
|
||||
fn next(this: &RangeInc) -> T {
|
||||
(*this).0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user