| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Visit the AllocIds and BorTags in borrow state FrameExtra
Fixes https://github.com/rust-lang/miri/issues/3228
I said
> The obvious way would be to visit the AllocIds in borrow_tracker::FrameExtra in the GC.
Since I have had no new ideas, that's what this does.
|
|
|
|
Add a regression test for rust#115145
Per https://github.com/rust-lang/rust/pull/118805#issuecomment-1855264860
|
|
|
|
Automatic Rustup
|
|
|
|
|
|
Update to LLVM 17.0.6
This is a rebase on the final LLVM 17 release.
Includes the RISCV fix requested in https://github.com/rust-lang/llvm-project/pull/157 (and I think this is also the only change in this release that is relevant to rustc).
r? `@cuviper`
Fixes #117902
|
|
Rollup of 4 pull requests
Successful merges:
- #118908 (Add all known `target_feature` configs to check-cfg)
- #118933 (Cleanup errors handlers even more)
- #118943 (update `measureme` to 10.1.2 to deduplicate `parking_lot`)
- #118948 (Use the `Waker::noop` API in tests)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Use the `Waker::noop` API in tests
Avoids the need to duplicate this code over and over again
r? eholk
|
|
update `measureme` to 10.1.2 to deduplicate `parking_lot`
This PR updates `measureme` to the latest release to remove the last duplicates of `parking_lot` 0.11 we had in our dependency tree.
```console
Updating measureme v10.1.1 -> v10.1.2
Removing parking_lot v0.11.2
Removing parking_lot_core v0.8.6
```
Also removes `instant` from the allowed list of dependencies, as it's no longer used.
r? `@michaelwoerister` (Thanks for the release in the first place 🙏)
|
|
r=compiler-errors
Cleanup errors handlers even more
A sequel to #118587.
r? `@compiler-errors`
|
|
r=TaKO8Ki,GuillaumeGomez,workingjubilee
Add all known `target_feature` configs to check-cfg
This PR adds all the known `target_feature` from ~~`rustc_codegen_ssa`~~ `rustc_target` to the well known list of check-cfg.
It does so by moving the list from `rustc_codegen_ssa` to `rustc_target` ~~`rustc_session` (I not sure about this, but some of the moved function take a `Session`)~~, then using it the `fill_well_known` function.
This already proved to be useful since portable-simd had a bad cfg.
cc `@nnethercote` (since we discussed it in https://github.com/rust-lang/rust/pull/118494)
|
|
Currently, `emit_diagnostic` takes `&mut self`.
This commit changes it so `emit_diagnostic` takes `self` and the new
`emit_diagnostic_without_consuming` function takes `&mut self`.
I find the distinction useful. The former case is much more common, and
avoids a bunch of `mut` and `&mut` occurrences. We can also restrict the
latter with `pub(crate)` which is nice.
|
|
Compare `Handler::warn` and `Handler::span_warn`. Conceptually they are
almost identical. But their implementations are weirdly different.
`warn`:
- calls `DiagnosticBuilder::<()>::new(self, Warning(None), msg)`, then `emit()`
- which calls `G::diagnostic_builder_emit_producing_guarantee(self)`
- which calls `handler.emit_diagnostic(&mut db.inner.diagnostic)`
`span_warn`:
- calls `self.emit_diag_at_span(Diagnostic::new(Warning(None), msg), span)`
- which calls `self.emit_diagnostic(diag.set_span(sp))`
I.e. they both end up at `emit_diagnostic`, but take very different
routes to get there.
This commit changes `span_*` and similar ones to not use
`emit_diag_at_span`. Instead they just call `struct_span_*` + `emit`.
Some nice side-effects of this:
- `span_fatal` and `span_fatal_with_code` don't need
`FatalError.raise()`, because `emit` does that.
- `span_err` and `span_err_with_code` doesn't need `unwrap`.
- `struct_span_note`'s `span` arg type is changed from `Span` to
`impl Into<MultiSpan>` like all the other functions.
|
|
The `Handler` functions that directly emit diagnostics can be more
easily implemented using `struct_foo(msg).emit()`. This mirrors
`Handler::emit_err` which just does `create_err(err).emit()`.
`Handler::bug` is not converted because of weirdness involving
conflation bugs and fatal errors with `EmissionGuarantee`. I'll fix that
later.
|
|
To `msg: impl Into<DiagnosticMessage>`, like all the other diagnostics.
For consistency.
|
|
Rollup of 4 pull requests
Successful merges:
- #118910 ([rustdoc] Use Map instead of Object for source files and search index)
- #118914 (Unconditionally register alias-relate in projection goal)
- #118935 (interpret: extend comment on the inhabitedness check in downcast)
- #118945 (rustc_codegen_ssa: Remove trailing spaces in Display impl for CguReuse)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustc_codegen_ssa: Remove trailing spaces in Display impl for CguReuse
Otherwise errors will look like this:
error: CGU-reuse for `cgu_invalidated_via_import-bar` is `PreLto ` but should be `PostLto `
### Background
I noticed that error messages looked wonky while investigating if
https://github.com/rust-lang/rust/blob/529047cfc3f4f7b3ea5aaac054408f368d153727/compiler/rustc_codegen_ssa/src/assert_module_sources.rs#L281-L287
should not be wrapped by `sess.emit_err(...)`. Right now it looks like the error is accidentally ignored. It looks like https://github.com/rust-lang/rust/pull/100753/commits/706452eba74026c51e8d0fa30aee2497c69eafc0 might have accidentally started ignoring it (by removing the `diag.span_err()` call). I am still investigating, but regardless of the outcome we should fix the trailing whitespace.
|
|
interpret: extend comment on the inhabitedness check in downcast
Cc https://github.com/rust-lang/rust/issues/115145
r? ``@saethlin``
|
|
Unconditionally register alias-relate in projection goal
Follow-up to #118725, which subtly broke closure signature inference on combinators like `Result::map` which I noticed in syn.
Essentially, instead of using `eq` which will eagerly infer `?1 := <?2 as Trait>::Assoc`, we can directly emit an alias-relate goal, which will stay ambiguous for as long as `?2` is ambiguous.
This also more closely models the conceptual framing that projects-to acts like an alias-relate when solving, and like a normalizes-to when in a param env.
r? lcnr
|
|
[rustdoc] Use Map instead of Object for source files and search index
It's cleaner and is also easier to manipulate `Map` rather than `Object` types.
r? `@notriddle`
|
|
Add -Zunpretty=stable-mir output test
As strongly suggested here https://github.com/rust-lang/rust/pull/118364#issuecomment-1827974148 this adds output test for `-Zunpretty=stable-mir`, added test shows almost all the functionality of the current printer.
r? `@compiler-errors`
|
|
|
|
|
|
|
|
Otherwise errors will look like this:
error: CGU-reuse for `cgu_invalidated_via_import-bar` is `PreLto ` but should be `PostLto `
|
|
|
|
`-Ztrait-solver=next` to `-Znext-solver`
renames the feature flag to enable the new trait solver.
still want some feedback before merging: https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/renaming.20the.20feature.20flag.20to.20.60-Znew-solver.60.
The idea is to make it easier to add another option, e.g. to enable the solver in wfcheck or to optionally change its behavior to our new coinduction approach.
r? `@compiler-errors`
|
|
|
|
|
|
There are a number of fixes here:
* if-unchanged is supposed to be the default for channel=dev, but
actually used different logic. Make sure it is the same.
* If no llvm section was specified at all, different logic was
also used. Go through the standard helper.
* Some more assertions should depend on if_unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fix --dry-run when the change-id warning is printed
previously:
```
Building bootstrap
Compiling bootstrap v0.0.0 (/home/jyn/src/rust2/src/bootstrap)
Finished dev [unoptimized] target(s) in 4.23s
thread 'main' panicked at src/bin/main.rs:147:17:
fs::write(warned_id_path, latest_change_id.to_string()) failed with No such file or directory (os error 2)
```
|
|
|
|
use c literals in compiler and library
Relands refreshed https://github.com/rust-lang/rust/pull/111647
|
|
Add unstable `-Zdefault-hidden-visibility` cmdline flag for `rustc`.
The new flag has been described in the Major Change Proposal at
https://github.com/rust-lang/compiler-team/issues/656
|
|
|
|
|
|
fix dynamic size/align computation logic for packed types with dyn trait tail
This logic was never updated to support `packed(N)` where `N > 1`, and it turns out to be wrong for that case.
Fixes https://github.com/rust-lang/rust/issues/80925
`@bjorn3` I have not looked at cranelift; I assume it basically copied the size-of-val logic and hence could use much the same patch.
|
|
add test for uninhabited saved locals in a coroutine
adds the test from https://github.com/rust-lang/rust/pull/118871 in Miri as well
|
|
|