Commit Graph

245230 Commits

Author SHA1 Message Date
Nicholas Nethercote
a9a2e1565a Diagnostic cleanups
- `emitted_at` isn't used outside the crate.
- `code` and `messages` are public fields, so there's no point have
  trivial getters/setters for them.
- `suggestions` is public, so the comment about "functionality on
  `Diagnostic`" isn't needed.
2024-02-03 09:02:50 +11:00
Nicholas Nethercote
585367f15f Remove an out-of-date comment.
`DiagnosticBuilderInner` was removed some time ago.
2024-02-03 09:02:50 +11:00
Nicholas Nethercote
54c4f94896 Make some fatal errors more concise. 2024-02-03 09:02:50 +11:00
Lukas Markeffsky
30e7b87e26 miri: normalize struct tail in ABI compat check 2024-02-02 21:39:00 +01:00
Ralf Jung
61d1ebe50b
fix typo
Co-authored-by: teor <teor@riseup.net>
2024-02-02 20:12:37 +01:00
Michael Goulet
e951bcff96 Normalize the whole PolyTypeOutlivesPredicate, more simplifications 2024-02-02 18:31:35 +00:00
Michael Goulet
a371059933 Don't hang when there's an infinite loop of outlives obligations 2024-02-02 18:30:21 +00:00
Michael Goulet
7d1fda7b40 Normalize type outlives obligations in NLL 2024-02-02 18:30:21 +00:00
Michael Goulet
7576b77e50 Do process_registered_region_obligations in a loop 2024-02-02 18:30:21 +00:00
Michael Goulet
0e16885abd Use deeply_normalize_with_skipped_universes in when processing type outlives 2024-02-02 18:30:21 +00:00
bors
8f6a72871e Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
internal: add typos check CI (part 2)

follow up https://github.com/rust-lang/rust-analyzer/pull/16448
2024-02-02 12:02:48 +00:00
Young-Flash
a52a4d9ba4 internal: update typo-check CI setting 2024-02-02 18:32:20 +08:00
Young-Flash
70d6141859 internal: update .typos.tmol 2024-02-02 18:23:11 +08:00
Young-Flash
ba2910a3a7 minor: correct some typos 2024-02-02 18:22:54 +08:00
bors
980d348111 Auto merge of #16476 - lnicola:sync-from-rust, r=lnicola
internal: sync from downstream
2024-02-02 07:07:05 +00:00
Laurențiu Nicola
7a0b887665 Bump rustc_index and rustc_abi 2024-02-02 09:00:21 +02:00
Laurențiu Nicola
ef07b05c0f Bump rustc_lexer and rustc_parse_format 2024-02-02 08:58:34 +02:00
Laurențiu Nicola
4f09335063 Merge remote-tracking branch 'upstream/master' into sync-from-rust 2024-02-02 08:40:28 +02:00
Laurențiu Nicola
8ba31cc4b9 Merge remote-tracking branch 'upstream/release' into sync-from-rust 2024-02-02 08:40:18 +02:00
Nicholas Nethercote
b6a4f03306 Rename BorrowckErrors as BorrowckDiags.
And some related things. Because it can hold non-error diagnostics.
2024-02-02 14:35:51 +11:00
Nicholas Nethercote
2e6bea5968 Inline and remove DiagnosticBuilder::into_diagnostic.
It now has a single call site.
2024-02-02 14:35:51 +11:00
Nicholas Nethercote
5fd824de44 Remove BorrowckErrors::tainted_by_errors.
`BorrowckErrors` stores a mix of error and non-error diags in
`buffered`. As a result, it downgrades `DiagnosticBuilder`s to
`Diagnostic`s, losing the emission guarantees, and so has to use a
`tainted_by_errors` field to record whether an error has occurred.

This commit splits `buffered` into `buffered_errors` and
`buffered_non_errors`, keeping them as `DiagnosticBuilder`s and
preserving the emission guarantees.

This also requires fixing a bunch of incorrect lifetimes on
`DiagnosticBuilder` use points.
2024-02-02 14:35:46 +11:00
Aphek
ee8703315e Update libc to 0.2.153 2024-02-01 23:58:42 -03:00
Nicholas Nethercote
3a02ebcac2 Remove BorrowckErrors::set_tainted_by_errors.
It has no effect. Note that `infcx.set_tainted_by_errors()` is still
called, so taintedness is still being propagated.
2024-02-02 13:27:57 +11:00
Nicholas Nethercote
f066be5f29 Rename buffer_non_error_diag as buffer_non_error.
To match `buffer_error`.
2024-02-02 13:27:57 +11:00
León Orell Valerian Liehr
5906237b32
Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
León Orell Valerian Liehr
3f7b1a5f49
Clean up some things in the name resolver
* Get rid of a typo in a function name
* Rename `currently_processing_generics`: The old name confused me at first since
  I assumed it referred to generic *parameters* when it was in fact referring to
  generic *arguments*. Generics are typically short for generic params.
