Commit Graph

198128 Commits

Author SHA1 Message Date
bors
a1bea1551b Auto merge of #100920 - Dylan-DPC:rollup-vlcw3sr, r=Dylan-DPC
Rollup of 9 pull requests

Successful merges:

 - #99249 (Do not re-parse function signatures to suggest generics)
 - #100309 (Extend comma suggestion to cases where fields arent missing)
 - #100368 (InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed>)
 - #100768 (Migrate `rustc_plugin_impl` to `SessionDiagnostic`)
 - #100835 (net listen backlog update, follow-up from #97963.)
 - #100851 (Fix rustc_parse_format precision & width spans)
 - #100857 (Refactor query modifier parsing)
 - #100907 (Fix typo in UnreachableProp)
 - #100909 (Minor `ast::LitKind` improvements)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-23 15:12:09 +00:00
Dylan DPC
28ead17745
Rollup merge of #100909 - nnethercote:minor-ast-LitKind-improvement, r=petrochenkov
Minor `ast::LitKind` improvements

r? `@petrochenkov`
2022-08-23 20:40:09 +05:30
Dylan DPC
12c1ac0a67
Rollup merge of #100907 - Nilstrieb:unrachable-typo-lol, r=Dylan-DPC
Fix typo in UnreachableProp

r? ``@Dylan-DPC``
2022-08-23 20:40:08 +05:30
Dylan DPC
fd93ab43ef
Rollup merge of #100857 - camsteffen:query-parse-refactor, r=davidtwco
Refactor query modifier parsing

Reduce redundancy and improve error spans.
2022-08-23 20:40:07 +05:30
Dylan DPC
110d8d99b2
Rollup merge of #100851 - Alexendoo:rpf-width-prec-spans, r=fee1-dead
Fix rustc_parse_format precision & width spans

When a `precision`/`width` was `CountIsName - {:name$}` or `CountIs - {:10}` the `precision_span`/`width_span` was set to `None`

For `width` the name span in `CountIsName(_, name_span)` had its `.start` off by one

r? ``@fee1-dead`` / cc ``@PrestonFrom`` since this is similar to #99987
2022-08-23 20:40:06 +05:30
Dylan DPC
a163659b1b
Rollup merge of #100835 - devnexen:listener_followups, r=devnexen
net listen backlog update, follow-up from #97963.

FreeBSD and using system limit instead for others.
2022-08-23 20:40:05 +05:30
Dylan DPC
35f2d125ca
Rollup merge of #100768 - Facel3ss1:plugin-impl-translation, r=davidtwco
Migrate `rustc_plugin_impl` to `SessionDiagnostic`

Migration of the `rustc_plugin_impl` crate.
~Draft PR because it is blocked on #100694 for `#[fatal(...)]` support~ (this has been merged, and I've changed over to `#[diag(...)]` now too), but I would also like to know if what I did with `LoadPluginError` is okay, because all it does is display the error message from `libloading` ([See conversation on zulip](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.23100717.20diagnostic.20translation/near/294327843)). This crate is apparently for a deprecated feature which is used by servo, so I don't know how much this matters anyway.
2022-08-23 20:40:04 +05:30
Dylan DPC
f42cdf76e1
Rollup merge of #100368 - chenyukang:fix-100321, r=lcnr
InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed>

Fixes #100321.
Use Cell<Option<ErrorGuaranteed>> to guarantee that we emit an error when that flag is set.
2022-08-23 20:40:03 +05:30
Dylan DPC
8733550870
Rollup merge of #100309 - compiler-errors:issue-100300, r=sanxiyn
Extend comma suggestion to cases where fields arent missing

Fixes #100300
2022-08-23 20:40:02 +05:30
Dylan DPC
4d1c273b32
Rollup merge of #99249 - cjgillot:no-reparse-fn, r=fee1-dead
Do not re-parse function signatures to suggest generics

This PR uses the existing resolution rib infrastructure to channel the correct span information to suggest generic parameters.  This allows to avoid re-parsing a function's source code.

