Update RLS
This includes https://github.com/rust-lang/rls/pull/1482 which should finally fix the spurious tests RLS in Rust CI (test-pass -> test-fail).
r? @oli-obk
cc @ehuss
This is duplicated in a few locations throughout the sysroot to work
around issues with not exporting a macro in libstd but still wanting it
available to sysroot crates to define blocks. Nowadays though we can
simply depend on the `cfg-if` crate on crates.io, allowing us to use it
from there!
This commit fixes an ICE that occured when a const generic was used in
a repeat expression. This was due to the code expecting the length of
the repeat expression to be const evaluatable to a constant, but a const
generic parameter is not (however, it can be made into a constant).
Haiku: the maximum stack size is 16 MB
This keeps the compiler from crashing every time it is invoked. No functional change on other platforms.
This patch is similar to the limitation that is in the [librustdoc/lib.rs](57e13e0325/src/librustdoc/lib.rs (L89)).
get rid of real_intrinsics module
instead import intrinsics locally in their wrapper functions.
(These functions are wrapper functions as a preparation to fixing https://github.com/rust-lang/rust/issues/53871.)
Replaced linear token counting macros with optimized implementation
There are currently two distinct token-counting macros in the source. Both implement the trivial algorithm, with linear complexity. They may or may not be adequate for their use case, but considering that other people are probably going to copy and paste them whenever they need a token-counting macro, I replaced them with an optimized implementation with logarithmic complexity.
When one tries to create a thread with a requested stack size larger
than 16 MB, the call will fail and the compiler will bail out. Therefore
we should limit the size of the thread stack to 16 MB on Haiku.
Use Build::read_dir instead of fs::read_dir in Build::cp_r
Build::read_dir does better error handling when the directory doesn't
exist; it actually prints the name of the directory rather than just
printing the underlying error "No such file or directory" which on
its own isn't very useful.
This makes parsing faster, particularly for code with large constants,
for two reasons:
- it skips all the keyword comparisons for literals;
- it replaces the unnecessary `parse_literal_maybe_minus` call with
`parse_lit`, avoiding an unnecessary allocation via `mk_expr`.
Build::read_dir does better error handling when the directory doesn't
exist; it actually prints the name of the directory rather than just
printing the underlying error "No such file or directory" which on
its own isn't very useful.
Stabilize #![feature(repr_align_enum)] in Rust 1.37.0
On an `enum` item, you may now write:
```rust
#[repr(align(X))]
enum Foo {
// ...
}
```
This has equivalent effects to first defining:
```rust
#[repr(align(X))]
struct AlignX<T>(T);
```
and then using `AlignX<Foo>` in `Foo`'s stead.
r? @nagisa
This should be used when trying to get at subsets of a larger span,
especially when the larger span is not available in the code attempting
to work with those subsets (especially common in the fmt_macros crate).
This is usually a good replacement for (BytePos, BytePos) and (usize,
usize) tuples.
This commit also removes from_inner_byte_pos, since it took usize
arguments, which is error prone.