Commit Graph

17698 Commits

Author SHA1 Message Date
Nicholas Nethercote
3be86e6528 Clarify operator splitting.
I found this code hard to read.
2022-10-03 11:41:36 +11:00
Michael Goulet
90a8d67491 Avoid ICE in printing RPITIT type 2022-10-02 20:43:13 +00:00
Michael Goulet
7a8854037b Add example to opaque_hidden_inferred_bound lint 2022-10-02 19:54:39 +00:00
Michael Goulet
426424b320 Make it a lint for all opaque types 2022-10-02 19:50:19 +00:00
Michael Goulet
d0d6af9146 Lint for unsatisfied nested opaques 2022-10-02 19:50:19 +00:00
Michael Goulet
c7d1ec009c Don't ICE when trying to copy unsized value in const prop 2022-10-02 19:21:06 +00:00
Petr Portnov
afae9576dc
Fix duplicate usage of a article.
This fixes a typo first appearing in #94624
in which test-macro diagnostic uses "a" article twice.

Since I searched sources for " a a " sequences,
I also fixed the same issue in a few source files where I found it.

Signed-off-by: Petr Portnov <gh@progrm-jarvis.ru>
2022-10-02 21:40:39 +03:00
Maybe Waffle
8cc8140775 Remove a couple lifetimes that could be infered 2022-10-02 15:40:20 +00:00
bors
39323a5877 Auto merge of #102586 - Dylan-DPC:rollup-g107h6z, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #100451 (Do not panic when a test function returns Result::Err.)
 - #102098 (Use fetch_update in sync::Weak::upgrade)
 - #102538 (Give `def_span` the same SyntaxContext as `span_with_body`.)
 - #102556 (Make `feature(const_btree_len)` implied by `feature(const_btree_new)`)
 - #102566 (Add a known-bug test for #102498)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-02 15:31:06 +00:00
Dylan DPC
f3ab5a66a9
Rollup merge of #102538 - cjgillot:def-span-ctxt, r=fee1-dead
Give `def_span` the same SyntaxContext as `span_with_body`.

https://github.com/rust-lang/rust/issues/102217

I'm not sure how to add a test, since the erroneous span was crafted using a proc macro.
The debug assertion in `def_span` will ensure we have the correct behaviour.
2022-10-02 20:42:21 +05:30
bjorn3
268e02c387 Remove type argument of array_alloca and rename to byte_array_alloca 2022-10-02 13:42:14 +00:00
bjorn3
0fe84bc38b Remove dynamic_alloca from BuilderMethods 2022-10-02 13:42:02 +00:00
bors
91931ec2fc Auto merge of #98354 - camsteffen:is-some-and-by-value, r=m-ou-se
Change `is_some_and` to take by value

Consistent with other function-accepting `Option` methods.

Tracking issue: #93050

r? `@m-ou-se`
2022-10-02 12:48:15 +00:00
yukang
01882733c9 fix #102320, suggest unwrap_or_else when a closure is passed to unwrap_or instead of suggesting calling it 2022-10-02 18:36:52 +08:00
Michael Goulet
f088e543cb Delay evaluating lint primary message until after it would be suppressed 2022-10-02 06:32:40 +00:00
bors
47b2eee173 Auto merge of #102424 - sunfishcode:sunfishcode/hidden-main, r=nagisa
Declare `main` as visibility hidden on targets that default to hidden.

On targets with `default_hidden_visibility` set, which is currrently just WebAssembly, declare the generated `main` function with visibility hidden. This makes it consistent with clang's WebAssembly target, where `main` is just a user function that gets the same visibility as any other user function, which is hidden on WebAssembly unless explicitly overridden.

This will help simplify use cases which in the future may want to automatically wasm-export all visibility-"default" symbols. `main` isn't intended to be wasm-exported, and marking it hidden prevents it from being wasm-exported in that scenario.
2022-10-02 04:12:09 +00:00
bors
57f097ea25 Auto merge of #102236 - cjgillot:compute_lint_levels_by_def, r=oli-obk
Compute lint levels by definition

Second attempt to https://github.com/rust-lang/rust/pull/101620.

I think that I have removed the perf regression.
2022-10-01 19:54:55 +00:00
bors
56a35bc906 Auto merge of #102545 - matthiaskrgr:rollup-13i3tc3, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #101675 (Improve `File::set_times` error handling)
 - #102500 (Remove `expr_parentheses_needed` from `ParseSess`)
 - #102533 (rustdoc: remove unused CSS selector `a.source`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-01 17:11:19 +00:00
