Commit Graph

200316 Commits

Author SHA1 Message Date
Pietro Albini
d19079b067
remove backed off PR from relnotes 2022-09-19 15:29:13 +02:00
est31
cd3979dba1 Add all submodules to the list of directories tidy skips
I ran git config --file .gitmodules --name-only --get-regexp path
and added all submodules that were not already in the list to it.
2022-09-19 15:17:33 +02:00
y86-dev
8e848dc23f Added tracking issue 2022-09-19 15:07:12 +02:00
Santiago Pastorino
550bd0945f
Simplify rpitit handling on lower_fn_decl 2022-09-19 09:30:39 -03:00
Guillaume Gomez
db2d5df860 Add GUI test for notable traits element position 2022-09-19 12:38:14 +02:00
bors
11bb80a92b Auto merge of #101901 - lcnr:early-binder-type-foldable, r=compiler-errors
`EarlyBinder` prevent misuse

folding a type before substituting is pretty much always wrong and could happen by accident, e.g. see https://github.com/rust-lang/rust/pull/99798#discussion_r968666538

this PR removes the `TypeFoldable` and `TypeVisitable` impl from `EarlyBinder`.

r? types cc `@jackh726`
2022-09-19 10:35:09 +00:00
bors
187bee0bb1 Auto merge of #13257 - rust-lang:revert-13147-fix/dyn-ty-inherent-methods, r=lnicola
fix: Fix a crash introduced in #13147

Reverts rust-lang/rust-analyzer#13147

https://github.com/rust-lang/rust-analyzer/actions/runs/3041499441/jobs/4898678721#step:18:62
2022-09-19 09:46:21 +00:00
Laurențiu Nicola
e54f61dbdb Try to fix crash introduced in #13147 2022-09-19 12:45:38 +03:00
lcnr
0c3e01d8f6 extend polymorphization hack comment. 2022-09-19 11:44:29 +02:00
lcnr
647052fc04 remove the Subst trait, always use EarlyBinder 2022-09-19 11:37:27 +02:00
lcnr
d398b54de6 do not implement type traversal for EarlyBinder 2022-09-19 11:28:32 +02:00
bors
503e19d01e Auto merge of #101629 - compiler-errors:issue-101623, r=sanxiyn
Be careful about `expr_ty_adjusted` when noting block tail type

Fixes #101623
2022-09-19 07:41:54 +00:00
bors
efa717bc2d Auto merge of #101924 - jackh726:revert-static-hrtb-error, r=compiler-errors
Re-add HRTB implied static bug note

r? `@compiler-errors` since you reviewed it previously

I deleted a `normalize` call and forgot about it. Whoops.
2022-09-19 04:56:14 +00:00
Michael Howell
60c98ce11c rustdoc: remove unused CSS td.summary-column
It was added in 2a1bad70dd to go with this
module summary function:

2a1bad70dd/src/librustdoc/html/format.rs (L767-L780)

The corresponding HTML was removed in
0a46933c4d.
2022-09-18 20:03:17 -07:00
Josh Stone
ad671849b9 Try to clarify what's new in 1.64.0 ffi types 2022-09-18 19:24:57 -07:00
bors
c8e12cc8bf Auto merge of #101799 - LukeMathWalker:distribute-json-doc, r=jyn514
Distribute json doc

# Overview

We add a new component, `rust-json-docs`, to distribute the JSON version of rustdoc's output for public compiler crates (i.e. `std`, `alloc`, `proc_macro`, `core` and `test`).
As discussed in #101383, we do not bundle this up as part of the existing `rust-docs` component since `rustdoc`'s JSON format is still unstable.

# Open questions / Doubts

I tried my best, but I never touched this codebase and I couldn't find much documentation on how `dist` works - I pattern-matched existing code, which might have led to some non-sensical choices in the eyes of people more familiar with the codebase. In particular, I am not sure if my choice of adding a new config flag is appropriate or if the decision to build/not build the JSON docs is more appropriately gated by one of the existing flags.
Any suggestion is more than welcome.

