Fix llvm-tblgen for cross compiling
- Let llvm-config tell us where to find its tools
- Add llvm-tblgen to rust-dev for cross-compiling
Fixes#86890.
r? ````@jyn514````
rustdoc: Document effect of fundamental types
This was implemented in https://github.com/rust-lang/rust/pull/96565, but not documented. But it's a useful feature for everyone who implements own wrapper (especially wrappers-around-pointers) types, so that they can behave like pointers (and stdlib wrappers) do -- so here goes a mention in the unstable section of the rustdoc book.
(That is where I initially looked to find tricks for making my own wrapper types be transparent to documentation).
don't ICE when normalizing closure input tys
We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx.
`normalize_and_add_constraints` doesn't update `universe_causes`
when creating new universes, causing an ICE. Remove it!
Add spans to better track normalization constraints.
Fix couple places where `universe_causes` is not updated correctly to
track newly added universes.
Fixes#102800
~Fixess #99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by #101708, but the changes in this PR are still correct and should prevent potential future ICEs)
test: run-make: skip when cross-compiling
This test fails when targeting aarch64 Android. Instead of adding yet another architecture here (and one that's increasingly more common as the host), let's replace the growing list of architectures with ignore-cross-compile.
Make the `config.src` handling for downloadable bootstrap more conservative
In particular, this supports build directories within an unrelated git repository. Fixes https://github.com/rust-lang/rust/issues/102562.
As a side effect, it will fall back to the old logic when the source directory is being built from a tarball within an unrelated git repository. However, that second case is unsupported and untested; we reserve the right to break it in the future.
`@cr1901` can you confirm this fixes your problem?
cc `@kleisauke,` I believe this will also fix your issue (although your use case still isn't supported).
r? `@Mark-Simulacrum`
Fix gdb-cmd for rust-gdbgui
With https://github.com/cs01/gdbgui/pull/198, the way that gdbgui arguments were specified changed. I've tested this with program generated from `cargo new --bin` and it worked as gdbgui should.
Closes#76383.
add a few more assert_unsafe_precondition
Add debug-assertion checking for `ptr.read()`, `ptr.write(_)`, and `unreachable_unchecked.`
This is quite useful for [cargo-careful](https://github.com/RalfJung/cargo-careful).
This DOM cleanup changes the color of the triangle, from blue to black, but
since it's still a different color from the link it's next to, it should
still be noticeable.
Update browser UI test version
It added the possibility to concatenate strings and numbers and updated the `goto` command so it doesn't stand on its own anymore.
r? ````@notriddle````
Update rustc-dev-guide
- .gitattributes: Mark minified javascript as binary to filter greps
- fix very minor punctuation typo
- diagnostic structs: derive on enum (#1477)
- Update running tests with the new flags (#1476)
- Rename typeck to hir_analysis (#1475)
- fix typo and make paragraph consistent (#1474)
- Update about-this-guide.md
- Link to the correct page in "about this guide"
- Update r-a config suggestions
- don't refer to the compile-time interpreter as "Miri" (#1471)
- UPDATE - Diagnostic docs to reflect renamed traits and macros in rustc PR#101558
- Update mdbook and its extensions versions
- Remove unmaintained action
- Update some actions versions
- Fix some typos
Update motivated in large part by the most recent commit, to fix `git
grep`.
Fix MIR inlining of asm_unwind
The MIR inlining currently doesn't handle inline asm's unwind edge correctly.
This code will cause ICE:
```rust
struct D;
impl Drop for D {
fn drop(&mut self) {}
}
#[inline(always)]
fn foo() {
let _d = D;
unsafe { std::arch::asm!("", options(may_unwind)) };
}
pub fn main() {
foo();
}
```
This PR fixes this issue. I also take the opportunity to extract common code into a method.
Remove `mir::CastKind::Misc`
As discussed in #97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast.
r? ````@oli-obk````
Rewrite representability
* Improve placement of `Box` in the suggestion
* Multiple items in a cycle emit 1 error instead of an error for each item in the cycle
* Introduce `representability` query to avoid traversing an item every time it is used.
* Also introduce `params_in_repr` query to avoid traversing generic items every time it is used.
`normalize_and_add_constraints` doesn't add entries in `universe_causes`
when creating new universes, causing an ICE. Remove it!
Add spans to track normalization constraints.
Fix couple places where `universe_causes` is not updated correctly to
track newly added universes.
Rollup of 6 pull requests
Successful merges:
- #102300 (Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere)
- #102475 (unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update)
- #102760 (Avoid repeated re-initialization of the BufReader buffer)
- #102764 (Check `WhereClauseReferencesSelf` after all other object safety checks)
- #102779 (Fix `type_of` ICE)
- #102780 (run Miri CI when std::sys changes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
- .gitattributes: Mark minified javascript as binary to filter greps
- fix very minor punctuation typo
- diagnostic structs: derive on enum (#1477)
- Update running tests with the new flags (#1476)
- Rename typeck to hir_analysis (#1475)
- fix typo and make paragraph consistent (#1474)
- Update about-this-guide.md
- Link to the correct page in "about this guide"
- Update r-a config suggestions
- don't refer to the compile-time interpreter as "Miri" (#1471)
- UPDATE - Diagnostic docs to reflect renamed traits and macros in rustc PR#101558
- Update mdbook and its extensions versions
- Remove unmaintained action
- Update some actions versions
- Fix some typos
Update motivated in large part by the most recent commit, to fix `git
grep`.
Check `WhereClauseReferencesSelf` after all other object safety checks
This fixes the ICE because it causes us to detect another *non-lint* `MethodViolationCode` first, instead of breaking on `WhereClauseReferencesSelf`.
We could also approach this issue by instead returning a vector of *all* of the `MethodViolationCode`s, and just reporting the first one we see, but treating it as a hard error if we return both `WhereClauseReferencesSelf` and some other violation code -- let me know if this is desired.
Fixes#102762