* Get rid of a few unwraps by properly leveraging slice patterns
2024-02-02 02:51:48 +01:00
Tyler Mandry
48f664b502 Ignore test-panic-abort tests on Android
Until #120567 is fixed.
2024-02-01 16:51:07 -08:00
Zalathar
c9c049b2b4 coverage: Use normal edition: headers in coverage tests
Some of these tests were originally written as part of a custom `run-make`
test, so at that time they weren't able to use the normal compiletest header
directive parser.

Now that they're properly integrated, there's no need for them to use
`compile-flags` to specify the edition, since they can use `edition` instead.
2024-02-02 11:17:05 +11:00
Oli Scherer
6ac035df44 Revert unsound libcore changes of #119911 2024-02-01 22:53:25 +00:00
Esteban Küber
0df6dfdc78 fix rebase 2024-02-01 22:38:16 +00:00
bors
bf3c6c5bed Auto merge of #120447 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? ghost
2024-02-01 22:17:11 +00:00
Guillaume Gomez
0f21e45e95 Update never_type feature gate ui test 2024-02-01 20:01:05 +01:00
Guillaume Gomez
2c0030ff2c Correctly check never_type feature gating 2024-02-01 20:01:04 +01:00
Jeremiah Senkpiel
bedd81ef2a add test for try-block-in-match-arm
This is noted as an implementation concern under the tracking issue for `?` and `try` blocks. (Issue 31436)
2024-02-01 10:36:34 -08:00
León Orell Valerian Liehr
02320b502d
Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
Felix S. Klock II
0148da3528 put pnkfelix (me) back on the review queue. 2024-02-01 09:51:29 -05:00
bors
850ba2fb63 Auto merge of #16451 - Urhengulas:satisfy-clippy, r=Veykril
internal: Work through temporarily allowed clippy lints, part 2

Another follow-up to https://github.com/rust-lang/rust-analyzer/pull/16401.
2024-02-01 14:23:18 +00:00
Young-Flash
b0be2967cc internal: add typos CI check 2024-02-01 21:07:50 +08:00
Young-Flash
36cb518791 internal: add typos.toml as typo white list 2024-02-01 21:04:38 +08:00
bors
135a8d9841 Auto merge of #16416 - Young-Flash:cargo_ext_detect, r=lnicola
internal: VS Code: report conflict with `panicbit.cargo`

<img width="359" alt="notification" src="https://github.com/rust-lang/rust-analyzer/assets/71162630/420b9f34-ba73-4436-b868-6cd87c62287d">

related to https://github.com/rust-lang/rust-analyzer/issues/16392
2024-02-01 13:00:05 +00:00
Matthew Jasper
4feec41e05 #![feature(inline_const_pat)] is no longer incomplete 2024-02-01 10:27:54 +00:00
bors
3afa6b13c2 Auto merge of #16468 - ThomasFrans:docs-update-plugin-url, r=lnicola
minor: Recommend maintained Neovim plugin in documentation
2024-02-01 10:19:51 +00:00
Thomas Frans
671c776d59
minor: Recommend maintained Neovim plugin in documentation 2024-02-01 11:06:34 +01:00
Nicholas Nethercote
2621f7fd9b Rework StringPart.
When there are two possibilities, both of which use a `String`, it's
nicer to use a struct than an enum. Especially when mapping the contents
into a tuple.
2024-02-01 19:23:01 +11:00
Nicholas Nethercote
26eb6da4e7 Fit more values into DiagnosticArgValue::Number.
It contains an `i128`, but when creating them we convert any number
outside the range -100..100 to a string, because Fluent uses an `f64`.
It's all a bit strange.

This commit changes the `i128` to an `i32`, which fits safely in
Fluent's `f64`, and removes the -100..100 range check. This means that
only integers outside the range of `i32` will be converted to strings.
2024-02-01 19:18:45 +11:00
Nicholas Nethercote
3db37fb78a A small fix in enforce_slug_naming.rs.
In #119972 the code should have become `E0123` rather than `0123`. This
fix doesn't affect the outcome because the proc macro errors out before
the type of the code is checked, but the fix makes the test's code
consistent with other similar code elsewhere.
2024-02-01 19:18:45 +11:00
Nicholas Nethercote
3434466a7f Tweak emit_stashed_diagnostics.
`take` + `into_iter` + pattern matching is nicer than `drain` + `map` +
`collect`.
2024-02-01 19:18:45 +11:00
Esteban Küber
8b0ab54ffe review comment: change wording 2024-02-01 03:31:03 +00:00
Esteban Küber
95d9009f49 Change incr comp test when adding explicit Sized bound
Given the previous change to add implicit `Sized` bounds only if there
isn't already an explicit `Sized` bound, now the incr comp machinery
doesn't consider adding the explicit bound as being dirty, as long as
`-Zincremental-ignore-spans` is set.
2024-02-01 03:31:03 +00:00