Closes #101383
2022-09-19 02:13:54 +00:00
Josh Stone
fac12e25dd Use LLVM C-API to build atomic cmpxchg and fence 2022-09-18 16:01:57 -07:00
Ralf Jung
9fa3171015 interpret: expose generate_stacktrace without full InterpCx 2022-09-18 20:51:04 +02:00
Deadbeef
ee96ae0a32 make projection bounds with const bounds satisfy const 2022-09-18 18:05:30 +00:00
bors
39eaf7864c Auto merge of #13253 - Veykril:simplify, r=Veykril
Simplify
2022-09-18 17:52:21 +00:00
Lukas Wirth
0d9f97166b Simplify 2022-09-18 19:44:38 +02:00
bors
11bf2e7ffb Auto merge of #13058 - dpaoliello:extraenv, r=Veykril
Add a new configuration settings to set env vars when running cargo, rustc, etc. commands: cargo.extraEnv and checkOnSave.extraEnv

It can be extremely useful to be able to set environment variables when rust-analyzer is running various cargo or rustc commands (such as `cargo check`, `cargo --print cfg` or `cargo metadata`): users may want to set custom `RUSTFLAGS`, change `PATH` to use a custom toolchain or set a different `CARGO_HOME`.

There is the existing `server.extraEnv` setting that allows env vars to be set when the rust-analyzer server is launched, but using this as the recommended mechanism to also configure cargo/rust has some drawbacks:
- It convolutes configuring the rust-analyzer server with configuring cargo/rustc (one may want to change the `PATH` for cargo/rustc without affecting the rust-analyzer server).
- The name `server.extraEnv` doesn't indicate that cargo/rustc will be affected but renaming it to `cargo.extraEnv` doesn't indicate that the rust-analyzer server would be affected.
- To make the setting useful, it needs to be dynamically reloaded without requiring that the entire extension is reloaded. It might be possible to do this, but it would require the client communicating to the server what the overwritten env vars were at first launch, which isn't easy to do.

This change adds two new configuration settings: `cargo.extraEnv` and `checkOnSave.extraEnv` that can be used to change the environment for the rust-analyzer server after launch (thus affecting any process that rust-analyzer invokes) and the `cargo check` command respectively. `cargo.extraEnv` supports dynamic changes by keeping track of the pre-change values of environment variables, thus it can undo changes made previously before applying the new configuration (and then requesting a workspace reload).
2022-09-18 17:43:46 +00:00
Pietro Albini
b4937c3c7b
remove ice fix 2022-09-18 16:12:05 +02:00
Pietro Albini
24b0f99109
make the styling of the cargo section similar to the rest 2022-09-18 16:12:03 +02:00
Pietro Albini
f062d5a99d
remove diagnostic changes 2022-09-18 16:12:02 +02:00
Pietro Albini
8cad20de55
remove items that are already mentioned in the compatibility notes 2022-09-18 16:12:01 +02:00
Pietro Albini
68f6c4f4eb
improve the wording for some release notes items 2022-09-18 16:11:57 +02:00
bors
a37499ae66 Auto merge of #101332 - sashashura:patch-1, r=pietroalbini
GitHub Workflows security hardening