bjorn3
62cf644c64 Merge apply_attrs_callsite into call and invoke
Some codegen backends are not able to apply callsite attrs after the fact.
2022-10-01 17:01:31 +00:00
Cameron Steffen
4f12de0660 Change feature name to is_some_and 2022-10-01 11:45:52 -05:00
bjorn3
a3cc67c796 Remove unused target_cpu and tune_cpu methods from ExtraBackendMethods 2022-10-01 16:45:33 +00:00
bjorn3
c431ea681c Remove several unused methods from MiscMethods 2022-10-01 16:45:07 +00:00
bjorn3
7c91ec4652 Remove unused Context assoc type from WriteBackendMethods 2022-10-01 16:34:45 +00:00
Matthias Krüger
cc009bc536
Rollup merge of #102500 - compiler-errors:parse-sess-cleanup, r=cjgillot
Remove `expr_parentheses_needed` from `ParseSess`

Not sure why this method needed to exist on `ParseSess`, but we can achieve the same behavior by just inlining it everywhere.
2022-10-01 16:45:05 +02:00
Camille GILLOT
fec53fd9db Add sanity Drop impl. 2022-10-01 16:24:44 +02:00
Camille GILLOT
299e10d7ad Add FIXME. 2022-10-01 16:24:34 +02:00
Camille GILLOT
9f2ab5b9ad Use a SortedMap instead of a VecMap. 2022-10-01 16:24:30 +02:00
Camille GILLOT
13608715d8 Replace retain with assertion. 2022-10-01 16:23:20 +02:00
Camille GILLOT
c2d5dd2566 Add fast path without visiting. 2022-10-01 16:23:10 +02:00
Camille GILLOT
e78dd6d781 Simplify LintLevelsProvider. 2022-10-01 16:23:00 +02:00
Camille GILLOT
d08669c4fa Compute by owner instead of HirId. 2022-10-01 16:22:40 +02:00
Camille GILLOT
26e5fe9e85 Do not fetch HIR node when iterating to find lint. 2022-10-01 16:20:21 +02:00
Camille GILLOT
6e76599f5f Correct Key impl for HirId. 2022-10-01 16:20:08 +02:00
Camille GILLOT
273b54d6ac Add FIXME. 2022-10-01 16:19:52 +02:00
Camille GILLOT
af495f8bb6 Comment LintLevelSets. 2022-10-01 16:19:40 +02:00
Camille GILLOT
34bc5c8824 Move lint level computation to rustc_middle::lint. 2022-10-01 16:18:54 +02:00
Camille GILLOT
6977f7dbe9 Reduce visibilities and remove dead code. 2022-10-01 16:18:42 +02:00
Camille GILLOT
41db9b152f Move code to rustc_lint. 2022-10-01 16:18:13 +02:00
bors
edadc7ccdd Auto merge of #102519 - Alexendoo:format-args-macro-str, r=m-ou-se
Fix `format_args` capture for macro expanded format strings

Since #100996 `format_args` capture for macro expanded strings aren't prevented when the span of the expansion points to a string literal, e.g.

```rust
// not a terribly realistic example, but also happens for proc_macros that set
// the span of the output to an input str literal, such as indoc
macro_rules! x {
    ($e:expr) => { $e }
}

fn main() {
    let a = 1;
    println!(x!("{a}"));
}
```

The tests didn't catch it as the span of `concat!()` points to the macro invocation

r? `@m-ou-se`
2022-10-01 14:15:29 +00:00
Camille GILLOT
107170b9c3 Remove unused tool_name. 2022-10-01 16:12:54 +02:00
Deadbeef
3cb1811e45 Compute lint_levels by definition 2022-10-01 16:12:50 +02:00
Camille GILLOT
6019cbbfd3 Allow query system to recover a HirId. 2022-10-01 15:58:42 +02:00
bors
744e397d88 Auto merge of #101986 - WaffleLapkin:move_lint_note_to_the_bottom, r=estebank
Move lint level source explanation to the bottom

So, uhhhhh

r? `@estebank`

## User-facing change

