| Age | Commit message (Collapse) | Author | Lines |
|
Add a tidy check that checks whether the fluent slugs only appear once
As ``````@Nilstrieb`````` said in https://github.com/rust-lang/rust/pull/121828#issuecomment-1972622855:
> Might make sense to have a tidy check that checks whether the fluent slugs only appear once in the source code and lint for that
there's a tidy check already for sorting
We can get the tidy check error:
```
tidy check
tidy error: /path/to/rust/compiler/rustc_const_eval/messages.ftl: message `const_eval_invalid_align` is not used
tidy error: /path/to/rust/compiler/rustc_lint/messages.ftl: message `lint_trivial_untranslatable_diag` is not used
tidy error: /path/to/rust/compiler/rustc_parse/messages.ftl: message `parse_invalid_literal_suffix` is not used
tidy error: /path/to/rust/compiler/rustc_infer/messages.ftl: message `infer_need_type_info_in_coroutine` is not used
tidy error: /path/to/rust/compiler/rustc_passes/messages.ftl: message `passes_expr_not_allowed_in_context` is not used
tidy error: /path/to/rust/compiler/rustc_passes/messages.ftl: message `passes_layout` is not used
tidy error: /path/to/rust/compiler/rustc_parse/messages.ftl: message `parse_not_supported` is not used
```
r? ``````@Nilstrieb``````
|
|
Avoid some interning in bootstrap
This interning is pointless and only makes the code more complex.
The only remaining use of interning is `TargetSelection`, for which I left a comment.
|
|
Miri subtree update
r? `@ghost`
`@WaffleLapkin` when this lands, setting `MIRI_TEMP` should not be needed any more on the dev desktops.
|
|
|
|
|
|
|
|
|
|
Fixes #122266
|
|
|
|
|
|
|
|
r=MarkSimulacrum
Subtree update cg gcc 2024 03 05
Reopening of #121390.
r? `@ghost`
|
|
Distinguish between library and lang UB in assert_unsafe_precondition
As described in https://github.com/rust-lang/rust/pull/121583#issuecomment-1963168186, `assert_unsafe_precondition` now explicitly distinguishes between language UB (conditions we explicitly optimize on) and library UB (things we document you shouldn't do, and maybe some library internals assume you don't do).
`debug_assert_nounwind` was originally added to avoid the "only at runtime" aspect of `assert_unsafe_precondition`. Since then the difference between the macros has gotten muddied. This totally revamps the situation.
Now _all_ preconditions shall be checked with `assert_unsafe_precondition`. If you have a precondition that's only checkable at runtime, do a `const_eval_select` hack, as done in this PR.
r? RalfJung
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #99153 (Add Read Impl for &Stdin)
- #114655 (Make `impl<Fd: AsFd>` impl take `?Sized`)
- #120504 (Vec::try_with_capacity)
- #121280 (Implement MaybeUninit::fill{,_with,_from})
- #121403 (impl From<TryReserveError> for io::Error)
- #121526 (on the fly type casting for `build.rustc` and `build.cargo`)
- #121584 (bump itertools to 0.12)
- #121711 (Implement junction_point)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
bump itertools to 0.12
still depend on 0.11 (temporary dupes version):
* <del>clippy</del>, https://github.com/rust-lang/rust-clippy/pull/12346
* rustfmt, sigh, https://github.com/rust-lang/rustfmt/pull/6093
https://github.com/rust-itertools/itertools/blob/v0.12.1/CHANGELOG.md
removed unused `derive_more` dep from `rustc_middle`
|
|
on the fly type casting for `build.rustc` and `build.cargo`
self-explanatory
|
|
Since https://github.com/rust-lang/rust/pull/121956 we don't need it any more,
and we are generally short on Windows staff so reducing the amount of code we
have to test and maintain sounds like a good idea.
The InitOnce stuff is still used by `thread_local_key::StaticKey`.
|
|
|
|
|
|
set panic=abort so that we do not need this eh_personality thing
|
|
|
|
Profiler output:
https://notriddle.com/rustdoc-html-demo-9/search-unbox-limit/
This is a performance enhancement aimed at a problem I found while
using type-driven search on the Rust compiler. It is caused by
[`Interner`], a trait with 41 associated types, many of which
recurse back to `Self` again.
This caused search.js to struggle. It eventually terminates,
after about 10 minutes of turning my PC into a space header, but it's
doing `41!` unifications and that's too slow.
[`Interner`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/trait.Interner.html
|
|
Update host LLVM on x64 Linux to LLVM 18
Updates host LLVM on Linux to `18.1.0`.
|
|
|
|
|
|
miri: do not apply aliasing restrictions to Box with custom allocator
This is the Miri side of https://github.com/rust-lang/rust/pull/122018. The "intrinsics with body" made this much more pleasant. :)
Fixes https://github.com/rust-lang/miri/issues/3341.
r? `@oli-obk`
|
|
fix incorrect path resolution in tidy
Previously, reading the current path from the environment led to failure when invoking x from outside the source root. This change fixes this issue by passing the already resolved root path into `ui_tests::check`.
Fixes #122202
|
|
ci: add a runner for vanilla LLVM 18
For CI cost, this can be seen as replacing the llvm-15 runner we dropped in #117947.
Also, I've set `IS_NOT_LATEST_LLVM` in the llvm-17 runner, since that's not the latest anymore.
|
|
|
|
|
|
|
|
Automatic Rustup
|
|
|
|
|
|
Previously, reading the current path from the environment led to failure when invoking
x from outside the source root. This change fixes this issue by passing the already
resolved root path into `ui_tests::check`.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
|
|
|
|
Lint singleton gaps after exclusive ranges
In the discussion to stabilize exclusive range patterns (https://github.com/rust-lang/rust/issues/37854), it has often come up that they're likely to cause off-by-one mistakes. We already have the `overlapping_range_endpoints` lint, so I [proposed](https://github.com/rust-lang/rust/issues/37854#issuecomment-1845580712) a lint to catch the complementary mistake.
This PR adds a new `non_contiguous_range_endpoints` lint that catches likely off-by-one errors with exclusive range patterns. Here's the idea (see the test file for more examples):
```rust
match x {
0..10 => ..., // WARN: this range doesn't match `10_u8` because `..` is an exclusive range
11..20 => ..., // this could appear to continue range `0_u8..10_u8`, but `10_u8` isn't matched by either of them
_ => ...,
}
// help: use an inclusive range instead: `0_u8..=10_u8`
```
More precisely: for any exclusive range `lo..hi`, if `hi+1` is matched by another range but `hi` isn't, we suggest writing an inclusive range `lo..=hi` instead. We also catch `lo..T::MAX`.
|
|
|
|
|
|
|
|
Tweak the way we protect in-place function arguments in interpreters
Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be").
This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame).
r? `@RalfJung`
cc `@oli-obk`
see https://github.com/rust-lang/rust/pull/121273#issuecomment-1980210690
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #121025 (add known-bug tests for derive failure to detect packed repr)
- #121194 (Refactor pre-getopts command line argument handling)
- #121563 (Use `ControlFlow` in visitors.)
- #122173 (Don't ICE in CTFE if raw/fn-ptr types differ)
- #122175 (Bless tidy issues order)
- #122179 (rustc: Fix typo)
- #122181 (Fix crash in internal late lint checking)
- #122183 (interpret: update comment about read_discriminant on uninhabited variants)
Failed merges:
- #122076 (Tweak the way we protect in-place function arguments in interpreters)
- #122132 (Diagnostic renaming 3)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
This commit adds a `runner` field configuration to `config.toml` for
specifying a wrapper executable when executing binaries for a target.
This is pulled out of #122036 where a WebAssembly runtime is used, for
example, to execute tests for `wasm32-wasip1`.
The name "runner" here is chosen to match Cargo's `CARGO_*_RUNNER`
configuration, and to make things a bit more consistent this
additionally renames compiletest's `--runtool` argument to `--runner`.
|
|
Merge `collect_mod_item_types` query into `check_well_formed`
follow-up to https://github.com/rust-lang/rust/pull/121154
this removes more potential parallel-compiler bottlenecks and moves diagnostics for the same items next to each other, instead of grouping diagnostics by analysis kind
|
|
Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an
earlier step ("Locals that don't have their address taken are as protected as
they can ever be").
This seems to be crucial for tail call support (as they can't refer to caller's
locals which are killed when replacing the stack frame).
|
|
Bless tidy issues order
The order is not right now because of https://github.com/rust-lang/rust/pull/121248#issuecomment-1975324159
from https://github.com/rust-lang/rust/pull/122161#discussion_r1517107993
r? `@workingjubilee`
|