| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
|
|
This commits adds in some additional hooks to allow Miri to properly
handle panic unwinding. None of this should have any impact on CTFE mode
|
|
|
|
|
|
|
|
|
|
|
|
It was only used at a single location
|
|
Rollup of 7 pull requests
Successful merges:
- #65719 (Refactor sync::Once)
- #65831 (Don't cast directly from &[T; N] to *const T)
- #66048 (Correct error in documentation for Ipv4Addr method)
- #66058 (Correct deprecated `is_global` IPv6 documentation)
- #66216 ([mir-opt] Handle return place in ConstProp and improve SimplifyLocals pass)
- #66217 (invalid_value lint: use diagnostic items)
- #66235 (rustc_metadata: don't let LLVM confuse rmeta blobs for COFF object files.)
Failed merges:
r? @ghost
|
|
[mir-opt] Handle return place in ConstProp and improve SimplifyLocals pass
Temporarily rebased on top of #66074. The top 2 commits are new.
r? @oli-obk
|
|
Don't cast directly from &[T; N] to *const T
Split out from #64588
r? @oli-obk
|
|
[mir-opt] Implement pass to remove branches on uninhabited variants
Based on discussion [here](https://github.com/rust-lang/rust/pull/64890#discussion_r333612125), this is a pass to eliminate dead code that is caused by branching on an enum with uninhabited variants.
r? @oli-obk
|
|
|
|
|
|
We don't do promotion here anymore, so `Checker` will never even visit
the body of a non-const `fn`.
|
|
|
|
`remove_storage_dead_and_drop` has been copied to `promote_temps` and
now operates on an array of `Candidate`s instead of a bitset.
|
|
|
|
`MethodSig` -> `FnSig` & Use it in `ItemKind::Fn`
In both AST & HIR, rename `MethodSig` to `FnSig` and then proceed to use it in `ItemKind::Fn` so that the overall structure is more regular.
r? @davidtwco
|
|
miri: Rename to_{u,i}size to to_machine_{u,i}size
Having a function `to_usize` that does not return a (host) usize is somewhat confusing, so let's rename it.
r? @oli-obk
|
|
rename Memory::get methods to get_raw to indicate their unchecked nature
Some recent Miri PRs started using these methods when they should not; this should discourage their use.
In fact we could make these methods private to the `interp` module as far as Miri is concerned -- with the exception of the `uninit` intrinsic which will hopefully go away soon. @bjorn3 @oli-obk does priroda need these methods? It would be great to be able to seal them away.
|
|
Transition future compat lints to {ERROR, DENY} - Take 2
Follow up to https://github.com/rust-lang/rust/pull/63247 implementing https://github.com/rust-lang/rust/pull/63247#issuecomment-536295992.
- `legacy_ctor_visibility` (ERROR) -- closes #39207
- `legacy_directory_ownership` (ERROR) -- closes #37872
- `safe_extern_static` (ERROR) -- closes #36247
- `parenthesized_params_in_types_and_modules` (ERROR) -- closes #42238
- `duplicate_macro_exports` (ERROR)
- `nested_impl_trait` (ERROR) -- closes #59014
- `ill_formed_attribute_input` (DENY) -- transitions #57571
- `patterns_in_fns_without_body` (DENY) -- transitions #35203
r? @varkor
cc @petrochenkov
|
|
This handles the case where a user explicitly annotations a closure
signature with a opaque return type.
Fixes #63263
|
|
|
|
|
|
Having a function `to_usize` that does not return a usize is somewhat confusing
|
|
|
|
r=eddyb
Remove promotion candidate gathering and checking from `qualify_consts.rs`
This makes promotion candidate gathering and checking the exclusive domain of `promote_consts`, but the `QualifyAndPromoteConsts` pass is still responsible for both const-checking and creating promoted MIR fragments.
This should not be merged until the beta branches on Nov. 5.
r? @eddyb
|
|
syntax: ABI-oblivious grammar
This PR has the following effects:
1. `extern $lit` is now legal where `$lit:literal` and `$lit` is substituted for a string literal.
2. `extern "abi_that_does_not_exist"` is now *syntactically* legal whereas before, the set of ABI strings was hard-coded into the grammar of the language. With this PR, the set of ABIs are instead validated and translated during lowering. That seems more appropriate.
3. `ast::FloatTy` is now distinct from `rustc_target::abi::FloatTy`. The former is used substantially more and the translation between them is only necessary in a single place.
4. As a result of 2-3, libsyntax no longer depends on librustc_target, which should improve pipe-lining somewhat.
cc @rust-lang/lang -- the points 1-2 slightly change the definition of the language but in a way which seems consistent with our general principles (in particular wrt. the discussions of turning things into semantic errors). I expect this to be uncontroversial but it's worth letting y'all know. :)
r? @varkor
|
|
Use structured suggestions for missing associated items
When encountering an `impl` that is missing associated items required by its `trait`, use structured suggestions at an appropriate place in the `impl`.
|
|
We also sever syntax's dependency on rustc_target as a result.
This should slightly improve pipe-lining.
Moreover, some cleanup is done in related code.
|
|
|
|
Miri: Refactor to_scalar_ptr out of existence
`to_scalar_ptr` is somewhat subtle as it just throws away the 2nd component of a `ScalarPair` if there is one -- without any check if this is truly a pointer or so. And indeed we used it wrong on two occasions!
So I fixed those two, and then refactored things such that everyone calls `ref_to_mplace` instead (which they did anyway, I just moved up the calls), which is the only place that should interpret a `ScalarPair` as a wide ptr -- and it checks the type first. Thus we can remove `to_scalar_ptr` and `to_meta`.
r? @oli-obk
|
|
Fix promotion in a `const` when projections are present
Resolves #65727.
This marks the entire local as "needs promotion" when only a projection of that local appears in a promotable context. This should only affect promotion in a `const` or `static`, not in a `fn` or `const fn`, which is handled in `promote_consts.rs`.
r? @eddyb
|
|
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
The former was cleared from `qualifs_in_return_place`, and the latter
was never checked. `QUALIF_ERROR_BIT` no longer corresponds to a real
`Qualif`, however.
|