| Age | Commit message (Collapse) | Author | Lines |
|
|
|
add smoke tests for basic PathBuf interactions
I wrote these while debugging [this](https://github.com/rust-lang/miri-test-libstd/actions/runs/8849912635/job/24302962983); it turns out the issue is [more complicated](https://github.com/rust-lang/rust/issues/124409) but these tests still seemed worth keeping.
|
|
|
|
Automatic Rustup
|
|
|
|
|
|
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]`
`-Z debug-macros` is "stabilized" by enabling it by default and removing.
`-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`.
It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no.
Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - https://github.com/rust-lang/rust/issues/100758#issuecomment-1935815625 describes some debugging scenarios that motivate this default as reasonable.
`#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
Stabilization report: https://github.com/rust-lang/rust/pull/120845#issuecomment-1939145242
Closes https://github.com/rust-lang/rust/issues/100758
Closes https://github.com/rust-lang/rust/issues/41743
Closes https://github.com/rust-lang/rust/issues/39153
|
|
|
|
Rollup of 4 pull requests
Successful merges:
- #124076 (Stablise io_error_downcast)
- #124378 (Keep the LIB env var in the compiler-builtins test)
- #124379 (Remove special-casing for `SimplifiedType` for next solver)
- #124381 (Renamed `DerivedObligation` to `WellFormedDeriveObligation`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Renamed `DerivedObligation` to `WellFormedDeriveObligation`
It's used when computing `WellFormed` obligations, so let's give it a less ambiguous name.
|
|
r=lcnr
Remove special-casing for `SimplifiedType` for next solver
It's unnecessary due to the way that we fully normalize the self type before assembly begins.
r? lcnr
|
|
Keep the LIB env var in the compiler-builtins test
The `tests/run-make/compiler-builtins` test was failing for me with Visual Studio 2022, complaining that it couldn't find `kernel32.lib`.
For whatever reason, with VS 2022 we need to keep the `LIB` environment variable when invoking Cargo so that the linker can find the Windows SDK libs.
|
|
Stablise io_error_downcast
Tracking issue #99262
Closes #99262
FCP completed in https://github.com/rust-lang/rust/issues/99262#issuecomment-2077374397
|
|
|
|
|
|
Rollup of 3 pull requests
Successful merges:
- #124313 (Detect borrow error involving sub-slices and suggest `split_at_mut`)
- #124374 (Don't ICE when `codegen_select_candidate` returns ambiguity in new solver)
- #124380 (`Range` iteration specialization: remove trivial bounds)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
`#[collapse_debuginfo]`
`-Z debug-macros` is "stabilized" by enabling it by default and removing.
`-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`.
It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no.
Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local).
`#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
|
|
`Range` iteration specialization: remove trivial bounds
These bounds on impl items are trivially true and never checked by a caller. They end up shadowing the actual impls, currently preventing normalization in the new solver. While we may have to fix the underlying issue in the new solver at some point, for now this is an easy way to get us closer to compiling core with `-Znext-solver`.
r? `@Nilstrieb`
|
|
Don't ICE when `codegen_select_candidate` returns ambiguity in new solver
Because we merge identical candidates, we may have >1 impl candidate to in `codegen_select_error` but *not* have a trait error.
r? lcnr
|
|
Detect borrow error involving sub-slices and suggest `split_at_mut`
```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/suggest-split-at-mut.rs:13:18
|
LL | let a = &mut foo[..2];
| --- first mutable borrow occurs here
LL | let b = &mut foo[2..];
| ^^^ second mutable borrow occurs here
LL | a[0] = 5;
| ---- first borrow later used here
|
= help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
```
Address most of #58792.
For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
|
|
|
|
|
|
|
|
Rollup of 2 pull requests
Successful merges:
- #124287 (Improved code with clippy)
- #124326 (tests: remove few ignore-stage2)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
tests: remove few ignore-stage2
beta was branched long ago, so can be removed
|
|
Improved code with clippy
I haven't used the bootstrapped compiler, but I think I have made some improvements using clippy. I have already made the following changes to the compiler:
Replaced `self.first().is_digit(10)` with `self.first().is_ascii_digit()` on lines 633, 664, and 680 of compiler/rust_lexer/src/lib.rs.
Removed unnecessary cast on line 262 of compiler/rustc_lexer/src/unescape.rs
Replaced ok_or_else with ok_or on line 303 of compiler/rustc_lexer/src/unescape.rs
Replaced `!std::env::var("RUSTC_BOOTSTRAP").is_ok()` with `std::env::var("RUSTC_BOOTSTRAP").is_err()` on line 4 of compiler/rustc_macros/build.rs
Removed needless borrow for generic argument `env`on line 53 of compiler/rust_llvm/build.rs
|
|
|
|
|
|
Emit suggestion when encountering
```rust
let a = &mut foo[0];
let b = &foo[1];
a.use_mut();
```
|
|
|
|
```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
--> $DIR/suggest-split-at-mut.rs:13:18
|
LL | let a = &mut foo[..2];
| --- first mutable borrow occurs here
LL | let b = &mut foo[2..];
| ^^^ second mutable borrow occurs here
LL | a[0] = 5;
| ---- first borrow later used here
|
= help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
```
Address most of #58792.
For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
|
|
|
|
Enforce closure args + return type are WF
I found this out when investigating https://github.com/rust-lang/rust/issues/123461#issuecomment-2040894359. Turns out we don't register WF obligations for closure args and return types, leading to the ICE.
~~I think this is a useful thing to check for, but I'd like to check what the fallout is.~~ crater is complete.
~~Worst case, I think we should enforce this across an edition boundary (and possibly eventually migrate this for all editions) -- this should be super easy to do, since this is a check in HIR wfcheck, so it can be made edition dependent.~~ I believe the regressions are manageable enough to not necessitate edition-specific behavior.
Fixes #123461
|
|
|
|
|
|
|
|
Fix some typos in comments
|
|
Miri subtree update
r? `@ghost`
|
|
|
|
CI: run benches with hyperfine rather than bash
The hyperfine installation is cached so this should not cost a lot of CI time.
This is step 1/2 to getting rid of the BASH variable hack.
|
|
|
|
Suggest ref mut for pattern matching assignment
Fixes #118596
|
|
add a test for the TLS memory leak
This is a regression test for https://github.com/rust-lang/rust/issues/123583.
|
|
|
|
|
|
|
|
beta was branched long ago, so can be removed
|
|
make miri-script a workspace root
This is needed to make miri-script build on stable (as is done by the `./miri` script) when the parent package uses unstable cargo features.
|
|
Automatic Rustup
|
|
Rollup of 3 pull requests
Successful merges:
- #124257 (Rewrite the `no-input-file.stderr` test in Rust and support diff)
- #124324 (Minor AST cleanups)
- #124327 (CI: implement job skipping in Python matrix calculation)
r? `@ghost`
`@rustbot` modify labels: rollup
|