Count recursion across phantom data separately from all recursion,
and treat `Box<T>` just as if it were carrying `PhantomData<T>`.
(Regression tests are in followup commit.)
The practical effect of this is just to increment the `xref_depth`
counter, the same way that `Vec` and other types carrying
`PhantomData` do.
This is an implementation of RFC 899 and adds stdio functionality to the new
`std::io` module. Details of the API can be found on the RFC, but from a high
level:
* `io::{stdin, stdout, stderr}` constructors are now available. There are also
`*_raw` variants for unbuffered and unlocked access.
* All handles are globally shared (excluding raw variants).
* The stderr handle is no longer buffered.
* All handles can be explicitly locked (excluding the raw variants).
The `print!` and `println!` machinery has not yet been hooked up to these
streams just yet. The `std::fmt::output` module has also not yet been
implemented as part of this commit.
static_assert is documented as working on static with type `bool`, but
we currently accept it on any const static and crash when the const has
an non-integral type.
This is a breaking-change for anyone who used static_assert on types
likes i32, which happened to work but seems like an unintended
consequence of the missing error checking.
[breaking-change]
Fixes#22056
some commits in OpenBSD OS have corrected a problem of stack position.
Now, we can adjust more accurately the page guard in rust.
@dhuseby I am not sure that bitrig have already integrated these changes (the `$OpenBSD$` header in sys/kern/kern_exec.c is too old). But when they do, you may want this patch too.
Fixing #21475. Right now this code can not be parsed:
```rust
use m::{START, END};
fn main() {
match 42u32 {
m::START...m::END => {}, // error: expected one of `::`, `=>`, or `|`, found `...`
_ => {},
}
}
mod m {
pub const START: u32 = 4;
pub const END: u32 = 14;
}
```
I fixed the parser and added test for this case, but now there are still problems with mixing literals and paths in interval:
```rust
match 42u32 {
0u32...m::END => {}, // mismatched types in range [E0031]
m::START...59u32 => {}, // mismatched types in range [E0031]
_ => {},
}
}
```
I'll try fix this problem and need review.
static_assert is documented as working on static with type `bool`, but
we currently accept it on any const static and crash when the const has
an non-integral type.
This is a breaking-change for anyone who used static_assert on types
likes i32, which happened to work but seems like an unintended
consequence of the missing error checking.
[breaking-change]
Fixes#22056
MacEager is a MacResult implementation for the common case where you've already built each form of AST that you might return.
Fixes#17637. Based on #18814.
This is a [breaking-change] for syntax extensions:
* MacExpr::new becomes MacEager::expr.
* MacPat::new becomes MacEager::pat.
* MacItems::new becomes MacEager::items. It takes a SmallVector directly,
not an iterator.
r? @sfackler
Now that the `std::env` module has had some time to bake this commit marks most
of its APIs as `#[stable]`. Some notable APIs that are **not** stable (and still
use the same `env` feature gate) are:
* `{set,get}_exit_status` - there are still questions about whether this is the
right interface for setting/getting the exit status of a process.
* `page_size` - this may change location in the future or perhaps name as well.
This also effectively closes#22122 as the variants of `VarError` are
`#[stable]` now. (this is done intentionally)