Michael Goulet
137b6d0b01
Point to where missing return type should go
2023-10-04 21:09:54 +00:00
Camille GILLOT
baa64b0e77
Remove dead error code.
2023-09-23 13:47:30 +00:00
Eduardo Sánchez Muñoz
c599761140
rustc_hir_analysis: add a helper to check function the signature mismatches
...
This function is now used to check `#[panic_handler]`, `start` lang item, `main`, `#[start]` and intrinsic functions.
The diagnosis produced are now closer to the ones produced by trait/impl method signature mismatch.
2023-09-19 18:15:23 +02:00
Matthias Krüger
3ce90b1649
inline format!() args up to and including rustc_codegen_llvm
2023-07-30 14:22:50 +02:00
Mark Rousskov
cc907f80b9
Re-format let-else per rustfmt update
2023-07-12 21:49:27 -04:00
Michael Goulet
af54d584b2
More robust as_ref/as_deref suggestions
2023-06-08 16:30:05 +00:00
Josh Soref
e09d0d2a29
Spelling - compiler
...
* account
* achieved
* advising
* always
* ambiguous
* analysis
* annotations
* appropriate
* build
* candidates
* cascading
* category
* character
* clarification
* compound
* conceptually
* constituent
* consts
* convenience
* corresponds
* debruijn
* debug
* debugable
* debuggable
* deterministic
* discriminant
* display
* documentation
* doesn't
* ellipsis
* erroneous
* evaluability
* evaluate
* evaluation
* explicitly
* fallible
* fulfill
* getting
* has
* highlighting
* illustrative
* imported
* incompatible
* infringing
* initialized
* into
* intrinsic
* introduced
* javascript
* liveness
* metadata
* monomorphization
* nonexistent
* nontrivial
* obligation
* obligations
* offset
* opaque
* opportunities
* opt-in
* outlive
* overlapping
* paragraph
* parentheses
* poisson
* precisely
* predecessors
* predicates
* preexisting
* propagated
* really
* reentrant
* referent
* responsibility
* rustonomicon
* shortcircuit
* simplifiable
* simplifications
* specify
* stabilized
* structurally
* suggestibility
* translatable
* transmuting
* two
* unclosed
* uninhabited
* visibility
* volatile
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-17 16:09:18 -04:00
Matthias Krüger
331e7c3659
Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb
...
Fix typos in compiler
I ran [`typos -w compiler`](https://github.com/crate-ci/typos ) to fix typos in the `compiler` directory.
Refs #110150
2023-04-12 20:56:21 +02:00
DaniPopes
677357d32b
Fix typos in compiler
2023-04-10 22:02:52 +02:00
IQuant
6a05cd85ad
A more general implementation of IntoDiagnosticArg
for Binder
(Also removes DiagArg
, as it's no longer necessary)
2023-04-04 18:50:07 +03:00
IQuant
fd18d9a584
Renamed TypeErrorAdditionalDiags (was Error0308Subdiags) and ObligationCauseFailureCode (was FailureCodeDiagnostics)
2023-04-04 18:50:07 +03:00
IQuant
1f09bc77c1
Migrate (most of) report_and_explain_type_error
2023-04-04 18:50:02 +03:00
IQuant
b610ce72ce
Migrate TupleTrailingCommaSuggestion
2023-04-04 18:34:50 +03:00
IQuant
d18adb7d56
Migrate SuggestTuplePattern
2023-04-04 18:34:50 +03:00
IQuant
23b8567a78
Migrate SuggestBoxingForReturnImplTrait, Fix typo in infer_fn_consider_casting
2023-04-04 18:34:50 +03:00
IQuant
d56b304bc8
Migrate SuggestAccessingField
2023-04-04 18:34:50 +03:00
IQuant
b36abea285
Migrate SuggestAsRefWhereAppropriate
2023-04-04 18:34:50 +03:00
IQuant
37f55691f4
Ported FunctionPointerSuggestion
2023-04-04 18:34:50 +03:00
Michael Goulet
bdacc8bdd9
Migrate diagnostic
2023-03-03 05:02:34 +00:00
David Wood
d1fcf61117
errors: generate typed identifiers in each crate
...
Instead of loading the Fluent resources for every crate in
`rustc_error_messages`, each crate generates typed identifiers for its
own diagnostics and creates a static which are pulled together in the
`rustc_driver` crate and provided to the diagnostic emitter.
Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-22 09:15:53 +00:00
IQuant
58939b9520
Specify correct spans in suggest_await_on_expect_found
2023-02-14 23:16:29 +03:00
IQuant
5c7afde6f2
Port PlaceholderRelationLfNotSatisfied diagnostic
2023-02-14 18:56:22 +03:00
IQuant
fdbec623c4
Port ConsiderAddingAwait
2023-02-14 18:55:54 +03:00
IQuant
9f06c3d87f
Port SuggestRemoveSemiOrReturnBinding
2023-02-14 18:31:45 +03:00
Nikita Tomashevich
6fa4c7d89c
Make sure tests pass
2023-02-14 18:31:45 +03:00
Nikita Tomashevich
b8feb63345
Port WhereClauseSuggestions
2023-02-14 18:31:45 +03:00
Nikita Tomashevich
8d590dc303
Resolve rebase
2023-02-14 18:31:45 +03:00
Nikita Tomashevich
cb8ea01096
Port RefLongerThanData
2023-02-14 18:31:45 +03:00
Nikita Tomashevich
58e901b6fd
Port "BorrowedTooLong" diagnostic
2023-02-14 18:31:45 +03:00
Nikita Tomashevich
8fc5ba65e1
Port OutlivesContent, OutlivesBound, FUllfillReqLifetime, LfBoundNotSatisfied diagnostics
2023-02-14 18:31:45 +03:00
yukang
0368adb262
Fix #107090 , fix missing arguments for fluent
2023-01-18 22:53:24 +08:00
Matthias Krüger
405e48f1ac
Rollup merge of #101936 - IntQuant:issue-100717-infer-4, r=compiler-errors
...
Migrating rustc_infer to session diagnostics (part 3)
``@rustbot`` label +A-translation
r? rust-lang/diagnostics
cc https://github.com/rust-lang/rust/issues/100717
Seems like a part of static_impl_trait.rs emits suggestions in a loop, and note.rs needs to have two instances of the same subdiagnostic, so these will need to wait until we have eager translation/list support.
Other than that, there is only error_reporting/mod.rs left to migrate.
2023-01-07 20:43:18 +01:00
Nilstrieb
9067e4417e
Rename Rptr
to Ref
in AST and HIR
...
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already
as well.
2022-12-28 18:52:36 +01:00
Nikita Tomashevich
0c50e1f146
eager is the default now
2022-12-28 15:24:18 +03:00
Nikita Tomashevich
62f9962eaf
Made ty_or_sig and trait_path use their actual types instead of String
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
7ecd064bbe
Split infer_explicit_lifetime_required into several diags
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
19b8579803
Address changes of pr 103345
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
40b221814e
Rename subdiagnostic fields that do not need to be unique now
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
eb7ce1703b
Use eager translation
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
71d24da665
Split into several messages
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
6c19c08140
More descriptive names for ActualImplExplNotes variants
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
57fdd196ae
Rebase and fix
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
0634b0119c
Partial work on static_impl_trait.rs
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
3935a81d47
Migrate trait_impl_difference.rs
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
2118ff401f
Migrate placeholder_error.rs
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
8360a40a8a
Migrate named_anon_conflict.rs
2022-12-28 14:53:47 +03:00
mejrs
a7838d8bd7
Always evaluate vecs of subdiagnostics eagerly
2022-12-04 01:13:21 +01:00
Camille GILLOT
fb7d25e978
Separate lifetime ident from resolution in HIR.
2022-11-23 19:33:06 +00:00
yukang
9e7d2287cd
use subdiagnostic for sugesting add let
2022-11-08 16:25:37 +08:00
Xiretza
cd621be782
Convert all #[suggestion_*] attributes to #[suggestion(style = "...")]
...
Using the following command:
find compiler/ -type f -name '*.rs' -exec perl -i -gpe \
's/(#\[\w*suggestion)_(short|verbose|hidden)\(\s*(\S+,)?/\1(\3style = "\2",/g' \
'{}' +
2022-10-26 15:04:09 +02:00