| Age | Commit message (Collapse) | Author | Lines |
|
compiletest: strip debuginfo by default for mode=ui
This reduces occupied disk space, for example for src/test/ui it drops from 1972mb to 132mb (x86_64-pc-windows-msvc).
Individual tests that require debuginfo/symbols should turn this option off (as in fixed tests).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Suggest defining variable as mutable on `&mut _` type mismatch in pats
Suggest writing `mut a` where `&mut a` was written but a non-ref type provided.
Since we still don't have "apply either one of the suggestions but not both" kind of thing, the interaction with the suggestion of removing `&[mut]` or moving it to the type is weird, and idk how to make it better..
r? ``@compiler-errors``
|
|
Use correct substs in enum discriminant cast
Fixes https://github.com/rust-lang/rust/issues/97634
r? ```@lcnr```
|
|
r=compiler-errors
Point to type parameter definition when not finding variant, method and associated item
fixes #77391
|
|
|
|
|
|
|
|
Previously, the expand_expr method would expand bool literals as a
`Literal` token containing a `LitKind::Bool`, rather than as an `Ident`.
This is not a valid token, and the `LitKind::Bool` case needs to be
handled seperately.
Tests were added to more deeply compare the streams in the expand-expr
test suite to catch mistakes like this in the future.
|
|
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #91264 (Add macro support in jump to definition feature)
- #96955 (Remove (transitive) reliance on sorting by DefId in pretty-printer)
- #97633 (Session object: Set OS/ABI)
- #98039 (Fix `panic` message for `BTreeSet`'s `range` API and document `panic` cases)
- #98214 (rustc_target: Remove some redundant target properties)
- #98280 (Improve suggestion for calling fn-like expr on type mismatch)
- #98394 (Fixup missing renames from `#[main]` to `#[rustc_main]`)
- #98411 (Update tendril)
- #98419 (Remove excess rib while resolving closures)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
r=estebank
Improve suggestion for calling fn-like expr on type mismatch
1.) Suggest calling values of with RPIT types (and probably TAIT) when we expect `Ty` and have `impl Fn() -> Ty`
2.) Suggest calling closures even when they're not assigned to a local variable first
3.) Drive-by fix of a pretty-printing bug (`impl Fn()-> Ty` => `impl Fn() -> Ty`)
r? ```@estebank```
|
|
Remove (transitive) reliance on sorting by DefId in pretty-printer
This moves us a step closer to removing the `PartialOrd/`Ord` impls
for `DefId`. See #90317
|
|
fix universes in the NLL type tests
In the NLL code, we were not accommodating universes in the
`type_test` logic.
Fixes #98095.
r? `@compiler-errors`
This breaks some tests, however, so the purpose of this branch is more explanatory and perhaps to do a crater run.
|
|
r=eholk
Address review comments from #98259
It got approved so fast I didn't have time to make changes xD
r? ``@eholk``
|
|
Migrate two diagnostics from the `rustc_builtin_macros` crate
Migrate two diagnostics to use the struct derive and be translatable.
r? ```@davidtwco```
|
|
r=compiler-errors
Point at private fields in struct literal
closes #95872
|
|
r=petrochenkov
Provide a `PathSegment.res` in more cases
I find that in many cases, the `res` associated with a `PathSegment` is `Res::Err` even though the path was fully resolved. A few diagnostics use this `res` and their error messages suffer because of the lack of resolved segment.
This fixes it a bit, but it's obviously not complete and I'm not exactly sure if it's correct.
|
|
Greatly improve error reporting for futures and generators in `note_obligation_cause_code`
Most futures don't go through this code path, because they're caught by
`maybe_note_obligation_cause_for_async_await`. But all generators do,
and `maybe_note` is imperfect and doesn't catch all futures. Improve the error message for those it misses.
At some point, we may want to consider unifying this with the code for `maybe_note_async_await`,
so that `async_await` notes all parent constraints, and `note_obligation` can point to yield points.
But both functions are quite complicated, and it's not clear to me how to combine them;
this seems like a good incremental improvement.
Helps with https://github.com/rust-lang/rust/issues/97332.
r? ``@estebank`` cc ``@eholk`` ``@compiler-errors``
|
|
Give name if anonymous region appears in impl signature
Fixes #98170
We probably should remove the two unwraps in [`report_general_error`](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_borrowck/diagnostics/region_errors.rs.html#683-685), but I have no idea what to provide if those regions are missing, so I've kept those in. Let me know if I should try harder to remove those.
|
|
|
|
Hat-tip: aliemjay
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
|
|
This moves us a step closer to removing the `PartialOrd/`Ord` impls
for `DefId`. See #90317
|
|
|
|
Create elided lifetime parameters for function-like types
Split from https://github.com/rust-lang/rust/pull/97720
This PR refactor lifetime generic parameters in bare function types and parenthesized traits to introduce the additional required lifetimes as fresh parameters in a `for<>` bound.
This PR does the same to lifetimes appearing in closure signatures, and as-if introducing `for<>` bounds on closures (without the associated change in semantics).
r? `@petrochenkov`
|
|
Add some tests for impossible bounds
Adds test for #93008
Adds test for #94680
Closes #94999
Closes #95640
|
|
Point at return expression for RPIT-related error
Certainly this needs some diagnostic refining, but I wanted to show that it was possible first and foremost. Not sure if this is the right approach. Open to feedback.
Fixes #80583
|
|
|
|
use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span`
use `body_id.owner` directly
add description to label
|
|
|
|
r=estebank
Collapse multiple dead code warnings into a single diagnostic
closes #97643
|
|
|
|
|
|
|
|
It got merged so fast I didn't have time to make changes xD
|
|
Remove the unused-`#[doc(hidden)]` logic from the `unused_attributes` lint
Fixes #96890.
It was found out that `#[doc(hidden)]` on trait impl items does indeed have an effect on the generated documentation (see the linked issue). In my opinion and the one of [others](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Validy.20checks.20for.20.60.23.5Bdoc.28hidden.29.5D.60/near/281846219), rustdoc's output is actually a bit flawed in that regard but that should be tracked in a new issue I suppose (I will open an issue for that in the near future).
The check was introduced in #96008 which is marked to be part of version `1.62` (current `beta`). As far as I understand, this means that **this PR needs to be backported** to `beta` to fix #96890 on time. Correct me if I am wrong.
CC `@dtolnay` (in case you would like to agree or disagree with my decision to fully remove this check)
`@rustbot` label A-lint T-compiler T-rustdoc
r? `@rust-lang/compiler`
|
|
Add a full regression test for #73727
Closes #73727
This also moves a test to the `issues` directory as it's also tested on the adt_const_params feature.
r? ```@compiler-errors```
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|