rustbuild: Fix compiler docs
* Make sure std docs are generated before compiler docs so rustdoc uses
relative links.
* Don't document the rustc and rustdoc binary crates as they overwrite
the real rustc and rustdoc crates.
Fixes#40217
r? @alexcrichton
Update Cargo to fix nightly channel
This commit updates Cargo with rust-lang/cargo#3820 which includes a fix for
rust-lang/cargo#3819. At the same time this also slightly tweaks how rustbuild
builds cargo to ensure that all the build information (including git info and
such) makes its way into the binary.
Closesrust-lang/cargo#3819
This commit updates Cargo with rust-lang/cargo#3820 which includes a fix for
rust-lang/cargo#3819. At the same time this also slightly tweaks how rustbuild
builds cargo to ensure that all the build information (including git info and
such) makes its way into the binary.
Closesrust-lang/cargo#3820
Update mdbook to new version
This brings back playpen integration for the books.
It'd be nice to land this before beta, but realistically that's probably not going to happen...
LLVM: Update submodule to include SRet support patch for MSP430.
This patch is needed to fix#38824 on MSP430.
I know that LLVM 4 is coming soon, but it would be great to have at least one working nightly before the update.
cc @awygle
r? @alexcrichton
Delete more swaths of the configure script
This PR deletes more swaths of the `./configure` script which are either no longer necessary or already available in rustbuild (where an implementation is preferred)
* Make sure std docs are generated before compiler docs so rustdoc uses
relative links.
* Don't document the rustc and rustdoc binary crates as they overwrite
the real rustc and rustdoc crates.
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info
This PR
- adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items,
- [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today),
- removes `ast::MacroDef`, and
- no longer uses `Mark` and `Invocation` to identify and characterize macro definitions.
- We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter.
r? @nrc
Point at the immutable local variable when trying to modify one of its
fields.
Given a file:
```rust
struct Foo {
pub v: Vec<String>
}
fn main() {
let f = Foo { v: Vec::new() };
f.v.push("cat".to_string());
}
```
present the following output:
```
error: cannot borrow immutable field `f.v` as mutable
--> file.rs:7:13
|
6 | let f = Foo { v: Vec::new() };
| - this should be `mut`
7 | f.v.push("cat".to_string());
| ^^^
error: aborting due to previous error
```
rustc: Whitelist the FMA target feature
This commit adds the entry `"fma\0"` to the whitelist for the x86
target. LLVM already supports fma but rustc did not directly. Previously
rustc permitted `+fma` in the target-feature argument and enabled the use
of FMA instructions, but it did not list it in the configuration and
attributes.
fixes#40406
fix#40294 obligation cause.body_id is not always a NodeExpr
Hello!
This fixes#40294 and moves tests related to #38812 to a much more sensible directory.
Thanks to @nikomatsakis and @eddyb
Disallow subtyping between T and U in T: Unsize<U>.
Because `&mut T` can be coerced to `&mut U`, `T` and `U` must be unified invariantly. Fixes#40288.
E.g. coercing `&mut [&'a X; N]` to `&mut [&'b X]` must require `'a` be equal to `'b`, otherwise you can convert between `&'a X` and `&'b X` (in either direction), potentially unsoundly lengthening lifetimes.
Subtyping here was introduced with `Unsize` in #24619 (landed in 1.1, original PR is #23785).
rustbuild: Fix a bug when manifesting with Cargo
The wrong Cargo version was passed down so it ended up panicking the
build-manifest script as it couldn't find the right tarball.
This commit removes detection of CFG_OSTYPE and CFG_CPUTYPE from the configure
script, which means that the default value of `--build` is no longer present in
the configure script. All this logic is now available in rustbuild itself, so
there's no need to duplicate it.