Commit Graph

212110 Commits

Author SHA1 Message Date
Ralf Jung
187ba67781 Preparing for merge from rustc 2022-11-27 20:51:50 +01:00
lcnr
99c3dda066
fix type
Co-authored-by: fee1-dead <ent3rm4n@gmail.com>
2022-11-27 20:48:31 +01:00
Vadim Petrochenkov
5b0e80ecf3 Stabilize native library modifier verbatim 2022-11-27 22:36:32 +03:00
bors
66354f0043 Auto merge of #2694 - RalfJung:retag-deref-check, r=saethlin
fix handling of spurious accesses during retag

The `dereferenceable` attribute we emit for LLVM is checked during retag in Stacked Borrows.
However, we currently don't properly do that for retagging of `&mut !Unpin`, which this PR fixes.
Also this adjusts retagging to inform the data race model of the accesses as well.

Fixes https://github.com/rust-lang/miri/issues/2648.
Also fixes https://github.com/rust-lang/miri/issues/2693 since the same issue arose for retagging as well.

r? `@saethlin`
2022-11-27 19:03:21 +00:00
bors
c8eba8e4a1 Auto merge of #9967 - koka831:fix/9416, r=llogiq
Remove blank lines when needless_return returns no value

fix https://github.com/rust-lang/rust-clippy/issues/9416

changelog: [`needless_return`] improve result format

r? `@llogiq`
2022-11-27 19:03:06 +00:00
Ding Xiang Fei
9cd12cdf78
inference test for #104649 2022-11-28 01:48:35 +08:00
bors
1eb62b1235 Auto merge of #104983 - matthiaskrgr:rollup-018sk73, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #95836 (Use `rust_out{exe_suffix}` for doctests)
 - #104882 (notify lcnr on changes to `ObligationCtxt`)
 - #104892 (Explain how to get the discriminant out of a `#[repr(T)] enum` with payload)
 - #104917 (Allow non-org members to label `requires-debug-assertions`)
 - #104931 (Pretty-print generators with their `generator_kind`)
 - #104934 (Remove redundant `all` in cfg)
 - #104944 (Support unit tests for jsondoclint)
 - #104946 (rustdoc: improve popover focus handling JS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-27 17:10:58 +00:00
Markus Everling
cd68bd9bab Fix natvis VecDeque formatter 2022-11-27 18:09:56 +01:00
Pratush Rai
d742407917 suggested changes 2022-11-27 22:23:16 +05:30
bors
ef8439780c Auto merge of #9963 - ehuss:highfive-triagebot, r=xFrednet
Migrate from highfive to triagebot

This migrates this repository from using the highfive bot to using triagebot (aka rustbot).

This should not be merged without coordinating the removal of the highfive webhook and/or merging https://github.com/rust-lang/highfive/pull/435.

changelog: none
2022-11-27 16:20:05 +00:00
Yuri Astrakhan
ab576afc18 addressed review feedback 2022-11-27 10:34:13 -05:00
Guillaume Gomez
23c3941942 Add rustdoc test for Deref to primitive types 2022-11-27 16:31:52 +01:00
Guillaume Gomez
5856e40885 Remove Crate::primitives field 2022-11-27 16:31:34 +01:00
Eric Huss
13dfbb2fa5 Migrate from highfive to triagebot 2022-11-27 07:24:46 -08:00
Yuri Astrakhan
7a2d92e1f2 Add allow-mixed-uninlined-format-args config
Implement `allow-mixed-uninlined-format-args` config param to change the behavior of the `uninlined_format_args` lint. Now it is a part of `style`, and won't propose inlining in case of a mixed usage, e.g. `print!("{} {}", var, 1+2)`. If the user sets allow-mixed-uninlined-format-args config param to `false`, then it would behave like before, proposing to inline args even in the mixed case.
2022-11-27 10:12:51 -05:00
Matthias Krüger
55cf566f04
Rollup merge of #104946 - notriddle:notriddle/popover-menu-focus, r=GuillaumeGomez
rustdoc: improve popover focus handling JS

This commit fixes a few inconsistencies and erratic behavior from the notable traits, settings, and sidebar popups:

