| Age | Commit message (Collapse) | Author | Lines |
|
Use `ObligationCtxt` in favor of `TraitEngine` in many more places
r? lcnr
|
|
Generalize `adjust_from_tcx` for `Allocation`
Previously, `adjust_from_tcx` would take an `Allocation` and "adjust allocation from the ones in `tcx` to a custom Machine instance [...]".
This PR generalizes this so the Machine instance can also determine the `Bytes` type of the output `Allocation`.
r? `@RalfJung`
|
|
|
|
|
|
|
|
r=compiler-errors
AST pretty: Use `builtin_syntax` for type ascription
Follow-up to #122806.
CC #124619.
|
|
Tweak `consts_may_unify`
r? ````@lcnr````
|
|
|
|
|
|
|
|
It is currently an enum and the `tts` and `idx` fields are repeated
across the two variants.
This commit splits it into a struct `Frame` and an enum `FrameKind`, to
factor out the duplication. The commit also renames `Frame::new` as
`Frame::new_delimited` and adds `Frame::new_sequence`. I.e. both
variants now have a constructor.
|
|
Because the type is not obvious, and this clarifies things.
|
|
Alongside the existing `Invocation::span`.
|
|
Too clever by half, IMO.
|
|
Control flow never gets past the end of the `ExpandResult::Retry` match
arm, due to the `span_bug` and the `continue`. Therefore, the code after
the match can only be reached from the `ExpandResult::Ready` arm.
This commit moves that code after the match into the
`ExpandResult::Ready` arm, avoiding the need for the `continue` in the
`ExpandResult::Retry` arm.
|
|
|
|
|
|
They each have a single call site.
|
|
|
|
|
|
|
|
|
|
|
|
Sort them, and remove the unused ones (`lint_reasons` and
`proc_macro_span`).
|
|
`ConstKind::Value` is the only variant where control flow leaves the
first match on `impl_ct.kind()`, so there is no need for a second match
on the same expression later on.
|
|
interpret: hide some reexports in rustdoc
Cc https://github.com/rust-lang/rust/issues/124608
|
|
Use `tcx.types.unit` instead of `Ty::new_unit(tcx)`
I don't think there is any need for the function, given that we can just access the `.types`, similarly to all other primitives?
|
|
shallow resolve in orphan check
r? ``@compiler-errors`` cc https://github.com/rust-lang/rust/pull/124588#pullrequestreview-2036012292
|
|
Align: add bytes_usize and bits_usize
This matches `Size::bytes/bits_usize`. I recently wanted this in Miri as well.
|
|
remove extraneous note on `UnableToRunDsymutil` diagnostic
If I understand [this FIXME](https://github.com/rust-lang/rust/blob/1367827eac3d813a261a4c444037af9736996daa/compiler/rustc_macros/src/diagnostics/diagnostic.rs#L205) correctly, it seems we don't yet validate subdiagnostics, so `#[note]` and co in the `#[derive(Diagnostic]` item could be out-of-sync with the fluent message, without causing compile errors.
It was the case for `rustc_codegen_ssa::errors::UnableToRunDsymutil`, causing the ICE in #124392.
I've grepped and scripted my way through most of our diagnostics structs and fluent bundles and the above was the only such extraneous `#[note]`/`#[note(name)]`/`#[help]`/`#[warning]` I could find, so hopefully there aren't many others like it.
I haven't checked if the opposite can happen, a `.note = ` in a fluent message that is lacking a corresponding `#[note]` on the struct and not causing an error, but maybe it's possible?
r? ``@davidtwco``
fixes #124392
|
|
|
|
|
|
|
|
always print nice 'std not found' error when std is not found
Fixes https://github.com/rust-lang/miri/issues/3529
Arguably Miri is doing something odd by letting people create no-std sysroots for arbitrary targets -- but equally arguably, there's no good reason for rustc to special-case the host triple here. Being a non-host triple does not imply the target is a no-std target, after all.
|
|
r=michaelwoerister,GuillaumeGomez
Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint
This PR adjust the help suggestion of the `non_local_definitions` lint when encountering a `#[macro_export]` at top-level doctest.
So instead of a non-sentential help suggestion to move the `macro_rules!` up above the `rustdoc`-generated function. We now suggest users to declare their own function.
Fixes *(partially, needs backport)* #124534
|
|
Bump bootstrap compiler to latest beta
https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
This also cherry-picks d716d72586548963f32e5c8d57c41db0065fa6e0 from the beta branching, to continue to workaround #122758.
r? bootstrap
|
|
r=compiler-errors
Add a lint against never type fallback affecting unsafe code
~~I'm not very happy with the code quality... `VecGraph` not allowing you to get predecessors is very annoying. This should work though, so there is that.~~ (ended up updating `VecGraph` to support getting predecessors)
~~First few commits are from https://github.com/rust-lang/rust/pull/123934 https://github.com/rust-lang/rust/pull/123980~~
|
|
|
|
|
|
(never_type_fallback_flowing_into_unsafe)
|
|
|
|
|
|
|
|
|
|
|
|
This is a workaround for #122758, but it's not clear why 1.79 requires a
more extensive amount of no_inline than the previous release. Seems like
there's something relatively subtle happening here.
|
|
|
|
Rewrite select (in the new solver) to use a `ProofTreeVisitor`
We can use a proof tree visitor rather than collecting and recomputing all the nested goals ourselves.
Based on #124415
|
|
|
|
fix `NormalizesTo` proof tree issue
fixes #124422
cc #121848
r? ``@compiler-errors``
|