| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
This extends the existing logic which skips validating every integer or
floating point number type to also skip validating empty structs because
they are also trivially valid.
Fixes #67539
|
|
|
|
This fixes a a segfault in safe code, a stable regression. Reported in
\#69225.
This reverts commit a983e0590a43ed8b0f60417828efd4e79b51f494.
Also adds a test for the expected behaviour.
|
|
|
|
I believe rustdoc should not be conflating private items (visibility
lower than `pub`) and hidden items (attribute `doc(hidden)`). This
matters now that Cargo is passing --document-private-items by default
for bin crates. In bin crates that rely on macros, intentionally hidden
implementation details of the macros can overwhelm the actual useful
internal API that one would want to document.
This PR restores the strip-hidden pass when documenting private items,
and introduces a separate unstable --document-hidden-items option to
skip the strip-hidden pass. The two options are orthogonal to one
another.
|
|
(cherry picked from commit f6e9fd037a7b55f8f4fe78694b77d9788b18dfeb)
|
|
Use `shrink_to_hi` instead of `next_point`
Fix #68000.
(cherry picked from commit fcd850fc5db2501d14b2e0cbfac8aa890d700e55)
|
|
(cherry picked from commit 915db7ae6430baef99f186ba40f08e105b7694fe)
|
|
|
|
representation
|
|
|
|
|
|
|
|
PR https://github.com/rust-lang/rust/pull/66512 added the ability to set argv[0] on
Command. As a side effect, it changed the Debug output to print both the program and
argv[0], which in practice results in stuttery output ("echo echo foo").
This PR reverts the behaviour to the the old one, so that the command is only printed
once - unless arg0 has been set. In that case it emits "[command] arg0 arg1 ...".
|
|
Do not ICE on unnamed future
Fix #67252.
|
|
Enable `loop` and `while` in constants behind a feature flag
This PR is an initial implementation of #52000. It adds a `const_loop` feature gate, which allows `while` and `loop` expressions through both HIR and MIR const-checkers if enabled. `for` expressions remain forbidden by the HIR const-checker, since they desugar to a call to `IntoIterator::into_iter`, which will be rejected anyways.
`while` loops also require [`#![feature(const_if_match)]`](https://github.com/rust-lang/rust/pull/66507), since they have a conditional built into them. The diagnostics from the HIR const checker will suggest this to the user.
r? @oli-obk
cc @rust-lang/wg-const-eval
|
|
|
|
r=centril
Revert stabilization of never type
Fixes https://github.com/rust-lang/rust/issues/66757
I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean.
( cc @Centril, author of #65355, you may want to check this over briefly )
|
|
|
|
|
|
|
|
This reverts commit 8f6197f39f7d468dfc5b2bd41dae4769992a2f83.
|
|
Require stable/unstable annotations for the constness of all stable fns with a const modifier
r? @RalfJung @Centril
Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
|
|
Point at method call when type annotations are needed
- Point at method call instead of whole expression when type annotations are needed.
- Suggest use of turbofish on function and methods.
Fix #49391, fix #46333, fix #48089. CC #58517, #63502, #63082.
Fixes https://github.com/rust-lang/rust/issues/40015
r? @nikomatsakis
|
|
`coerce_inner`: use initial `expected_ty`
Fixes #67273.
Follow-up to #59439.
r? @oli-obk
|
|
r=varkor,Centril,estebank
Improve diagnostics and code for exhaustiveness of empty matches
There was a completely separate check and diagnostics for the case of an empty match. This led to slightly different error messages and duplicated code.
This improves code reuse and generally clarifies what happens for empty matches. This also clarifies the action of the `exhaustive_patterns` feature, and ensures that this feature doesn't change diagnostics in places it doesn't need to.
|
|
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
functions with a `const` modifier
|
|
|
|
parser: recover on `&'lifetime mut? $pat`.
r? @estebank
|
|
Require `allow_internal_unstable` for stable min_const_fn using unsta…
…ble features
r? @Centril
cc @ecstatic-morse @RalfJung
|
|
Don't suggest wrong snippet in closure
Fixes #67190
r? @estebank
|
|
|
|
features
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #62514 (Clarify `Box<T>` representation and its use in FFI)
- #66983 (Fix `unused_parens` triggers on macro by example code)
- #67215 (Fix `-Z print-type-sizes`'s handling of zero-sized fields.)
- #67230 (Remove irelevant comment on `register_dtor`)
- #67236 (resolve: Always resolve visibilities on impl items)
- #67237 (Some small readability improvements)
- #67238 (Small std::borrow::Cow improvements)
- #67239 (Make TinyList::remove iterate instead of recurse)
Failed merges:
r? @ghost
|
|
|
|
resolve: Always resolve visibilities on impl items
Fixes https://github.com/rust-lang/rust/issues/64705.
Similarly to https://github.com/rust-lang/rust/pull/67106 this was an issue with visitor discipline.
Impl items were visited as a part of visiting `ast::ItemKind::Impl`, but they should be visit-able in isolation from their parents as well, because that's how they are visited when they are expanded from macros.
I've checked that all the remaining `resolve_visibility` calls are used correctly.
r? @matthewjasper
|