Drive-by cleanup: this removes useless `FnItemRibKind` from late resolution ribs.  All the use cases are already covered by `ItemRibKind` and `AssocItemRibKind` which have more precise semantics.
2022-08-23 20:40:01 +05:30
Tomasz Miąsko
5f4d23dd14 Remove aliases for old atomic intrinsics names 2022-08-23 16:24:59 +02:00
Tomasz Miąsko
f5db0c7110 Use renamed atomic intrinsics in panic_unwind 2022-08-23 16:24:59 +02:00
Tomasz Miąsko
3bc5e322cf Update stdarch submodule 2022-08-23 16:24:59 +02:00
Santiago Pastorino
4da14ef50e
Use CRATE_HIR_ID and CRATE_DEF_ID for obligations from foreign crates 2022-08-23 09:08:30 -03:00
Santiago Pastorino
4cb492e740
Do not use unneeded extra errors variable 2022-08-23 08:55:43 -03:00
Santiago Pastorino
ac0b6af37b
Permit negative impls coherence to take advantage of implied bounds 2022-08-23 08:55:43 -03:00
Santiago Pastorino
5ff45dc89e
Move InferCtxtExt to rustc_trait_selection 2022-08-23 08:55:43 -03:00
Seo Sanghyeon
f280138c7c Use par_body_owners for liveness 2022-08-23 20:53:02 +09:00
bjorn3
b1e9d2e1a2 Revert "Avoid masking shift amounts (#1268)"
This reverts commit 156bda8bc7.

