yukang
74c9a6c6df
fix #103381 , Detect incorrect chaining of if and if let conditions
2022-11-15 08:53:17 +08:00
bors
101e1822c3
Auto merge of #104418 - matthiaskrgr:rollup-y4i6xjc, r=matthiaskrgr
...
Rollup of 11 pull requests
Successful merges:
- #101967 (Move `unix_socket_abstract` feature API to `SocketAddrExt`.)
- #102470 (Stabilize const char convert)
- #104223 (Recover from function pointer types with generic parameter list)
- #104229 (Don't print full paths in overlap errors)
- #104294 (Don't ICE with inline const errors during MIR build)
- #104332 (Fixed some `_i32` notation in `maybe_uninit`’s doc)
- #104349 (fix some typos in comments)
- #104350 (Fix x finding Python on Windows)
- #104356 (interpret: make check_mplace public)
- #104364 (rustdoc: Resolve doc links in external traits having local impls)
- #104378 (Bump chalk to v0.87)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-15 03:37:07 +00:00
bors
dedfb9c214
Auto merge of #104091 - BelovDV:issue-103044, r=petrochenkov
...
Wrap bundled static libraries into object files
Fixes #103044 (not sure, couldn't test locally)
Bundled static libraries should be wrapped into object files as it's done for metadata file.
r? `@petrochenkov`
2022-11-15 00:38:08 +00:00
Matthias Krüger
a86bdb4c50
Rollup merge of #104223 - fmease:recover-fn-ptr-with-generics, r=estebank
...
Recover from function pointer types with generic parameter list
Give a more helpful error when encountering function pointer types with a generic parameter list like `fn<'a>(&'a str) -> bool` or `fn<T>(T) -> T` and suggest moving lifetime parameters to a `for<>` parameter list.
I've added a bunch of extra code to properly handle (unlikely?) corner cases like `for<'a> fn<'b>()` (where there already exists a `for<>` parameter list) correctly suggesting `for<'a, 'b> fn()` (merging the lists). If you deem this useless, I can simplify the code by suggesting nothing at all in this case.
I am quite open to suggestions regarding the wording of the diagnostic messages.
Fixes #103487 .
``@rustbot`` label A-diagnostics
r? diagnostics
2022-11-14 19:26:16 +01:00
Daniil Belov
e16c77847d
Wrap bundlen static libraries into object files
2022-11-14 12:01:49 +03:00
León Orell Valerian Liehr
23dadb5617
fix up a fluent message
2022-11-13 04:16:08 +01:00
Dylan DPC
fcbe990093
Rollup merge of #103970 - oli-obk:unhide_unknown_spans, r=estebank
...
Unhide unknown spans
r? ```@estebank```
2022-11-12 12:02:51 +05:30
bors
42325c525b
Auto merge of #104293 - Manishearth:rollup-xj92d0k, r=Manishearth
...
Rollup of 8 pull requests
Successful merges:
- #95292 (Allow specialized const trait impls.)
- #100386 (Make `Sized` coinductive, again)
- #102215 (Implement the `+whole-archive` modifier for `wasm-ld`)
- #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code)
- #103531 (Suggest calling the instance method of the same name when method not found)
- #103960 (piece of diagnostic migrate)
- #104051 (update Miri)
- #104129 (rustdoc: use javascript to layout notable traits popups)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-11 20:11:07 +00:00
Manish Goregaokar
a13809ae51
Rollup merge of #103960 - AndyJado:var_path_only_diag, r=davidtwco
...
piece of diagnostic migrate
r? `@davidtwco`
2022-11-11 12:12:30 -05:00
Dylan DPC
e83b4765c3
Rollup merge of #104216 - Nilstrieb:dont-ice-invalid-operator-traits, r=estebank
...
Don't ICE on operator trait methods with generic methods
Emit a fatal error instead.
fixes #104213
2022-11-11 20:51:41 +05:30
Oli Scherer
df2adc4760
Print all labels, even if they have no span. Fall back to main item's span.
2022-11-11 14:45:28 +00:00
León Orell Valerian Liehr
c2b906ba9a
Recover from fn ptr tys with generic param list
2022-11-11 13:42:40 +01:00
bors
11fa0850f0
Auto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, r=jackh276,davidtwco
...
Recover from common if let syntax mistakes/typos
Fixes #103587
2022-11-10 05:19:10 +00:00
Nilstrieb
cedaaa640e
Don't ICE on operator trait methods with generic methods
...
Emit a fatal error instead.
2022-11-09 22:01:58 +01:00
SLASHLogin
a8a8055cc7
Use LayoutError
's implementation of IntoDiagnostic
2022-11-09 14:56:21 +01:00
SLASHLogin
9a1545861e
Simplify existing Diagnostic implementations
2022-11-09 14:56:21 +01:00
SLASHLogin
3728e95596
Port diagnostics created by Handler
2022-11-09 14:56:21 +01:00
SLASHLogin
e9a5329a6f
Correct tests to match errors
2022-11-09 14:56:21 +01:00
SLASHLogin
1c7a801bbc
Fix CI
...
Add missing 'the' to the error en-US translation
2022-11-09 14:56:21 +01:00
SLASHLogin
185ef7b6de
Port MissingFeatures
and TargetFeatureDisableOrEnable
2022-11-09 14:56:21 +01:00
SLASHLogin
33ef16f291
Port UnknownArchiveKind
2022-11-09 14:56:21 +01:00
SLASHLogin
c01546fcd6
Port DlltoolFailImportLibrary
and implement IntoDiagnosticArg
for Cow<'a, str>
2022-11-09 14:56:21 +01:00
SLASHLogin
81f7a8d7f1
Port ErrorCallingDllTool
2022-11-09 14:56:21 +01:00
SLASHLogin
ddbb650289
Import ErrorWritingDEFFile
2022-11-09 14:56:21 +01:00
SLASHLogin
d32caf9ced
Port ArchiveBuildFailure
2022-11-09 14:56:21 +01:00
SLASHLogin
978b5f73e4
Port SanitizerMemtagRequiresMte
2022-11-09 14:56:21 +01:00
SLASHLogin
60ee496c74
Port LinkageConstOrMutType error
2022-11-09 14:56:20 +01:00
SLASHLogin
5d79d3c4bb
Port InvalidMinimumAlignment
2022-11-09 14:56:20 +01:00
SLASHLogin
39d363fd58
Port layout size overflow
2022-11-09 14:56:20 +01:00
SLASHLogin
f031823ecd
Formatting
2022-11-09 14:56:20 +01:00
SLASHLogin
59b8aedf0e
Port branch protection on aarch64
2022-11-09 14:56:20 +01:00
SLASHLogin
9f0c16576b
Port symbol_already_defined
error
2022-11-09 14:56:20 +01:00
SLASHLogin
4c625dc682
Port Instrument coverage requires llvm 12 to the new struct
2022-11-09 14:56:20 +01:00
SLASHLogin
05ae7ecb74
Import error creating import library
2022-11-09 14:56:20 +01:00
SLASHLogin
21b04265c1
Trailing whitespaces
2022-11-09 14:56:20 +01:00
SLASHLogin
1c4bd835ec
locales formatting
2022-11-09 14:56:20 +01:00
SLASHLogin
575f6098da
Port unknown feature diagnostic to the new framework
2022-11-09 14:56:20 +01:00
AndyJado
057d8e5c43
struct error E0505
2022-11-09 21:15:31 +08:00
AndyJado
abf259cc54
var_subdiag refinement
...
trim old
2022-11-09 21:15:29 +08:00
AndyJado
a0cee0ab90
remove old var_span_path_only
...
doc comment
2022-11-09 20:51:43 +08:00
Manish Goregaokar
7dfe1e1664
Rollup merge of #103559 - AndyJado:var_span_label, r=davidtwco
...
first move on a nested span_label
trying not to be smart this time.
2022-11-08 21:03:53 -05:00
yukang
9e7d2287cd
use subdiagnostic for sugesting add let
2022-11-08 16:25:37 +08:00
yukang
667b15bb0e
fix #103587 , Recover from common if let syntax mistakes/typos
2022-11-08 14:10:04 +08:00
Matthias Krüger
58f5d57b5d
Rollup merge of #103012 - chenyukang:fix-102806, r=davidtwco,compiler-errors
...
Suggest use .. to fill in the rest of the fields of Struct
Fixes #102806
2022-11-06 08:35:26 +01:00
AndyJado
e49d10db14
first move on a nested span_label
...
Apply suggestions from code review
Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2022-11-05 19:43:48 +08:00
clubby789
2f882c014f
Specify that break
cannot be used outside of loop *or* labeled block
2022-11-05 01:12:58 +00:00
Matthias Krüger
1cb8684dde
Rollup merge of #103792 - JhonnyBillM:migrate-codegen-ssa-to-diagnostics-structs-pt2, r=davidtwco
...
Migrate `codegen_ssa` to diagnostics structs - [Part 2]
Completes migrating `link.rs` in `codegen_ssa` module.
_Part 1 - https://github.com/rust-lang/rust/pull/102612_
r? `@davidtwco`
2022-11-04 18:52:27 +01:00
Matthias Krüger
612bb7890c
Rollup merge of #103397 - crlf0710:port_dead_code_lint, r=davidtwco
...
Port `dead_code` lints to be translatable.
This adds an additional comma to lists with three or more items, to be consistent with list formatters like `icu4x`.
r? `@davidtwco`
2022-11-04 18:52:26 +01:00
Jhonny Bill Mena
2678765d08
FIX - Migrate missing errors in link.rs
2022-11-04 01:17:02 -04:00
Jhonny Bill Mena
1f4c5a624f
ADD - ExtractBundledLibsError. Migrated extract_bundled_libs to translatable diagnostics
2022-11-04 01:17:02 -04:00