| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Fix ICE from #105101
Fixes #105101
Rather than comparing idents, compare spans, which should be unique to each variant.
|
|
Fix `expr_to_spanned_string` ICE
Fixes #105011
|
|
Attribute cleanups
Best reviewed one commit at a time.
r? `@petrochenkov`
|
|
|
|
Async lowering turns async functions and blocks into generators internally.
Though these special kinds of generators should not `impl Generator` themselves.
The other way around, normal generators should not `impl Future`.
|
|
Add a regression test for #104322
r? ``@compiler-errors``
|
|
Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code
Fixes #104884
|
|
shorthand scenario
|
|
|
|
|
|
|
|
|
|
Fix an ICE parsing a malformed literal in `concat_bytes!`.
Fixes #104769.
r? `@petrochenkov`
|
|
Restore control flow on error in EUV
cc `@Nilstrieb`
Fix #104649
Since #98574 refactored a piece of scrutinee memory categorization out as a subroutine, there is a subtle change in handling match arms especially when the categorization process faults and bails. In the correct case, it is not supposed to continue to process the arms any more. This PR restores the original control flow in EUV.
I promise to add a compile-fail test to demonstrate that this indeed fixes the issue after coming back from a nap.
|
|
|
|
Fixes #104769.
|
|
type alias impl trait: add tests showing that hidden type only outlives lifetimes that occur in bounds
fixes #103642
https://github.com/rust-lang/rust/pull/102417 only made sure that hidden types cannot outlive lifetimes other than the ones mentioned on bounds, but didn't allow us to actually infer anything from that.
cc `@aliemjay`
|
|
|
|
trait bounds in derive macro code
|
|
Clean up pr 104954
UI test filename typo fix and a simple comment rewording. Thanks.
CC `@vincenzopalazzo` (you spelled your name wrongly in the FIXME)
r? `@estebank`
|
|
Revert #104269 (to avoid spurious hang/test failure in CI)
Causes hangs/memory overflows in the test suite apparently :cry:
Reopens #104225
Fixes #104957
r? ``@lcnr``
|
|
|
|
In `Expander::expand` the code currently uses `mk_attr_outer` to convert
a `MetaItem` to an `Attribute`, and then follows that with
`meta_item_list` which converts back. This commit avoids the unnecessary
conversions.
There was one wrinkle: the existing conversions caused the bogus `<>` on
`Default<>` to be removed. With the conversion gone, we get a second
error message about the `<>`. This is a rare case, so I think it
probably doesn't matter much.
|
|
|
|
|
|
|
|
|
|
|
|
On type error with long types, print an abridged type and write the full
type to disk.
Print the widest possible short type while still fitting in the
terminal.
|
|
Avoid ICE if the Clone trait is not found while building error suggestions
Fixes #104870
r? `@compiler-errors`
|
|
make simple check of prinf function
Fixes https://github.com/rust-lang/rust/issues/92898
With this commit we start to make some simple
check when the name resolution fails, and
we generate some helper messages in case the
name is a C name like in the case of the `printf`
and suggest the correct rust method.
`@rustbot` r? `@pnkfelix`
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
|
|
Ignore bivariant parameters in test_type_match.
https://github.com/rust-lang/rust/pull/103491 made opaque types bivariant with respect of some of their lifetime parameters. Because of this bivariance, some lifetime variables were not unified to anything during borrowck, and were considered as unequal by borrowck type test.
This PR makes type test ignore the bivariant parameters in test_type_match.
Fixes https://github.com/rust-lang/rust/issues/104815
r? `@oli-obk`
|
|
Rollup of 6 pull requests
Successful merges:
- #104360 (Stabilize native library modifier `verbatim`)
- #104732 (Refactor `ty::ClosureKind` related stuff)
- #104795 (Change multiline span ASCII art visual order)
- #104890 (small method code cleanup)
- #104907 (Remove `SelectionContext::infcx()` in favor of field access)
- #104927 (Simplify some binder shifting logic)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Update VecDeque implementation to use head+len instead of head+tail
(See #99805)
This changes `alloc::collections::VecDeque`'s internal representation from using head and tail indices to using a head index and a length field. It has a few advantages over the current design:
* It allows the buffer to be of length 0, which means the `VecDeque::new` new longer has to allocate and could be changed to a `const fn`
* It allows the `VecDeque` to fill the buffer completely, unlike the old implementation, which always had to leave a free space
* It removes the restriction for the size to be a power of two, allowing it to properly `shrink_to_fit`, unlike the old `VecDeque`
* The above points also combine to allow the `Vec<T> -> VecDeque<T>` conversion to be very cheap and guaranteed O(1). I mention this in the `From<Vec<T>>` impl, but it's not a strong guarantee just yet, as that would likely need some form of API change proposal.
All the tests seem to pass for the new `VecDeque`, with some slight adjustments.
r? `@scottmcm`
|
|
Change multiline span ASCII art visual order
Tweak the ASCII art for nested multiline spans so that we minimize line overlaps.
Partially addresses https://github.com/rust-lang/rust/issues/61017.
|
|
Stabilize native library modifier `verbatim`
Stabilization report - https://github.com/rust-lang/rust/pull/104360#issuecomment-1312724787.
cc https://github.com/rust-lang/rust/issues/81490
Closes https://github.com/rust-lang/rust/issues/99425
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #95836 (Use `rust_out{exe_suffix}` for doctests)
- #104882 (notify lcnr on changes to `ObligationCtxt`)
- #104892 (Explain how to get the discriminant out of a `#[repr(T)] enum` with payload)
- #104917 (Allow non-org members to label `requires-debug-assertions`)
- #104931 (Pretty-print generators with their `generator_kind`)
- #104934 (Remove redundant `all` in cfg)
- #104944 (Support unit tests for jsondoclint)
- #104946 (rustdoc: improve popover focus handling JS)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Pretty-print generators with their `generator_kind`
After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally.
This now reverses that change so that async fn/blocks are pretty-printed as `[$async-type@$source-position]` in various diagnostics, and updates the tests that this touches.
|
|
Separate lifetime ident from lifetime resolution in HIR
Drive-by: change how suggested generic args are computed.
Fixes https://github.com/rust-lang/rust/issues/103815
I recommend reviewing commit-by-commit.
|
|
With this commit we start to make some simple
check when the name resolution fails, and
we generate some helper message in case the
name is a C name like in the case of the `printf`
and suggest the correct rust method.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
|
|
Various cleanups around scalar layout restrictions
Pulled out of https://github.com/rust-lang/rust/pull/103724
|
|
This fixes a number of correctness issues from the previous version. Additionally, we use a new
strategy which has much better performance charactersitics and also finds more opportunities to
apply the optimization.
|
|
This reverts commit cbe932801892da06688b53638622be1c8a1c8974.
|