"note: `#[warn(...)]` on by default" and such are moved to the bottom of the diagnostic:
```diff
-   = note: `#[warn(unsupported_calling_conventions)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678>
+   = note: `#[warn(unsupported_calling_conventions)]` on by default
```

Why warning is enabled is the least important thing, so it shouldn't be the first note the user reads, IMO.

## Developer-facing change

`struct_span_lint` and similar methods have a different signature.

Before: `..., impl for<'a> FnOnce(LintDiagnosticBuilder<'a, ()>)`
After: `..., impl Into<DiagnosticMessage>, impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>) -> &'b mut DiagnosticBuilder<'a, ()>`

The reason for this is that `struct_span_lint` needs to edit the diagnostic _after_ `decorate` closure is called. This also makes lint code a little bit nicer in my opinion.

Another option is to use `impl for<'a> FnOnce(LintDiagnosticBuilder<'a, ()>) -> DiagnosticBuilder<'a, ()>` altough I don't _really_ see reasons to do `let lint = lint.build(message)` everywhere.

## Subtle problem

By moving the message outside of the closure (that may not be called if the lint is disabled) `format!(...)` is executed earlier, possibly formatting `Ty` which may call a query that trims paths that crashes the compiler if there were no warnings...

I don't think it's that big of a deal, considering that we move from `format!(...)` to `fluent` (which is lazy by-default) anyway, however this required adding a workaround which is unfortunate.

## P.S.

I'm sorry, I do not how to make this PR smaller/easier to review. Changes to the lint API affect SO MUCH 😢
2022-10-01 10:44:25 +00:00
Maybe Waffle
b5b3ffe3fc Remove LintDiagnosticBuilder 2022-10-01 10:03:07 +00:00
Maybe Waffle
d028db9dbd ui-fulldeps: adopt to the new rustc lint API 2022-10-01 10:03:07 +00:00
Maybe Waffle
ad3d1fc9d5 Move lint level source explanation to the bottom 2022-10-01 10:03:06 +00:00
Maybe Waffle
a8f7e244b7 Refactor rustc lint API 2022-10-01 10:03:06 +00:00
Camille GILLOT
c321933e22 Give def_span the same SyntaxContext as span_with_body. 2022-10-01 11:38:59 +02:00
Matthias Krüger
eaf1c7a0da
Rollup merge of #102493 - nnethercote:improve-size-assertions-some-more, r=lqd
Group together more size assertions.

Also add a few more assertions for some relevant token-related types.

And fix an erroneous comment in `rustc_errors`.

r? `@lqd`
2022-09-30 23:38:27 +02:00
Matthias Krüger
842a7d34f5
Rollup merge of #102492 - compiler-errors:simplify-deny-assoc-bindings, r=cjgillot
Don't lower assoc bindings just to deny them

Some clean-up: https://github.com/rust-lang/rust/pull/102338#discussion_r981590931
2022-09-30 23:38:26 +02:00
Matthias Krüger
808f197ed4
Rollup merge of #102490 - compiler-errors:closure-body-impl-lifetime, r=cjgillot
Generate synthetic region from `impl` even in closure body within an associated fn

Fixes #102209
2022-09-30 23:38:26 +02:00
Matthias Krüger
05b9f0e360
Rollup merge of #102483 - spastorino:create-defs-on-lowering, r=cjgillot
create def ids for impl traits during ast lowering

r? `@cjgillot`
2022-09-30 23:38:25 +02:00
Matthias Krüger
9ec772e223
Rollup merge of #102373 - Nilstrieb:cannot-get-layout-of-branch-error, r=cjgillot
Flush delayed bugs before codegen

Sometimes it can happen that invalid code like a TyKind::Error makes its way through the compiler without triggering any errors (this is always a bug in rustc but bugs do happen sometimes :)). These ICEs will manifest in the backend like as cg_llvm not being able to get the layout of `[type error]`, which makes it hard to debug. By flushing before codegen, we display all the delayed bugs, making it easier to trace it to the root of the problem.

I tried this on #102366 and it showed tons of of delayed bugs and no error in cg_llvm, so it seems to be working.
2022-09-30 23:38:25 +02:00
Matthias Krüger
c07ebeb74b
Rollup merge of #102361 - fee1-dead-contrib:fix-102156, r=eholk
Fix ICE in const_trait check code

This fixes #102156.
2022-09-30 23:38:24 +02:00
Nicholas Nethercote
5ab68a82d5 Group together more size assertions.
Also add a few more assertions for some relevant token-related types.

And fix an erroneous comment in `rustc_errors`.
2022-10-01 07:30:23 +10:00
nils
e8f1bfe193
Fix typo 2022-09-30 21:02:53 +02:00
Santiago Pastorino
b2bef02bcd
create def ids for impl traits during ast lowering 2022-09-30 15:12:01 -03:00
Camille Gillot
4b1cf846bd
Update compiler/rustc_interface/src/queries.rs 2022-09-30 19:50:48 +02:00
Matthias Krüger
a8777580ee
Rollup merge of #102506 - TaKO8Ki:specify-dyn-kind, r=lcnr
Specify `DynKind::Dyn`

