| Age | Commit message (Collapse) | Author | Lines |
|
Don't allow unsafe statics outside of extern blocks (beta version)
This PR fixes a regression where we allowed `unsafe static` items in top-level modules (i.e. outside of `unsafe extern` blocks).
#127943 does not rebase cleanly, so I've prepared an extremely pared down version of this PR for beta purposes.
|
|
|
|
reverts #119820
(cherry picked from commit f77394fdf3f45188d3f110f72f31c4233d4d38eb)
|
|
(cherry picked from commit f17b27b3014adea0c40df55b31bd2fbbd72e76c4)
|
|
as request T-lang is requesting some major changes in the lint inner
workings in #126768#issuecomment-2192634762
(cherry picked from commit 0c0dfb88eeefbbaa4c10cfa4a7f0e16541e086eb)
|
|
(cherry picked from commit 108b3f214a7e160ecb7ac2ec05bbb41aedd05a95)
|
|
(cherry picked from commit 64450732be8c3111360589e9f8c44eab83f449e0)
|
|
the specialized impl
(cherry picked from commit 4b188d9d667dfcc7ba4caf95e56cbb3a6697f292)
|
|
opaque types."
This reverts commit 29a630eb72ffb94c3708947afae1e948ad3cb189.
(cherry picked from commit 6cca6da1265b9bede368f34da6be42057adc9834)
|
|
|
|
Stabilize Option::take_if
Closes #98934
ed: FCP complete in https://github.com/rust-lang/rust/issues/98934#issuecomment-2104627082
|
|
Revert "Use the HIR instead of mir_keys for determining whether something will have a MIR body."
This reverts commit e5cba17b84bf7bf755686e8bb36aa3775ef53f77.
turns out SMIR still needs it (https://github.com/model-checking/kani/issues/3218). I'll create a full plan and MCP for what I intended this to be a part of. Maybe my plan is nonsense anyway.
|
|
More `rustc_parse` cleanups
Following on from #125815.
r? `@spastorino`
|
|
Detect pub structs never constructed and unused associated constants
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
Lints never constructed public structs.
If we don't provide public methods to construct public structs with private fields, and don't construct them in the local crate. They would be never constructed. So that we can detect such public structs.
---
Update:
Also lints unused associated constants in traits.
|
|
Parse unsafe attributes
Initial parse implementation for #123757
This is the initial work to parse unsafe attributes, which is represented as an extra `unsafety` field in `MetaItem` and `AttrItem`. There's two areas in the code where it appears that parsing is done manually and not using the parser stuff, and I'm not sure how I'm supposed to thread the change there.
|
|
Revert: create const block bodies in typeck via query feeding
as per the discussion in https://github.com/rust-lang/rust/pull/125806#discussion_r1622563948
It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.
reverts the const-block-specific parts of https://github.com/rust-lang/rust/pull/124650
`@bors` rollup=never had a small perf impact previously
fixes https://github.com/rust-lang/rust/issues/125846
r? `@compiler-errors`
|
|
This reverts commit ddc5f9b6c1f21da5d4596bf7980185a00984ac42.
|
|
This reverts commit eae5031ecbda434e92966099e0dc93917de03eff.
|
|
Rollup of 7 pull requests
Successful merges:
- #125606 (Size optimize int formatting)
- #125724 (Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`)
- #126040 (Don't warn on fields in the `unreachable_pub` lint )
- #126098 (Remove `same-lib-two-locations-no-panic` run-make test)
- #126099 (Crate loader cleanups)
- #126101 (Revert "Disallow ambiguous attributes on expressions" on nightly)
- #126103 (Improve Docs for `hir::Impl` and `hir::ImplItem`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Improve Docs for `hir::Impl` and `hir::ImplItem`
Based on https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20Difference.20between.20.60hir.3A.3AImplItem.60.20and.20.60hir.3A.3AImpl.60.3F/near/442650915
r? fmease
|
|
Revert "Disallow ambiguous attributes on expressions" on nightly
As discussed in [today's t-compiler meeting](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-06-06/near/443079505), this reverts PR #124099 to fix P-critical beta regressions #125199.
r? ``@wesleywiser``
Opening as draft so that ``@wesleywiser`` and ``@apiraino,`` you can tell me whether you wanted:
1. a `beta-accepted` revert of #124099 on nightly (this PR)? That will need to be backported to beta (even though #126093 may be the last of those)
2. a revert of #124099 on beta?
3. all of the above?
I also opened #126102, another draft PR to revert #124099 on beta, should you choose options 2 or 3.
|
|
Crate loader cleanups
Minor cleanups I found while trying to understand how all of this works
|
|
Don't warn on fields in the `unreachable_pub` lint
This PR restrict the `unreachable_pub` lint by not linting on `pub` fields of `pub(restricted)` structs and unions. This is done because that can quickly clutter the code for an uncertain value, in particular since the "real" visibility is defined by the parent (the struct it-self).
This is meant to address one of the last concern of the `unreachable_pub` lint.
r? ``@petrochenkov``
|
|
Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`
For use in the new solver. This doesn't yet uplift `ObligationEmittingRelation`.
r? lcnr
|
|
Stabilize order of MonoItems in CGUs and disallow query_instability lint for rustc_monomorphize
The HashStable impl for `CodegenUnit` was incorrect as described in [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). This PR removes any indeterminism from the way codegen units are built. The changes are pretty straightforward.
Part of https://github.com/rust-lang/rust/issues/84447 and [MCP 533](https://github.com/rust-lang/compiler-team/issues/533).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 12 pull requests
Successful merges:
- #125220 (Repair several `riscv64gc-unknown-linux-gnu` codegen tests)
- #126033 (CI: fix publishing of toolstate history)
- #126034 (Clarify our tier 1 Windows Server support)
- #126035 (Some minor query system cleanups)
- #126051 (Clarify an `x fmt` error.)
- #126059 (Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB)
- #126064 (Migrate `run-make/manual-crate-name` to `rmake.rs`)
- #126072 (compiletest: Allow multiple `//@ run-flags:` headers)
- #126073 (Port `tests/run-make-fulldeps/obtain-borrowck` to ui-fulldeps)
- #126081 (Do not use relative paths to Rust source root in run-make tests)
- #126086 (use windows compatible executable name for libcxx-version)
- #126096 ([RFC-2011] Allow `core_intrinsics` when activated)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
[RFC-2011] Allow `core_intrinsics` when activated
Fix #120612
|
|
Some minor query system cleanups
* Improves diagnostics on conflicting query flags
* removes unnecessary impls
* `track_caller`
pulled out of https://github.com/rust-lang/rust/pull/115613
|
|
r=davidtwco"
This reverts commit 57dad1d75e562ff73051c1c43b07eaf65c7dbd74, reversing
changes made to 36316df9fe6c3e246153fe6e78967643cf08c148.
|
|
Revert "use `tcx.used_crates(())` more" before it reaches beta
There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.
fixes https://github.com/rust-lang/rust/issues/125474
fixes https://github.com/rust-lang/rust/issues/125484
fixes https://github.com/rust-lang/rust/issues/125646
fixes https://github.com/rust-lang/rust/issues/125707
fixes #126066
fixes #125934
fixes https://github.com/rust-lang/rust/issues/126021
r? `@petrochenkov`
`@bors` p=1
|
|
Simplify the path operation with `join`, clarify some of the names.
|
|
|
|
|
|
|
|
|
|
|
|
will have a MIR body."
This reverts commit e5cba17b84bf7bf755686e8bb36aa3775ef53f77.
|