This PR adds explicit [permissions section](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions) to workflows. This is a security best practice because by default workflows run with [extended set of permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) (except from `on: pull_request` [from external forks](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an [injection](https://securitylab.github.com/research/github-actions-untrusted-input/) or compromised third party tool or action) is restricted.
It is recommended to have [most strict permissions on the top level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and grant write permissions on [job level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) case by case.
2022-09-18 14:10:57 +00:00
Ralf Jung
eed6fdb0eb clarify that linting is not a semantic change 2022-09-18 14:14:42 +02:00
bors
4af79ccd5e Auto merge of #101955 - jam1garner:fix-proc-macro-typo, r=petrochenkov
Fix typo in proc_macro Span::eq documentation
2022-09-18 11:42:13 +00:00
bors
a29f341a8a Auto merge of #101963 - scottmcm:from-ptr-range-optimization, r=Mark-Simulacrum
Add a codegen test for `slice::from_ptr_range`

I noticed back in #95579 that this didn't optimize as well as it should.

It's better now, after #95837 changed the code in `from_ptr_range` and https://github.com/llvm/llvm-project/issues/54824 was fixed in LLVM 15.

So here's a test to keep it generating the good version.
2022-09-18 08:44:27 +00:00
Weihang Lo
6d02f782e6
Update cargo
8 commits in 082503982ea0fb7a8fd72210427d43a2e2128a63..73ba3f35e0205844418260722c11602113179c4a
2022-09-13 17:49:38 +0000 to 2022-09-18 06:38:16 +0000

- Revert "Clarify when cargo detects changes" (rust-lang/cargo#11107)
- Fix links to workspace inheritance headings in workspace docs (rust-lang/cargo#11103)
- docs(ref): Clarify workspace settings (rust-lang/cargo#11082)
- Update comment about ResolveVersion default version (rust-lang/cargo#11095)
- [master] Run `reach_max_unpack_size` test only on debug build (rust-lang/cargo#11091)
- Clarify when cargo detects changes (rust-lang/cargo#11092)
- [master] Fix for CVE-2022-36113 and CVE-2022-36114 (rust-lang/cargo#11089)
- Expose cargo add internals as edit API (rust-lang/cargo#11059)
2022-09-18 08:26:45 +01:00
Charles Lew
d381d8e982 Add unit test for identifier Unicode emoji diagnostics 2022-09-18 14:30:38 +08:00
bors
4c2e500788 Auto merge of #101816 - raldone01:cleanup/select_nth_unstable, r=Mark-Simulacrum
Cleanup slice sort related closures in core and alloc
2022-09-18 06:03:22 +00:00
Ding Xiang Fei
eb36f5ee5b
add miri test via const fn 2022-09-18 12:18:34 +08:00
Ding Xiang Fei
d510ba3bc3
add mir-opt test 2022-09-18 12:10:56 +08:00
Ding Xiang Fei
48c1c1d190
avoid duplicating StorageLive in let-else 2022-09-18 12:10:53 +08:00
bors
65c16dc3a8 Auto merge of #101960 - matthiaskrgr:rollup-1l5v7ip, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #101151 (Document x86_64-fortanix-unknown-sgx platform)
 - #101912 (Update `unicode-rs` crates to Unicode 15)
 - #101923 (Don't add rustdoc's CSS to other doc pages)
 - #101953 (Fix tooltip display for error codes)
 - #101954 (rustdoc: remove redundant `.location a { font-weight: 500 }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-18 03:40:01 +00:00
Scott McMurray
335690200e Add a codegen test for slice::from_ptr_range 2022-09-17 18:54:00 -07:00
Matthias Krüger
c0e8d46e20
Rollup merge of #101954 - notriddle:notriddle/location-a-first-of-type, r=GuillaumeGomez
rustdoc: remove redundant `.location a { font-weight: 500 }`

The `class="location"` element is an h2, either in the sidebar or in the mobile header. Either way, it already has `font-weight: 500`, which the link inside will inherit.

The original version of this rule was added in 9e82fc7ef9. At that time, the location header was rendered as a paragraph with the full path:

9e82fc7ef9/src/librustdoc/html/render.rs (L2080)

Nowadays, it's rendered as a true header, with only the name of the item, and the full path is included in a separate `fqn` header:

98ad6a5519/src/librustdoc/html/render/mod.rs (L1797)
2022-09-18 02:55:31 +02:00
Matthias Krüger
fb20485592
Rollup merge of #101953 - GuillaumeGomez:fix-error-code-tooltip, r=notriddle
Fix tooltip display for error codes

Fixes #101919.

You can test it [here](https://rustdoc.crud.net/imperio/fix-error-code-tooltip/index.html).

cc `@jsha`
r? `@notriddle`
2022-09-18 02:55:30 +02:00
Matthias Krüger
4c0b52013d
Rollup merge of #101923 - jsha:aux-pages-no-rustdoc-css, r=Mark-Simulacrum
Don't add rustdoc's CSS to other doc pages

This was originally added so those doc pages could use the same font files, but it turns out to be fragile. And those doc pages are just stubs that link to other pages, so they don't need fancy fonts.

Before:

![Screenshot from 2022-09-16 16-45-44](https://user-images.githubusercontent.com/220205/190831650-b626ee66-046a-4b71-8e57-dd06872359db.png)

After:

![Screenshot from 2022-09-16 16-52-06](https://user-images.githubusercontent.com/220205/190831657-f7d10a3f-d8c0-48a3-b30d-666db5a50563.png)

Demo of all affected pages:

https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-design-faq.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-lang-faq.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/complement-project-faq.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/grammar.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-crates.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-error-handling.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-ffi.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-macros.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-ownership.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-plugins.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-pointers.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-strings.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-tasks.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-testing.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/guide-unsafe.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/index.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/intro.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/not_found.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/reference.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/rustdoc.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/rust.html
https://rustdoc.crud.net/jsha/aux-pages-no-rustdoc-css/tutorial.html

Prior art: https://github.com/rust-lang/rust/pull/86663
2022-09-18 02:55:30 +02:00
Matthias Krüger
46ebe7cf41
Rollup merge of #101912 - crlf0710:compiler_update_unicode_15, r=Manishearth
Update `unicode-rs` crates to Unicode 15

r? `@Manishearth`
2022-09-18 02:55:29 +02:00
Matthias Krüger
f62b8261d8
Rollup merge of #101151 - jethrogb:jb/sgx-platform, r=JohnTitor
Document x86_64-fortanix-unknown-sgx platform

cc `@raoulstrackx` `@mzohreva`
2022-09-18 02:55:29 +02:00
bors
bc7b17cfe3 Auto merge of #101862 - cjgillot:lint-regression, r=oli-obk
Do not fetch HIR node when iterating to find lint.

Addresses the regression in https://github.com/rust-lang/rust/pull/101620
2022-09-18 00:46:14 +00:00
hanar3
0405a5d4e9 improve error message for when a query isn't supported 2022-09-17 20:25:37 -03:00
jam1garner
527f7887b8
Fix typo in proc_macro Span::eq 2022-09-17 19:15:30 -04:00
Michael Howell
b693d2cadf rustdoc: remove redundant .location a { font-weight: 500 }
The `class="location"` element is an h2, either in the sidebar or in the
mobile header. Either way, it already has `font-weight: 500`, which the link
inside will inherit.

The original version of this rule was added in
9e82fc7ef9. At that time, the location header
was rendered as a paragraph with the full path:

9e82fc7ef9/src/librustdoc/html/render.rs (L2080)

Nowadays, it's rendered as a true header, with only the name of the item,
and the full path is included in a separate `fqn` header:

98ad6a5519/src/librustdoc/html/render/mod.rs (L1797)
2022-09-17 15:33:12 -07:00
Guillaume Gomez
f45eacce76 Fix tooltip display for error codes 2022-09-18 00:32:28 +02:00
bors
5253b0a0a1 Auto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #101093 (Initial version of 1.64 release notes)
 - #101713 (change AccessLevels representation)
 - #101821 (Bump Unicode to version 15.0.0, regenerate tables)
 - #101826 (Enforce "joined()" and "joined_with_noop()" test)
 - #101835 (Allow using vendoring when running bootstrap from outside the source root)
 - #101942 (Revert "Copy stage0 binaries into stage0-sysroot")
 - #101943 (rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-17 22:04:28 +00:00