ref: https://github.com/rust-lang/rust/pull/101212#discussion_r958861297
2022-09-30 19:06:07 +02:00
Matthias Krüger
f7f253ea47
Rollup merge of #102421 - lyming2007:issue-101866, r=lcnr
remove the unused :: between trait and type to give user correct diag…

…nostic information

	modified:   compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
	new file:   src/test/ui/type/issue-101866.rs
	new file:   src/test/ui/type/issue-101866.stderr
2022-09-30 19:06:05 +02:00
Matthias Krüger
e2bc6b8172
Rollup merge of #102382 - cuviper:defid-order, r=fee1-dead
Manually order `DefId` on 64-bit big-endian

`DefId` uses different field orders on 64-bit big-endian vs. others, in
order to optimize its `Hash` implementation. However, that also made it
derive different lexical ordering for `PartialOrd` and `Ord`. That
caused spurious differences wherever `DefId`s are sorted, like the
candidate sources list in `report_method_error`.

Now we manually implement `PartialOrd` and `Ord` on 64-bit big-endian to
match the same lexical ordering as other targets, fixing at least one
test, `src/test/ui/methods/method-ambig-two-traits-cross-crate.rs`.
2022-09-30 19:06:05 +02:00
Alex Macleod
71db0dd918 Fix format_args capture for macro expanded format strings 2022-09-30 17:40:14 +01:00
nils
477846f491
Add comment explaining why we flush delayed bugs before codegen 2022-09-30 14:11:18 +02:00
bors
f914b82a75 Auto merge of #102509 - matthiaskrgr:rollup-gtenet8, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #101075 (Migrate rustc_codegen_gcc to SessionDiagnostics )
 - #102350 (Improve errors for incomplete functions in struct definitions)
 - #102481 (rustdoc: remove unneeded CSS `.rust-example-rendered { position }`)
 - #102491 (rustdoc: remove no-op source sidebar `opacity`)
 - #102499 (Adjust the s390x data layout for LLVM 16)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-30 10:39:09 +00:00
Matthias Krüger
588a25a6f8
Rollup merge of #102499 - cuviper:llvm-16-s390x, r=nikic
Adjust the s390x data layout for LLVM 16

LLVM [D131158] changed the SystemZ data layout to always set 64-bit
vector alignment, which used to be conditional on the "vector" feature.

[D131158]: https://reviews.llvm.org/D131158

r? `@nikic`
2022-09-30 10:22:39 +02:00
Matthias Krüger
6906e64c30
Rollup merge of #102350 - TaKO8Ki:incomplete-fn-in-struct-definition, r=fee1-dead
Improve errors for incomplete functions in struct definitions

Given the following code:

```rust
fn main() {}

struct Foo {
    fn
}
```

[playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=29139f870511f6918324be5ddc26c345)

The current output is:

```
   Compiling playground v0.0.1 (/playground)
error: functions are not allowed in struct definitions
 --> src/main.rs:4:5
  |
4 |     fn
  |     ^^
  |
  = help: unlike in C++, Java, and C#, functions are declared in `impl` blocks
  = help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information

error: could not compile `playground` due to previous error
```

In this case, rustc should suggest escaping `fn` to use it as an identifier.
2022-09-30 10:22:37 +02:00
Matthias Krüger
25017f8bce
Rollup merge of #101075 - ellishg:rustc_codegen_gcc_diagnostics, r=davidtwco
Migrate rustc_codegen_gcc to SessionDiagnostics

As part of #100717 this pr migrates diagnostics to `SessionDiagnostics` for the `rustc_codegen_gcc` crate.

``@rustbot`` label +A-translation
2022-09-30 10:22:36 +02:00
bors
4a0ee3cdc6 Auto merge of #102387 - nnethercote:inline-Token-PartialEq, r=lqd
Inline a few functions.

r? `@ghost`
2022-09-30 07:57:12 +00:00
Takayuki Maeda
1ca33851df specify DynKind::Dyn 2022-09-30 15:52:20 +09:00
bors
b3aa4997d4 Auto merge of #102164 - compiler-errors:rpitit-foreign, r=TaKO8Ki
Serialize return-position `impl Trait` in trait hidden values in foreign libraries