This breaks the mir_overflow_off rustc test:
https://github.com/bjorn3/rustc_codegen_cranelift/runs/7971362755?check_suite_focus=true#step:7:2904
2022-08-23 11:10:44 +00:00
Afonso Bordado
48c45c481c
Use native scalar fma instruction (#1267)
Cranelift 0.87 now supports lowering `fma` as a libcall on x86 [0].
With 0.88 enabling the native x86 instruction under the `has_fma` flag.

aarch64 and s390x already support this as a native instruction, so it's
nice that we emit it for those.

We can't lower the SIMD version using the `fma` instruction since the
lowering can fail if the x86 `has_fma` flag is not enabled. Cranelift
doesn't yet know how to fallback for these cases

[0]: 709716bb8e
2022-08-23 12:42:35 +02:00
Afonso Bordado
156bda8bc7
Avoid masking shift amounts (#1268)
Cranelift 0.87 now follows its own documentation regarding
shift amounts, and implicitly masks them if the arch requires it. [0]

[0]: 0508932174
2022-08-23 12:42:24 +02:00
yukang
351acc87f5 parser will not give wrong help message for 'public' 2022-08-23 17:02:40 +08:00
bors
1cff564203 Auto merge of #100782 - thomcc:fix-android-sigaddset, r=Mark-Simulacrum
Align android `sigaddset` impl with the reference impl from Bionic

In https://github.com/rust-lang/rust/pull/100737 I noticed we were treating the sigset_t as an array of bytes, while referencing code from android (ad8dcd6023/libc/include/android/legacy_signal_inlines.h) which treats it as an array of unsigned long.

That said, the behavior difference is so subtle here that it's not hard to see why nobody noticed. This fixes the implementation to be equivalent to the one in bionic.
2022-08-23 08:09:19 +00:00
Tomasz Miąsko
ba74a628ad Diagnose missing includes in run-make tests 2022-08-23 10:06:06 +02:00
Nicholas Nethercote
6087dc2054 Remove the symbol from ast::LitKind::Err.
Because it's never used meaningfully.
2022-08-23 16:56:24 +10:00
Nicholas Nethercote
fb5dc6b3e7 Add some useful comments to LitKind. 2022-08-23 16:56:23 +10:00
nils
8e6c5ad696 Fix typo in UnreachableProp 2022-08-23 08:18:18 +02:00
bors
38528d4dc0 Auto merge of #100904 - matthiaskrgr:rollup-z3yzivj, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #100382 (Make the GATS self outlives error take into GATs in the inputs)
 - #100565 (Suggest adding a missing semicolon before an item)
 - #100641 (Add the armv4t-none-eabi target to the supported_targets)
 - #100789 (Use separate infcx to solve obligations during negative coherence)
 - #100832 (Some small bootstrap cleanup)
 - #100861 (fix ICE with extra-const-ub-checks)
 - #100862 (tidy: remove crossbeam-utils)
 - #100887 (Refactor part of codegen_call_terminator)
 - #100893 (Remove out-of-context comment in `mem::MaybeUninit` documentation)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-23 05:22:05 +00:00
Matthias Krüger
683a08af6a
Rollup merge of #100893 - thinety:master, r=scottmcm
Remove out-of-context comment in `mem::MaybeUninit` documentation

Reverted the comment to an earlier version to avoid confusion: neither raw pointer assignment nor `ptr::write` is used inside the for loop.
2022-08-23 06:55:31 +02:00
Matthias Krüger
234e0f27c2
Rollup merge of #100887 - eholk:codegen_call_terminator-cleanup, r=fee1-dead
Refactor part of codegen_call_terminator

I was reading through this code and found the chain of `if let` and a nested match on the same value that was matched in the `if let` to be kind of hard to follow. This PR cleans it up by flattening the `if let` chain and nested match into a single `match` expression.
2022-08-23 06:55:30 +02:00
Matthias Krüger
8332f6559b
Rollup merge of #100862 - ehuss:tidy-crossbeam, r=Mark-Simulacrum
tidy: remove crossbeam-utils

crossbeam-utils is no longer needed now that scoped threads are available in 1.63.
2022-08-23 06:55:29 +02:00
Matthias Krüger
f5fcac9978
Rollup merge of #100861 - RalfJung:const-ice, r=oli-obk
fix ICE with extra-const-ub-checks

Fixes https://github.com/rust-lang/rust/issues/100771
2022-08-23 06:55:28 +02:00
Matthias Krüger
21d8f484d7
Rollup merge of #100832 - ehuss:bootstrap-cleanup, r=jyn514
Some small bootstrap cleanup

This is a collection of a few small cleanups. See commits for more details.

* Remove some unused fields from the tool_extended macro.
* Remove rustfmt from publish_toolstate.
* Remove Steve from toolstate failure notices.
* Don't allow rustfmt to fail on dist.
2022-08-23 06:55:27 +02:00
Matthias Krüger
579dfa42be
Rollup merge of #100789 - compiler-errors:issue-99662, r=spastorino
Use separate infcx to solve obligations during negative coherence

I feel like I fixed this already but I may have fixed it then forgot to push the branch...

Also fixes up some redundant param-envs being passed around (since they're already passed around in the `Obligation`)

Fixes #99662

r? ``@spastorino``
2022-08-23 06:55:26 +02:00
Matthias Krüger
44aa866488
Rollup merge of #100641 - corwinkuiper:add-armv4t-target, r=oli-obk
Add the armv4t-none-eabi target to the supported_targets

This target was added in #100244 but forgot to add it to the macro in the `mod.rs` file.

``@Lokathor``
2022-08-23 06:55:25 +02:00
Matthias Krüger
54d0f50677
Rollup merge of #100565 - TaKO8Ki:suggest-adding-missing-semicolon-before-item, r=compiler-errors
Suggest adding a missing semicolon before an item

fixes #100533
2022-08-23 06:55:24 +02:00
Matthias Krüger
e568cb45fe
Rollup merge of #100382 - jackh726:gat-self-outlives-input, r=compiler-errors
Make the GATS self outlives error take into GATs in the inputs

Before, the reasoning was that outlives should factor in to the outlives error, because that value is produced and inputs aren't. However, this is potentially confusing, and we can just require this for now and relax it later if we need. GATs in where clauses still don't count for the self outlives error, and I've added a test for that.

This now errors:
```rust
trait Input {
    type Item<'a>;
    //~^ missing required
    fn takes_item<'a>(&'a self, item: Self::Item<'a>);
}
```

I've also added a test that this does not:
```rust
trait WhereClause {
    type Item<'a>;
    fn takes_item<'a>(&'a self) where Self::Item<'a>: ;
}
```

r? ``@compiler-errors``
2022-08-23 06:55:23 +02:00
bors
7e3e8a816f Auto merge of #100678 - GuillaumeGomez:improve-rustdoc-json-tests, r=aDotInTheVoid
Improve rustdoc json tests

Fixes #100588.

r? `@aDotInTheVoid`
2022-08-23 02:40:52 +00:00
Tomasz Miąsko
f8ca6aad83 ./x.py test --bless 2022-08-23 00:00:00 +00:00
Tomasz Miąsko
c2b74f9cc7 Remove support for adding statement to all successors
This feature of MIR patch system is no longer used.
2022-08-23 10:08:48 +02:00
Tomasz Miąsko
625af2cc75 Elide storage markers for internal locals when inlining 2022-08-23 10:08:48 +02:00
Tomasz Miąsko
162bd16352 Elide storage markers when elaborating deref projections 2022-08-23 10:08:48 +02:00
Tomasz Miąsko
943a380b37 Elide storage markers when elaborating box derefs 2022-08-23 10:08:48 +02:00
bors
8818b00b63 Auto merge of #99963 - cjgillot:iter-submodule, r=compiler-errors
Simplify implementation for par_for_each_module
2022-08-22 23:09:35 +00:00
Thiago Trannin
3d2b61c1af Remove out-of-context comment in mem::MaybeUninit documentation 2022-08-22 20:03:53 -03:00
Camille GILLOT
dff428013d Mark suggestion as MaybeIncorrect. 2022-08-23 00:09:58 +02:00
Camille GILLOT
da9ccc2c98 Remove FnItemRibKind. 2022-08-23 00:08:42 +02:00
Camille GILLOT
6e88d738be Remove generate_fn_name_span and generate_local_type_param_snippet. 2022-08-23 00:08:42 +02:00
Camille GILLOT
362e6361d0 Do not call generate_fn_name_span in typeck. 2022-08-23 00:08:42 +02:00
Camille GILLOT
613dc2204d Improve local generic parameter suggestions. 2022-08-23 00:08:42 +02:00