| Age | Commit message (Collapse) | Author | Lines |
|
Rollup of 5 pull requests
Successful merges:
- #124041 (Fix copy path button)
- #124047 (Match ergonomics 2024: miscellaneous code cleanups)
- #124064 (Move confusing comment about otherwise blocks in `lower_match_tree`)
- #124090 (llvm: update riscv target feature to match LLVM 19)
- #124100 (fix: make `str::from_raw_parts_mut` `mut`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
llvm: update riscv target feature to match LLVM 19
In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting
llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in
rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again.
``@rustbot`` label: +llvm-main
|
|
Match ergonomics 2024: miscellaneous code cleanups
- Store `ByRef` instead of `BindingAnnotation` in `PatInfo`
- Rename `BindingAnnotation` to `BindingMode`
r? ``@Nadrieril``
cc #123076
``@rustbot`` label A-patterns
|
|
Fix copy path button
Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in https://github.com/rust-lang/rust/pull/123706 forgot to update the JS (it contained an image before but not anymore).
I had to make some small changes in the CSS to fix the display when the button was clicked as well.
r? ``@notriddle``
|
|
r=jieyouxu
crashes: add even more tests?!?
adds more tests that were not already added with https://github.com/rust-lang/rust/pull/124038 from the past 10 months or so.
Need a couple more passes through the tracker to filter out more missing ice /fixed tests but we're slowly getting there.
|
|
|
|
r=RalfJung
Delay interning errors to after validation
fixes https://github.com/rust-lang/rust/issues/122398
fixes #122548
This improves diagnostics since validation errors are usually more helpful compared with interning errors that just make broad statements about the entire constant
r? `@RalfJung`
|
|
In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended
up largely reverting
llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means
the change we did in
rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only
corrct for LLVM 18...so we have to adjust again.
@rustbot label: +llvm-main
|
|
Codegen ZSTs without an allocation
This makes sure that &[] is equivalent to unsafe code (from_raw_parts(dangling, 0)). No new stable guarantee is intended about whether or not we do this, this is just an optimization.
This regressed in #67000 (no comments I can see about that regression in the PR, though it did change the test modified here). We had previously performed this optimization since #63635.
|
|
Rollup of 9 pull requests
Successful merges:
- #116957 (meta: notify #t-rustdoc Zulip stream on backport nominations)
- #122201 (Document overrides of `clone_from()` in core/std)
- #122723 (Use same file permissions for ar_archive_writer as the LLVM archive writer)
- #124030 (interpret: pass MemoryKind to adjust_alloc_base_pointer)
- #124037 (Don't ascend into parent bodies when collecting stmts for possible return suggestion)
- #124049 (Stabilize `const_io_structs`)
- #124062 (Add another expression to weird-exprs.rs)
- #124066 (Don't error on subtyping of equal types)
- #124073 (Remove libc from rust_get_test_int uses)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Remove libc from rust_get_test_int uses
`rust_test_helpers.c` has a few unfortunate signatures which have made some of our UI tests _technically_ need the `libc` crate. This is my attempt to evict the need of `libc` for `rust_get_test_int`.
I've deleted `tests/ui/abi/foreign/foreign-no-abi.rs` because the test was originally written to check that `native mod` will compile without an ABI specifier. `native mod` was removed years before 1.0 and the test hasn't checked for anything for a long time.
|
|
Add another expression to weird-exprs.rs
I'm almost feeling bad for this but I decided I don't.
Feel free to close if you don't approve.
|
|
Don't ascend into parent bodies when collecting stmts for possible return suggestion
Fixes #124022
|
|
Use same file permissions for ar_archive_writer as the LLVM archive writer
This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (https://github.com/rust-lang/rust/issues/107407) to fix all known regressions.
Fixes https://github.com/rust-lang/rust/issues/107495
|
|
|
|
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls
fixes #123292
Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
|
|
|
|
|
|
static libraries with ar_archive_writer
Fixes #107495
|
|
|
|
validation produces much higher quality errors and already handles most of the cases
|
|
|
|
Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}`
Catch the case where `kw::Self` is recovered in the parser and causes us to subsequently resolve `&self`'s implicit type to something that's not a type.
This check could be made more accurate, though I'm not sure how hard we have to try here.
Fixes #123988
|
|
Testing for ASLR by casting &ZST to *const _ is not useful, there's no
guarantee that &ZST produces an ASLR'd pointer.
|
|
This makes sure that &[] is just as efficient as indirecting through
unsafe code (from_raw_parts). No new stable guarantee is intended about
whether or not we do this, this is just an optimization.
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
Use `/* value */` as a placeholder
The expression `value` isn't a valid suggestion; let's use `/* value */` as a placeholder (which is also invalid) since it more clearly signals to the user that they need to fill it in with something meaningful. This parallels the suggestions we have in a couple other places, like arguments.
We could also print the type name instead of `/* value */`, especially if it's suggestable, but I don't care strongly about that.
|
|
Port the 2 `rust-lld` run-make tests to `rmake`
In preparation for finalizing most of the `rust-lld` work, this PR ports the following tests to `rmake`:
- `tests/run-make/rust-lld`
- `tests/run-make/rust-lld-custom-target`
As they use `$(CGREP) -e` I added `regex` as an exported dependency to the `run_make_support` library.
Unfortunately, the most recent versions depend on `memchr` 2.6.0 but it's currently pinned at 2.5.0 in the workspace, and therefore had to settle for the older `regex-1.8.0`.
r? `@jieyouxu`
|
|
Taint const qualifs if a static is referenced that didn't pass wfcheck
It is correct to only check the signature here, as the ICE is caused by `USE_WITH_ERROR` trying to allocate memory to store the result of `WITH_ERROR` before evaluating it.
fixes #123153
|
|
Don't ICE for kind mismatches during error rendering
fixes #123457
also some test suite cleanups to make backtraces easier to read
|
|
|
|
suggestion
|
|
Allow workproducts without object files.
This pull request partially reverts changes from e16c3b4a4421
Original motivation for this assert was described with "A WorkProduct without a saved file is useless"
which was true at the time but now it is possible to have work products with other types of files
(llvm-ir, asm, etc) and there are bugreports for this failure:
For example: https://github.com/rust-lang/rust/issues/123695
Fixes https://github.com/rust-lang/rust/issues/123234
Now existing `assert` and `.unwrap_or_else` are unified into a single
check that emits slightly more user friendly error message if an object
files was meant to be produced but it's missing
|
|
r=Nadrieril
Match ergonomics 2024: Implement eat-one-layer
r? `@Nadrieril`
cc #123076
`@rustbot` label A-edition-2024 A-patterns
|
|
r=Nadrieril
Match ergonomics 2024: `mut` doesn't reset binding mode
r? ``@Nadrieril``
cc https://github.com/rust-lang/rust/issues/123076
``@rustbot`` label A-edition-2024 A-patterns
|
|
Stabilize checking of cfgs at compile-time: `--check-cfg` option
This PR stabilize the `--check-cfg` CLI option of `rustc` (and `rustdoc`) :tada:.
In particular this PR does two things:
1. it makes the `--check-cfg` option stable
2. and it moves the documentation to the stable books
FCP: https://github.com/rust-lang/rust/issues/82450#issuecomment-1965328542
Resolves #82450
``@rustbot`` labels +S-blocked +F-check-cfg
r? ``@petrochenkov``
|
|
This pull request partially reverts changes from e16c3b4a4421
Original motivation for this assert was described with "A WorkProduct without a saved file is useless"
which was true at the time but now it is possible to have work products with other types of files
(llvm-ir, asm, etc) and there are bugreports for this failure:
For example: https://github.com/rust-lang/rust/issues/123695
Fixes https://github.com/rust-lang/rust/issues/123234
Now existing `assert` and `.unwrap_or_else` are unified into a single
check that emits slightly more user friendly error message if an object
files was meant to be produced but it's missing
|
|
Rollup of 14 pull requests
Successful merges:
- #120781 (Correct usage note on OpenOptions::append())
- #121694 (sess: stabilize `-Zrelro-level` as `-Crelro-level`)
- #122521 (doc(bootstrap): add top-level doc-comment to utils/tarball.rs)
- #123491 (Fix ICE in `eval_body_using_ecx`)
- #123574 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 6))
- #123687 (Update ar_archive_writer to 0.2.0)
- #123721 (Various visionOS fixes)
- #123797 (Better graphviz output for SCCs and NLL constraints)
- #123990 (Make `suggest_deref_closure_return` more idiomatic/easier to understand)
- #123995 (Make `thir_tree` and `thir_flat` into hooks)
- #123998 (Opaque types have no namespace)
- #124001 (Fix docs for unstable_features lint.)
- #124006 (Move size assertions for `mir::syntax` types into the same file)
- #124011 (rustdoc: update the module-level docs of `rustdoc::clean`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 6)
Follow up
* https://github.com/rust-lang/rust/pull/116214
* https://github.com/rust-lang/rust/pull/116432
* https://github.com/rust-lang/rust/pull/116824
* https://github.com/rust-lang/rust/pull/118105
* https://github.com/rust-lang/rust/pull/119561
|
|
Fix ICE in `eval_body_using_ecx`
Ensures `TypeckResults` is tainted by failing candidate assembly for types with error
Fixes #123154
|
|
sess: stabilize `-Zrelro-level` as `-Crelro-level`
Stabilise `-Zrelro-level` as `-Crelro-level`. There's no tracking issue for this flag to close.
|
|
|
|
Implement syntax for `impl Trait` to specify its captures explicitly (`feature(precise_capturing)`)
Implements `impl use<'a, 'b, T, U> Sized` syntax that allows users to explicitly list the captured parameters for an opaque, rather than inferring it from the opaque's bounds (or capturing *all* lifetimes under 2024-edition capture rules). This allows us to exclude some implicit captures, so this syntax may be used as a migration strategy for changes due to #117587.
We represent this list of captured params as `PreciseCapturingArg` in AST and HIR, resolving them between `rustc_resolve` and `resolve_bound_vars`. Later on, we validate that the opaques only capture the parameters in this list.
We artificially limit the feature to *require* mentioning all type and const parameters, since we don't currently have support for non-lifetime bivariant generics. This can be relaxed in the future.
We also may need to limit this to require naming *all* lifetime parameters for RPITIT, since GATs have no variance. I have to investigate this. This can also be relaxed in the future.
r? `@oli-obk`
Tracking issue:
- https://github.com/rust-lang/rust/issues/123432
|
|
|
|
Disable two debuginfo tests failing under the future GDB 15 release
As seen in #123960, it seems two of our debuginfo tests started failing on gdb 15, which is also already in use in the `x86_64-gnu-llvm-18` builder: CI will randomly start to fail whenever this cached docker image expires.
This PR disables the following two tests under gdb 15+, to prevent future CI failures.
- `tests/debuginfo/include_string.rs`
- `tests/debuginfo/vec-slices.rs`
This seems very much related to https://sourceware.org/bugzilla/show_bug.cgi?id=30330 and https://sourceware.org/bugzilla/show_bug.cgi?id=31517 -- and I just now saw #122751 as well, where one of these bugzilla issues and one of the two test failures here was previously mentioned.
I don't know whether these are unexpected gdb changes, or if we need to change our tests as it seems some of the gdb changes are definitely intentional, so I'll just cc `@rust-lang/wg-debugging` and `@tromey.`
(In the same area, `tests/debuginfo/unsized.rs` was previously disabled due to https://sourceware.org/bugzilla/show_bug.cgi?id=30330. This issue has been fixed but I don't believe our test passes, so it's in the same boat as the 2 above regarding whether this test is expected to work or needs changes as well)
r? wg-debugging
I've confirmed this is enough to have CI pass on gdb 15 with the llvm 18 builder.
|
|
Trait predicates for types which have errors may still
evaluate to OK leading to downstream ICEs. Now we return
a selection error for such types in candidate assembly and
thereby prevent such issues
|
|
|
|
|
|
|
|
|
|
|