* It makes it so that pressing Escape closes the mobile sidebar. This is a bit difficult to do on iPhone, but on other setups like desktop tiling window managers, it's easy and makes sense.
* It makes sure that pressing escape while a notable trait popover is open focuses the popover's toggle button, instead of leaving nothing focused, since that makes more sense with keyboard navigation. Clicking the settings, help, or sidebar buttons, however, will not focus the notable trait popover toggle button.
* It ensures that notable trait and settings popovers are exclusive with the mobile sidebar. Nothing should ever overlap a popover, and there should never be more than one popover open at once.
2022-11-27 16:03:09 +01:00
Matthias Krüger
e3165a3808
Rollup merge of #104944 - aDotInTheVoid:jsondoclint-unit-tests, r=jyn514
Support unit tests for jsondoclint

r? ````@ghost````
2022-11-27 16:03:09 +01:00
Matthias Krüger
8d90647641
Rollup merge of #104934 - ChrisDenton:all-anybody-wants, r=thomcc
Remove redundant `all` in cfg

This appears to have been accidentally left in after removing the other branches 45bf1ed1a1

(hat tip to kangalioo for the git archaeology)
2022-11-27 16:03:08 +01:00
Matthias Krüger
6e6c42c61c
Rollup merge of #104931 - Swatinem:async-pretty, r=eholk
Pretty-print generators with their `generator_kind`

After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally.

This now reverses that change so that async fn/blocks are pretty-printed as `[$async-type@$source-position]` in various diagnostics, and updates the tests that this touches.
2022-11-27 16:03:08 +01:00
Matthias Krüger
9ebffb7c3c
Rollup merge of #104917 - compiler-errors:requires-debug-assertions, r=Mark-Simulacrum
Allow non-org members to label `requires-debug-assertions`

`jruderman` tried to add this in #104916, for example. I think I've seen this happen before as well.
2022-11-27 16:03:07 +01:00
Matthias Krüger
9ba78ac08b
Rollup merge of #104892 - lukas-code:discriminant, r=scottmcm
Explain how to get the discriminant out of a `#[repr(T)] enum` with payload

example stolen from https://github.com/rust-lang/reference/pull/1055

````@rustbot```` label A-docs
2022-11-27 16:03:07 +01:00
Matthias Krüger
5d05cf8473
Rollup merge of #104882 - lcnr:notify-ocx, r=Mark-Simulacrum
notify lcnr on changes to `ObligationCtxt`