Fixes #101630
2022-09-30 04:24:14 +00:00
Josh Stone
ed9e6f2ad8 Enable inline stack probes on X86 with LLVM 16 2022-09-29 19:49:23 -07:00
Michael Goulet
85a726e754 Remove expr_parentheses_needed from ParseSess 2022-09-30 01:39:20 +00:00
bors
d45feb3ad2 Auto merge of #102304 - lcnr:coherence-cleanup, r=compiler-errors
remove outdated coherence hack

we have a more precise detection for downstream conflicts in candidate assembly: the `is_knowable` check in `candidate_from_obligation_no_cache`.

r? types cc `@nikomatsakis`
2022-09-30 01:32:15 +00:00
Josh Stone
2e7a964485 Adjust the s390x data layout for LLVM 16
LLVM [D131158] changed the SystemZ data layout to always set 64-bit
vector alignment, which used to be conditional on the "vector" feature.

[D131158]: https://reviews.llvm.org/D131158
2022-09-29 18:18:26 -07:00
fee1-dead
d7fe44d988 Use let chains instead of let else 2022-09-30 00:31:53 +00:00
bors
1bb8d276c9 Auto merge of #101887 - nnethercote:shrink-Res, r=spastorino
Shrink `hir::def::Res`

r? `@spastorino`
2022-09-29 22:45:24 +00:00
Michael Goulet
3722ad4c26 Don't lower assoc bindings just to deny them 2022-09-29 22:44:43 +00:00
Michael Goulet
c1c3dacc78 Generate synthetic impl region even in closure body in associated fn 2022-09-29 22:32:28 +00:00
Yiming Lei
523a76a2eb remove the unused :: between trait and type to give user correct diagnostic information
modified:   compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
	new file:   src/test/ui/type/issue-101866.rs
	new file:   src/test/ui/type/issue-101866.stderr
2022-09-29 14:24:24 -07:00
Michael Goulet
ee713f3d43 Check generic argument compatibility when projecting assoc ty 2022-09-29 21:22:34 +00:00
bors
9c56d9d6fe Auto merge of #102482 - notriddle:rollup-fjm618g, r=notriddle
Rollup of 7 pull requests

Successful merges:

 - #102214 (Fix span of byte-escaped left format args brace)
 - #102426 (Don't export `__wasm_init_memory` on WebAssembly.)
 - #102437 (rustdoc: cut margin-top from first header in docblock)
 - #102442 (rustdoc: remove bad CSS font-weight on `.impl`, `.method`, etc)
 - #102447 (rustdoc: add method spacing to trait methods)
 - #102468 (tidy: make rustc dependency error less confusing)
 - #102476 (Split out the error reporting logic into a separate function)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-29 19:52:48 +00:00
Michael Howell
98075708dd
Rollup merge of #102476 - oli-obk:split_error_path, r=cjgillot
Split out the error reporting logic into a separate function

I was trying to read the function and got distracted by the huge block of code in the middle of it. Turns out it only reports diagnostics and all paths within it end in an error. The main function is now more readable imo.
2022-09-29 10:15:20 -07:00
Michael Howell
3cecc78694
Rollup merge of #102426 - sunfishcode:sunfishcode/no-wasm-init-memory, r=nagisa
Don't export `__wasm_init_memory` on WebAssembly.

Since #72889, the Rust wasm target doesn't use --passive-segments, so remove the `--export=__wasm_init_memory`.

As documented in the [tool-conventions Linking convention], `__wasm_init_memory` is not intended to be exported.

[tool-conventions Linking convention]: 7c064f3048/Linking.md (shared-memory-and-passive-segments)
2022-09-29 10:15:18 -07:00
Michael Howell
0878bee38a
Rollup merge of #102214 - cassaundra:fix-format-args-span, r=cjgillot
Fix span of byte-escaped left format args brace

Fix #102057 (see issue for example).

Previously, the use of escaped left braces (`\x7B`) in format args resulted in an incorrectly offset span. This patch fixes that by considering any escaped characters within the string instead of using a constant offset.
2022-09-29 10:15:17 -07:00
bors
9f1a21ae2b Auto merge of #101893 - oli-obk:lift_derive, r=lcnr
Fix perf regression from TypeVisitor changes

Regression occurred in https://github.com/rust-lang/rust/pull/101858#issuecomment-1248732579