Right now the `ObligationCtxt` has an API which should prevent leaking any important details of the trait solver. This allows us to freely use it without having to worry about causing issues for the [trait solver rewrite](https://github.com/orgs/rust-lang/projects/26/views/1).

I would like to keep it this way ^^
2022-11-27 16:03:06 +01:00
Matthias Krüger
7ce937fe4a
Rollup merge of #95836 - workingjubilee:doctest-exe, r=notriddle
Use `rust_out{exe_suffix}` for doctests

This was mentioned as an issue to me by ````@bruxisma.```` There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.
2022-11-27 16:03:06 +01:00
bors
c55cadcfd9 Auto merge of #9919 - Alexendoo:configuration-link, r=xFrednet
Link to a list of configurable lints in documentation

changelog: none
2022-11-27 14:42:54 +00:00
bors
696ea0627d Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errors
Separate lifetime ident from lifetime resolution in HIR

Drive-by: change how suggested generic args are computed.
Fixes https://github.com/rust-lang/rust/issues/103815

I recommend reviewing commit-by-commit.
2022-11-27 14:30:19 +00:00
bors
454784afba Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errors
Separate lifetime ident from lifetime resolution in HIR

Drive-by: change how suggested generic args are computed.
Fixes https://github.com/rust-lang/rust/issues/103815

I recommend reviewing commit-by-commit.
2022-11-27 14:30:19 +00:00
Ralf Jung
60d5d65a4d interpret: get rid of run() function 2022-11-27 15:20:26 +01:00
koka
39d0477080
Refactor BytePos handling 2022-11-27 22:41:06 +09:00
bors
a83b105b4c Auto merge of #2685 - Nilstrieb:cargo-miri-wasm, r=RalfJung
Use `.wasm` extension when building for wasm in cargo-miri

WASM uses the `.wasm` file extension for its binaries (just like how windows uses `.exe`), so we need to set that as well.

I'm not sure whether gating this behind the wasm target is a good idea, maybe it makes more sense to always do it just like on windows.
2022-11-27 13:31:05 +00:00
koka
8c50dfb546
Remove blank lines when needless_return returns no value
fix https://github.com/rust-lang/rust-clippy/issues/9416
2022-11-27 22:01:21 +09:00
bors
ef99041f65 Auto merge of #9860 - Alexendoo:msrv-outer-attr, r=Jarcho
Allow using `clippy::msrv` as an outer attribute

changelog: Allow specifying `#[clippy::msrv]` as an outer attribute

Probably not too useful to clippy users, but it makes the MSRV tests slightly cleaner
2022-11-27 12:58:54 +00:00
bors
9f8df93b09 Auto merge of #2701 - RalfJung:smoke, r=RalfJung
run_tests_minimal: actually run the smoke test on the desired target
2022-11-27 12:45:34 +00:00
Alex Macleod
461e219d1d Allow using clippy::msrv as an outer attribute 2022-11-27 12:43:17 +00:00
Alex Macleod
28976ce9c3 Link to a list of configurable lints in documentation 2022-11-27 12:38:33 +00:00
Lukas Wirth
e4c9915218
notify the rust-analyzer team on changes to the rust-analyzer subtree 2022-11-27 13:28:48 +01:00
Ralf Jung
c6587b0160 run_tests_minimal: actually run the smoke test on the desired target 2022-11-27 13:26:31 +01:00
bors
5a14c5af09 Auto merge of #2700 - RalfJung:begingroup, r=RalfJung
CI: fix begingroup printing
2022-11-27 12:21:26 +00:00
Ralf Jung
b20efbd79f CI: fix begingroup printing 2022-11-27 13:20:44 +01:00
Maybe Waffle
1d42936b18 Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
Vincenzo Palazzo
ee6f18ef59
make simple check of prinf function.
With this commit we start to make some simple
check when the name resolution fails, and
we generate some helper message in case the
name is a C name like in the case of the `printf`
and suggest the correct rust method.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-11-27 11:50:02 +01:00
bors
df04d28163 Auto merge of #103917 - oli-obk:layout_math, r=RalfJung,lcnr
Various cleanups around scalar layout restrictions

Pulled out of https://github.com/rust-lang/rust/pull/103724
2022-11-27 10:35:00 +00:00
nils
958d5918b0 Use .wasm extension when building for wasm in cargo-miri
WASM uses the `.wasm` file extension for its binaries (just like how
windows uses `.exe`), so we need to set that as well.
2022-11-27 10:25:32 +01:00
Ralf Jung
b6ae82bd5c replace 'locally built rustc' instructions by 'Miri in rustc' 2022-11-27 10:02:28 +01:00
bors
030b4b7ad9 Auto merge of #9950 - xFrednet:0000-improve-exit-docs, r=llogiq
Improve `EXIT` lint docs

Super simple change, hopefully fast and fun to review. Have a great start to the weekend!

changelog: none
2022-11-27 08:47:20 +00:00
Maybe Waffle
5ba0056346 Use TyCtxt::is_fn_trait is a couple more places 2022-11-27 07:20:28 +00:00
Maybe Waffle
ea447924ce micro doc fixes 2022-11-27 07:19:30 +00:00
Maybe Waffle
fa89f53352 Simplify ty::ClosureKind::extends
This is valid per the comment of the `ClosureKind` defition
2022-11-27 07:19:30 +00:00
Maybe Waffle
4b6e1d1c5f Add TyCtxt::is_fn_trait 2022-11-27 07:19:29 +00:00
Maybe Waffle
d0c7ed3bea Remove ty::ClosureKind::from_def_id
…in favour of `TyCtxt::fn_trait_kind_from_def_id`
2022-11-27 07:18:36 +00:00
Maybe Waffle
881862ecb7 Rename fn_trait_kind_from_{from_lang=>def_id} to better convey meaning 2022-11-27 07:14:49 +00:00