Instead of just reverting, we only fixed part of the regression. The main regression was due to actually correctly visiting a type that contains types and consts and should therefor be visited. This is not actually observable (yet?), but we should still do it correctly instead of risking major bugs in the future.
2022-09-29 17:05:00 +00:00
Oli Scherer
aa3fbf8795 Split out the error reporting logic into a separate function 2022-09-29 14:29:36 +00:00
bors
65445a571c Auto merge of #102471 - Dylan-DPC:rollup-ij3okjt, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #102336 (Fix associated type bindings with anon const in GAT position)
 - #102342 (Add negation methods for signed non-zero integers.)
 - #102385 (Don't export `__heap_base` and `__data_end` on wasm32-wasi.)
 - #102435 (Improve example of Iterator::reduce)
 - #102436 (rustdoc: clean up "normalize.css 8" input override CSS)
 - #102452 (fix minor ungrammatical sentence)
 - #102455 (Use let-chaining in `WhileTrue::check_expr`.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-29 13:27:28 +00:00
Dylan DPC
f4e7094ffc
Rollup merge of #102455 - nnethercote:WhileTrue-check_expr, r=lqd
Use let-chaining in `WhileTrue::check_expr`.

This has been bugging me for a while.

r? `@lqd`
2022-09-29 18:13:22 +05:30
Dylan DPC
33553e1a28
Rollup merge of #102385 - sunfishcode:sunfishcode/wasm-no-export-heap-base, r=davidtwco
Don't export `__heap_base` and `__data_end` on wasm32-wasi.

`__heap_base` and `__data_end` are exported for use by wasm-bindgen, which uses the wasm32-unknown-unknown target. On wasm32-wasi, as a step toward implementing the Canonical ABI, and as an aid to building speicalized WASI API polyfill wrappers, don't export `__heap_base` and `__data_end` on wasm32-wasi.
2022-09-29 18:13:20 +05:30
Dylan DPC
1be9ec5443
Rollup merge of #102336 - compiler-errors:issue-102333, r=jackh726
Fix associated type bindings with anon const in GAT position

The first commit formats `type_of.rs`, which is really hard to maintain since it uses a bunch of features like `let`-chains and `if let` match arm bindings. Best if you just review the second two diffs.

Fixes #102333
2022-09-29 18:13:19 +05:30
bors
c5bbf36a31 Auto merge of #102461 - oli-obk:split_collect_rs, r=lcnr
Split collect.rs

This file was way too big (adding a few lines of code caused tidy to trigger)
2022-09-29 10:44:29 +00:00
Oli Scherer
f22f149dbd Some path updates 2022-09-29 09:33:30 +00:00
Oli Scherer
6367e69929 Split collect.rs 2022-09-29 09:31:46 +00:00
bors
8a497b7181 Auto merge of #102328 - cuviper:ibm-stack-probes, r=nagisa
Enable inline stack probes on PowerPC and SystemZ

The LLVM PowerPC and SystemZ targets have both supported `"probe-stack"="inline-asm"` for longer than our current minimum LLVM 13 requirement, so we can turn this on for all `powerpc`, `powerpc64`, `powerpc64le`, and `s390x` targets in Rust. These are all tier-2 or lower, so CI does not run their tests, but I have confirmed that their `linux-gnu` variants do pass on RHEL.

cc #43241
2022-09-29 08:00:54 +00:00
Yuki Okushi
80e009ceba
Rollup merge of #102416 - lcnr:specialization-fixme, r=compiler-errors
remove FIXME, improve documentation

r? types
2022-09-29 11:42:06 +09:00
Yuki Okushi
039e9e2160
Rollup merge of #102399 - b-naber:binder-print-ice, r=lcnr
Account for use of index-based lifetime names in print of binder

Fixes https://github.com/rust-lang/rust/issues/102374

r? ```@lcnr```

cc ```@steffahn```
2022-09-29 11:42:06 +09:00
Yuki Okushi
19e84b91e5
Rollup merge of #102351 - Rageking8:improve-E0585, r=wesleywiser
Improve E0585 help
2022-09-29 11:42:04 +09:00
Yuki Okushi
852a152206
Rollup merge of #102085 - chenyukang:code-refactor, r=cjgillot
Code refactoring smart_resolve_report_errors

`smart_resolve_report_errors` 4ecfdfac51/compiler/rustc_resolve/src/late/diagnostics.rs (L143)
is almost 600 lines of code, we should do some code refactoring.
2022-09-29 11:42:03 +09:00
Ellis Hoag
01439c93b8 print <signal> when ranlib failed without an exit code 2022-09-28 19:02:38 -07:00
Nicholas Nethercote
269ff92975 Use let-chaining in WhileTrue::check_expr.
This has been bugging me for a while.
2022-09-29 09:10:57 +10:00