]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agoDocument projection condition
Oli Scherer [Mon, 19 Sep 2022 15:33:36 +0000 (15:33 +0000)]
Document projection condition

22 months agoIncorporate feedback
mejrs [Mon, 19 Sep 2022 15:19:45 +0000 (17:19 +0200)]
Incorporate feedback

22 months ago`DestructuredConst` split mir and ty
lcnr [Mon, 19 Sep 2022 15:00:38 +0000 (17:00 +0200)]
`DestructuredConst` split mir and ty

22 months agoAuto merge of #2547 - RalfJung:fake-apis, r=saethlin
bors [Mon, 19 Sep 2022 14:51:43 +0000 (14:51 +0000)]
Auto merge of #2547 - RalfJung:fake-apis, r=saethlin

note on deterministic 'fake' API implementations

Now that we also have fake clocks, it seems prudent to warn about this at the top of the readme.

r? `@rust-lang/miri`

22 months agoAuto merge of #9483 - c410-f3r:arith, r=Jarcho
bors [Mon, 19 Sep 2022 14:35:14 +0000 (14:35 +0000)]
Auto merge of #9483 - c410-f3r:arith, r=Jarcho

[arithmetic-side-effects] Finish non-overflowing ops

Extends https://github.com/rust-lang/rust-clippy/pull/9474 to also take into consideration "raw" binary operations. For example, `let a = b / 2` and `let a = 1 * b` won't trigger the lint.

changelog: [arithmetic-side-effects] Finish non-overflowing ops

22 months agoctfe, `const_to_op` only for mir constants
lcnr [Mon, 19 Sep 2022 14:17:33 +0000 (16:17 +0200)]
ctfe, `const_to_op` only for mir constants

22 months agoremove `ty::Const::from_inline_const`
lcnr [Mon, 19 Sep 2022 14:10:18 +0000 (16:10 +0200)]
remove `ty::Const::from_inline_const`

22 months agoremove `FnCtxt::to_const`
lcnr [Mon, 19 Sep 2022 14:08:40 +0000 (16:08 +0200)]
remove `FnCtxt::to_const`

22 months agoremove backed off PR from relnotes
Pietro Albini [Mon, 19 Sep 2022 13:29:13 +0000 (15:29 +0200)]
remove backed off PR from relnotes

22 months agoAdd all submodules to the list of directories tidy skips
est31 [Mon, 19 Sep 2022 13:11:15 +0000 (15:11 +0200)]
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.

22 months agoAdded tracking issue
y86-dev [Mon, 19 Sep 2022 13:07:12 +0000 (15:07 +0200)]
Added tracking issue

22 months agoSimplify rpitit handling on lower_fn_decl
Santiago Pastorino [Mon, 19 Sep 2022 12:29:12 +0000 (09:29 -0300)]
Simplify rpitit handling on lower_fn_decl

22 months agoAdd matches! checking to nonstandard_macro_braces
Jonas Platte [Tue, 13 Sep 2022 10:08:17 +0000 (12:08 +0200)]
Add matches! checking to nonstandard_macro_braces

22 months agoAdd GUI test for notable traits element position
Guillaume Gomez [Mon, 19 Sep 2022 10:32:30 +0000 (12:32 +0200)]
Add GUI test for notable traits element position

22 months agoAuto merge of #101901 - lcnr:early-binder-type-foldable, r=compiler-errors
bors [Mon, 19 Sep 2022 10:35:09 +0000 (10:35 +0000)]
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`

22 months agoAuto merge of #13257 - rust-lang:revert-13147-fix/dyn-ty-inherent-methods, r=lnicola
bors [Mon, 19 Sep 2022 09:46:21 +0000 (09:46 +0000)]
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

22 months agoTry to fix crash introduced in #13147
Laurențiu Nicola [Mon, 19 Sep 2022 09:45:38 +0000 (12:45 +0300)]
Try to fix crash introduced in #13147

22 months agoextend polymorphization hack comment.
lcnr [Mon, 19 Sep 2022 09:44:29 +0000 (11:44 +0200)]
extend polymorphization hack comment.

22 months agoremove the `Subst` trait, always use `EarlyBinder`
lcnr [Fri, 16 Sep 2022 13:31:10 +0000 (15:31 +0200)]
remove the `Subst` trait, always use `EarlyBinder`

22 months agodo not implement type traversal for `EarlyBinder`
lcnr [Fri, 16 Sep 2022 13:09:38 +0000 (15:09 +0200)]
do not implement type traversal for `EarlyBinder`

22 months agoAuto merge of #101629 - compiler-errors:issue-101623, r=sanxiyn
bors [Mon, 19 Sep 2022 07:41:54 +0000 (07:41 +0000)]
Auto merge of #101629 - compiler-errors:issue-101623, r=sanxiyn

Be careful about `expr_ty_adjusted` when noting block tail type

Fixes #101623

22 months agonote on deterministic 'fake' API implementations
Ralf Jung [Sun, 18 Sep 2022 12:26:22 +0000 (14:26 +0200)]
note on deterministic 'fake' API implementations

22 months agoAuto merge of #101924 - jackh726:revert-static-hrtb-error, r=compiler-errors
bors [Mon, 19 Sep 2022 04:56:14 +0000 (04:56 +0000)]
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.

22 months agorustdoc: remove unused CSS `td.summary-column`
Michael Howell [Mon, 19 Sep 2022 03:03:17 +0000 (20:03 -0700)]
rustdoc: remove unused CSS `td.summary-column`

It was added in 2a1bad70dd9bc99d8db54964108b42da8f4e9fbd to go with this
module summary function:

https://github.com/rust-lang/rust/blob/2a1bad70dd9bc99d8db54964108b42da8f4e9fbd/src/librustdoc/html/format.rs#L767-L780

The corresponding HTML was removed in
0a46933c4d81573e78ce16cd215ba155a3114fce.

22 months agoTry to clarify what's new in 1.64.0 ffi types
Josh Stone [Mon, 19 Sep 2022 02:24:57 +0000 (19:24 -0700)]
Try to clarify what's new in 1.64.0 ffi types

22 months agoAuto merge of #101799 - LukeMathWalker:distribute-json-doc, r=jyn514
bors [Mon, 19 Sep 2022 02:13:54 +0000 (02:13 +0000)]
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

22 months agoUse LLVM C-API to build atomic cmpxchg and fence
Josh Stone [Sun, 18 Sep 2022 22:49:49 +0000 (15:49 -0700)]
Use LLVM C-API to build atomic cmpxchg and fence

22 months agouse partition_point instead of binary_search when looking up source lines
The 8472 [Sun, 18 Sep 2022 22:25:44 +0000 (00:25 +0200)]
use partition_point instead of binary_search when looking up source lines

In local benchmarks this results in 0.4% fewer cycles in a critical sequential
section when compiling libcore.

22 months agoAdd another example for `uN::carrying_mul`
Scott McMurray [Sun, 18 Sep 2022 19:55:38 +0000 (12:55 -0700)]
Add another example for `uN::carrying_mul`

The prose talked about doing this, so might as well add a simple code example of it too.

22 months agointerpret: expose generate_stacktrace without full InterpCx
Ralf Jung [Sun, 18 Sep 2022 17:08:14 +0000 (19:08 +0200)]
interpret: expose generate_stacktrace without full InterpCx

22 months agomake projection bounds with const bounds satisfy const
Deadbeef [Sun, 18 Sep 2022 17:38:18 +0000 (17:38 +0000)]
make projection bounds with const bounds satisfy const

22 months agoAuto merge of #13253 - Veykril:simplify, r=Veykril
bors [Sun, 18 Sep 2022 17:52:21 +0000 (17:52 +0000)]
Auto merge of #13253 - Veykril:simplify, r=Veykril

Simplify

22 months agoSimplify
Lukas Wirth [Sun, 18 Sep 2022 17:44:38 +0000 (19:44 +0200)]
Simplify

22 months agoAuto merge of #13058 - dpaoliello:extraenv, r=Veykril
bors [Sun, 18 Sep 2022 17:43:46 +0000 (17:43 +0000)]
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).

22 months agoremove ice fix
Pietro Albini [Sun, 18 Sep 2022 14:11:28 +0000 (16:11 +0200)]
remove ice fix

22 months agomake the styling of the cargo section similar to the rest
Pietro Albini [Sun, 18 Sep 2022 14:09:11 +0000 (16:09 +0200)]
make the styling of the cargo section similar to the rest

22 months agoremove diagnostic changes
Pietro Albini [Sun, 18 Sep 2022 14:06:03 +0000 (16:06 +0200)]
remove diagnostic changes

22 months agoremove items that are already mentioned in the compatibility notes
Pietro Albini [Sun, 18 Sep 2022 14:05:27 +0000 (16:05 +0200)]
remove items that are already mentioned in the compatibility notes

22 months agoimprove the wording for some release notes items
Pietro Albini [Sun, 18 Sep 2022 14:04:07 +0000 (16:04 +0200)]
improve the wording for some release notes items

22 months agoAuto merge of #101332 - sashashura:patch-1, r=pietroalbini
bors [Sun, 18 Sep 2022 14:10:57 +0000 (14:10 +0000)]
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.

22 months agoclarify that linting is not a semantic change
Ralf Jung [Sun, 18 Sep 2022 11:57:01 +0000 (13:57 +0200)]
clarify that linting is not a semantic change

22 months agoAuto merge of #2546 - RalfJung:comments, r=RalfJung
bors [Sun, 18 Sep 2022 12:07:56 +0000 (12:07 +0000)]
Auto merge of #2546 - RalfJung:comments, r=RalfJung

add/fix some comments

22 months agoadd/fix some comments
Ralf Jung [Sun, 18 Sep 2022 11:59:04 +0000 (13:59 +0200)]
add/fix some comments

22 months agoAuto merge of #101955 - jam1garner:fix-proc-macro-typo, r=petrochenkov
bors [Sun, 18 Sep 2022 11:42:13 +0000 (11:42 +0000)]
Auto merge of #101955 - jam1garner:fix-proc-macro-typo, r=petrochenkov

Fix typo in proc_macro Span::eq documentation

22 months agoAuto merge of #101963 - scottmcm:from-ptr-range-optimization, r=Mark-Simulacrum
bors [Sun, 18 Sep 2022 08:44:27 +0000 (08:44 +0000)]
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.

22 months agoUpdate cargo
Weihang Lo [Fri, 16 Sep 2022 17:24:45 +0000 (18:24 +0100)]
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)

22 months agoAdd unit test for identifier Unicode emoji diagnostics
Charles Lew [Sat, 17 Sep 2022 08:04:02 +0000 (16:04 +0800)]
Add unit test for identifier Unicode emoji diagnostics

22 months agoAuto merge of #101816 - raldone01:cleanup/select_nth_unstable, r=Mark-Simulacrum
bors [Sun, 18 Sep 2022 06:03:22 +0000 (06:03 +0000)]
Auto merge of #101816 - raldone01:cleanup/select_nth_unstable, r=Mark-Simulacrum

Cleanup slice sort related closures in core and alloc

22 months agoadd miri test via const fn
Ding Xiang Fei [Sun, 18 Sep 2022 04:18:34 +0000 (12:18 +0800)]
add miri test via const fn

22 months agoadd mir-opt test
Ding Xiang Fei [Fri, 16 Sep 2022 11:54:41 +0000 (19:54 +0800)]
add mir-opt test

22 months agoavoid duplicating StorageLive in let-else
Ding Xiang Fei [Fri, 16 Sep 2022 11:02:45 +0000 (19:02 +0800)]
avoid duplicating StorageLive in let-else

22 months agoAuto merge of #101960 - matthiaskrgr:rollup-1l5v7ip, r=matthiaskrgr
bors [Sun, 18 Sep 2022 03:40:01 +0000 (03:40 +0000)]
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

22 months agoAdd a codegen test for slice::from_ptr_range
Scott McMurray [Sun, 18 Sep 2022 01:54:00 +0000 (18:54 -0700)]
Add a codegen test for slice::from_ptr_range

22 months agoPrint out the proper crate path
mejrs [Sun, 18 Sep 2022 00:59:32 +0000 (02:59 +0200)]
Print out the proper crate path

22 months agoRollup merge of #101954 - notriddle:notriddle/location-a-first-of-type, r=GuillaumeGomez
Matthias Krüger [Sun, 18 Sep 2022 00:55:31 +0000 (02:55 +0200)]
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 9e82fc7ef9b6c8a344dd27583990b02a661af78c. At that time, the location header was rendered as a paragraph with the full path:

https://github.com/rust-lang/rust/blob/9e82fc7ef9b6c8a344dd27583990b02a661af78c/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:

https://github.com/rust-lang/rust/blob/98ad6a5519651af36e246c0335c964dd52c554ba/src/librustdoc/html/render/mod.rs#L1797

22 months agoRollup merge of #101953 - GuillaumeGomez:fix-error-code-tooltip, r=notriddle
Matthias Krüger [Sun, 18 Sep 2022 00:55:30 +0000 (02:55 +0200)]
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`

22 months agoRollup merge of #101923 - jsha:aux-pages-no-rustdoc-css, r=Mark-Simulacrum
Matthias Krüger [Sun, 18 Sep 2022 00:55:30 +0000 (02:55 +0200)]
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

22 months agoRollup merge of #101912 - crlf0710:compiler_update_unicode_15, r=Manishearth
Matthias Krüger [Sun, 18 Sep 2022 00:55:29 +0000 (02:55 +0200)]
Rollup merge of #101912 - crlf0710:compiler_update_unicode_15, r=Manishearth

Update `unicode-rs` crates to Unicode 15

r? `@Manishearth`

22 months agoRollup merge of #101151 - jethrogb:jb/sgx-platform, r=JohnTitor
Matthias Krüger [Sun, 18 Sep 2022 00:55:29 +0000 (02:55 +0200)]
Rollup merge of #101151 - jethrogb:jb/sgx-platform, r=JohnTitor

Document x86_64-fortanix-unknown-sgx platform

cc `@raoulstrackx` `@mzohreva`

22 months agoAuto merge of #101862 - cjgillot:lint-regression, r=oli-obk
bors [Sun, 18 Sep 2022 00:46:14 +0000 (00:46 +0000)]
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

22 months agoAddress feedback
mejrs [Mon, 12 Sep 2022 20:17:06 +0000 (22:17 +0200)]
Address feedback

22 months agoNote if mismatched types have a similar name
mejrs [Sat, 10 Sep 2022 22:46:53 +0000 (00:46 +0200)]
Note if mismatched types have a similar name

22 months agoimprove error message for when a query isn't supported
hanar3 [Sat, 17 Sep 2022 23:25:37 +0000 (20:25 -0300)]
improve error message for when a query isn't supported

22 months agoFix typo in proc_macro Span::eq
jam1garner [Sat, 17 Sep 2022 23:15:30 +0000 (19:15 -0400)]
Fix typo in proc_macro Span::eq

22 months agorustdoc: remove redundant `.location a { font-weight: 500 }`
Michael Howell [Sat, 17 Sep 2022 22:30:23 +0000 (15:30 -0700)]
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
9e82fc7ef9b6c8a344dd27583990b02a661af78c. At that time, the location header
was rendered as a paragraph with the full path:

https://github.com/rust-lang/rust/blob/9e82fc7ef9b6c8a344dd27583990b02a661af78c/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:

https://github.com/rust-lang/rust/blob/98ad6a5519651af36e246c0335c964dd52c554ba/src/librustdoc/html/render/mod.rs#L1797

22 months agoFix tooltip display for error codes
Guillaume Gomez [Sat, 17 Sep 2022 22:32:28 +0000 (00:32 +0200)]
Fix tooltip display for error codes

22 months agoAuto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgr
bors [Sat, 17 Sep 2022 22:04:28 +0000 (22:04 +0000)]
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

22 months agoRollup merge of #101943 - notriddle:notriddle/non-exhaustive, r=GuillaumeGomez
Matthias Krüger [Sat, 17 Sep 2022 21:30:51 +0000 (23:30 +0200)]
Rollup merge of #101943 - notriddle:notriddle/non-exhaustive, r=GuillaumeGomez

rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`

This selector was added in 959a13d53e27ca92b59798e6c6737f8249d59a2e to target a `<div class="non-exhaustive">`. With 4edcf6147912e7e4c1f13208d830c3c25e544a8c, the non-exhaustive indicator was changed to a `<details>`, and a separate selector targetting `details.non-exhaustive` was added for it, but the old selector was never removed.

22 months agoRollup merge of #101942 - Mark-Simulacrum:fix-perf, r=jyn514
Matthias Krüger [Sat, 17 Sep 2022 21:30:50 +0000 (23:30 +0200)]
Rollup merge of #101942 - Mark-Simulacrum:fix-perf, r=jyn514

Revert "Copy stage0 binaries into stage0-sysroot"

This reverts PR #101711.

The PR broke the rustc/bootstrap benchmark on rustc-perf, I believe due to the assumption that the stage0 directory exists. Fixing that by just skipping this logic might be reasonable, but I think there's a larger discussion to be had around the right behavior when we don't have a single bin/ directory (when rustc= and cargo= are specified in config.toml). I think it's potentially reasonable to put those binaries (cargo, rustc, rustfmt?) into the bin directory, but for now just want to get us back to a healthy state.

r? `@jyn514` (but would appreciate review from others as this is just a direct revert).

22 months agoRollup merge of #101835 - jyn514:fix-vendoring, r=Mark-Simulacrum
Matthias Krüger [Sat, 17 Sep 2022 21:30:50 +0000 (23:30 +0200)]
Rollup merge of #101835 - jyn514:fix-vendoring, r=Mark-Simulacrum

Allow using vendoring when running bootstrap from outside the source root

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

22 months agoRollup merge of #101826 - andrewpollack:fix-joined-without-noop, r=Mark-Simulacrum
Matthias Krüger [Sat, 17 Sep 2022 21:30:50 +0000 (23:30 +0200)]
Rollup merge of #101826 - andrewpollack:fix-joined-without-noop, r=Mark-Simulacrum

Enforce "joined()" and "joined_with_noop()" test

Several similar tests come in the form of `joined()` and `joined_with_noop()`. In this test, the `joined()` has two calls to a noop, making it functionally equivalent to `joined_with_noop()`. This doesn't seem intended, and this PR removes those calls and changes the memory size to reflect the change

For my education, why do tests with `noop()` calls sometimes have `noop()` contributing to the size, while others do not? E.g. https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L115 and https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L116 have no size difference, whereas https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L113 and https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L114 have a size difference. Thank you!

22 months agoRollup merge of #101821 - thomcc:unicode-15, r=Manishearth
Matthias Krüger [Sat, 17 Sep 2022 21:30:49 +0000 (23:30 +0200)]
Rollup merge of #101821 - thomcc:unicode-15, r=Manishearth

Bump Unicode to version 15.0.0, regenerate tables

r? `@Mark-Simulacrum`

22 months agoRollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov
Matthias Krüger [Sat, 17 Sep 2022 21:30:49 +0000 (23:30 +0200)]
Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov

change AccessLevels representation

Part of RFC (https://github.com/rust-lang/rust/issues/48054). This patch implements effective visibility table with basic methods and change AccessLevels table representation according to it.

r? ``@petrochenkov``

22 months agoRollup merge of #101093 - joshtriplett:relnotes-1.64, r=Mark-Simulacrum
Matthias Krüger [Sat, 17 Sep 2022 21:30:48 +0000 (23:30 +0200)]
Rollup merge of #101093 - joshtriplett:relnotes-1.64, r=Mark-Simulacrum

Initial version of 1.64 release notes

Needs further expansion on some points, with text that will likely end up in
the blog post as well.

Also adds the release notes from 1.62.1 and 1.63, which weren't present on the
branch.

22 months agoAdd a new component, `rust-json-docs`, to distribute the JSON-formatted documentation...
Luca Palmieri [Wed, 14 Sep 2022 11:49:05 +0000 (13:49 +0200)]
Add a new component, `rust-json-docs`, to distribute the JSON-formatted documentation for std crates in nightly toolchains.
We also add a new flag to `x doc`, `--json`, to render the JSON-formatted version alongside the HTML-formatted one.

22 months agoAuto merge of #101946 - matthiaskrgr:rollup-jqkhsku, r=matthiaskrgr
bors [Sat, 17 Sep 2022 19:33:52 +0000 (19:33 +0000)]
Auto merge of #101946 - matthiaskrgr:rollup-jqkhsku, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #101672 (array docs - advertise how to get array from slice)
 - #101781 (Extend list of targets that support dyanmic linking for llvm tools)
 - #101783 (Improve handing of env vars during bootstrap process)
 - #101801 (add note for `layout_of` when query depth overflows)
 - #101824 (rustdoc: add test cases for turning ``[Vec<T>]`` into ``[`Vec<T>`]``)
 - #101861 (Update stdarch)
 - #101873 (Allow building `rust-analyzer-proc-macro-srv` as a standalone tool)
 - #101918 (rustdoc: clean up CSS for All Items and All Crates lists)
 - #101934 (Continue migration of CSS themes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRelease notes update
Mark Rousskov [Sat, 17 Sep 2022 17:45:51 +0000 (13:45 -0400)]
Release notes update

Co-authored-by: Tyler Mandry <tmandry@gmail.com>
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
22 months agoRollup merge of #101934 - GuillaumeGomez:theme-links-cleanup, r=notriddle
Matthias Krüger [Sat, 17 Sep 2022 17:27:09 +0000 (19:27 +0200)]
Rollup merge of #101934 - GuillaumeGomez:theme-links-cleanup, r=notriddle

Continue migration of CSS themes

Now that https://github.com/rust-lang/rust/pull/101898 has been merged, we can move forward.

This PR moves more CSS theme rules as CSS variables. I also added a GUI test to prevent regressions.

Part of https://github.com/rust-lang/rust/pull/98460.

r? ``@notriddle``

22 months agoRollup merge of #101918 - notriddle:notriddle/all, r=GuillaumeGomez
Matthias Krüger [Sat, 17 Sep 2022 17:27:08 +0000 (19:27 +0200)]
Rollup merge of #101918 - notriddle:notriddle/all, r=GuillaumeGomez

rustdoc: clean up CSS for All Items and All Crates lists

This reduces the amount of CSS, and makes these two pages more consistent (which, necessarily, means changing them a bit).

# Before

![image](https://user-images.githubusercontent.com/1593513/190735035-c66b2664-3783-483c-9bc6-89f80e4a5490.png)

![image](https://user-images.githubusercontent.com/1593513/190735134-1d5df81d-58c5-4c86-b066-6dd3031ffc2e.png)

# After

![image](https://user-images.githubusercontent.com/1593513/190735261-fc3878bb-0cab-4c4e-a6da-b5f7abd06588.png)

![image](https://user-images.githubusercontent.com/1593513/190735389-935a7836-f2c0-4349-a7d0-7fe5378f6b9a.png)

22 months agoRollup merge of #101873 - WaffleLapkin:x-build-proc-macro-srv, r=jyn514
Matthias Krüger [Sat, 17 Sep 2022 17:27:08 +0000 (19:27 +0200)]
Rollup merge of #101873 - WaffleLapkin:x-build-proc-macro-srv, r=jyn514

Allow building `rust-analyzer-proc-macro-srv` as a standalone tool

This PR allows building `rust-analyzer-proc-macro-srv` as a standalone tool via `x b proc-macro-srv-cli` (I thought that `x b rust-analyzer-proc-macro-srv` should work, but it doesn't for some reason...). Also this PR adds a copy of `rust-analyzer-proc-macro-srv` binary to `build/{triple}/{stage}/libexec/` when building `rust-analyzer-proc-macro-srv`, so that r-a can pick it up.

This is useful to make r-a (and I assume Intellij IDEA) to expand macros when using a custom, build from source toolchain.

r? ``@jyn514``
[_zulip thread_](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/How.20to.20fix.20.60UnsupportedABI.60.20for.20custom.20toolchains.3F/near/299040175)

22 months agoRollup merge of #101861 - wesleywiser:update_stdarch, r=Amanieu
Matthias Krüger [Sat, 17 Sep 2022 17:27:07 +0000 (19:27 +0200)]
Rollup merge of #101861 - wesleywiser:update_stdarch, r=Amanieu

Update stdarch

This pulls in the following changes:

- [Use simd_bitmask intrinsic in a couple of places](https://github.com/rust-lang/stdarch/commit/9f0928782b051edb6add78e9310472abface1e5c)
- [Remove simd_shuffle<n> usage in favor of simd_shuffle](https://github.com/rust-lang/stdarch/commit/3fd17e46079dbb5b99888dbcfdd232f2c023dff5)
- [Remove late specifiers in __cpuid_count](https://github.com/rust-lang/stdarch/commit/f1db941633e6e12bf62093cf0458bcbd7031c663)
  - Helps with #101346
- [Use mov and xchg instead of movl(q) and xchgl(q)](https://github.com/rust-lang/stdarch/commit/3049a31937e4f7353e1dea2f6dc558b02451bb13)
- [Bump cfg-if dependency to 1.0](https://github.com/rust-lang/stdarch/commit/f305cc83e7036f250a2a437021552526d1398cb4)
- [Fix documentation of __m256bh and __m512bh structs](https://github.com/rust-lang/stdarch/commit/699c093a42283c07e9763b4c19439a900ae2d321)

r? ``@Amanieu``

22 months agoRollup merge of #101824 - notriddle:notriddle/html-as-generics-intra-doc-links, r...
Matthias Krüger [Sat, 17 Sep 2022 17:27:07 +0000 (19:27 +0200)]
Rollup merge of #101824 - notriddle:notriddle/html-as-generics-intra-doc-links, r=Mark-Simulacrum

rustdoc: add test cases for turning ``[Vec<T>]`` into ``[`Vec<T>`]``

22 months agoRollup merge of #101801 - SparrowLii:query_depth_note, r=estebank
Matthias Krüger [Sat, 17 Sep 2022 17:27:06 +0000 (19:27 +0200)]
Rollup merge of #101801 - SparrowLii:query_depth_note, r=estebank

add note for `layout_of` when query depth overflows

Fixes #101747
Added `try_find_layout_root` function to add a note for `layout_of` when query depth overflows. This would make the error in #101747 look like this:
```
error: queries overflow the depth limit!
   |
note: Query depth increased by 66 when computing layout of `core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<core::option::Option<alloc::boxed::Box<alloc::string::String>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`!
  --> D:\rust-backup\parallel_rust\query_depth.rs:40:1
   |
40 | fn main() {
   | ^^^^^^^^^

error: aborting due to previous error
```

cc ``@semicoleon``

22 months agoRollup merge of #101783 - chriswailes:env-vars, r=jyn514
Matthias Krüger [Sat, 17 Sep 2022 17:27:06 +0000 (19:27 +0200)]
Rollup merge of #101783 - chriswailes:env-vars, r=jyn514

Improve handing of env vars during bootstrap process

This CL modifies the handing of env vars during the bootstrap process in two ways:
1. Replaces '-' characters with '_' characters in target names to increase compatibility with different shells
2. Passes Stage0 snapshot compiler related env vars to early invocations of Cargo

22 months agoRollup merge of #101781 - chriswailes:dynamic-llvm-on-musl, r=jyn514
Matthias Krüger [Sat, 17 Sep 2022 17:27:05 +0000 (19:27 +0200)]
Rollup merge of #101781 - chriswailes:dynamic-llvm-on-musl, r=jyn514

Extend list of targets that support dyanmic linking for llvm tools

This commit adds `linux-musl` to the list of targets that support dynamic linking for the LLVM tools.

22 months agoRollup merge of #101672 - idigdoug:array_try_into, r=Mark-Simulacrum
Matthias Krüger [Sat, 17 Sep 2022 17:27:05 +0000 (19:27 +0200)]
Rollup merge of #101672 - idigdoug:array_try_into, r=Mark-Simulacrum

array docs - advertise how to get array from slice

On my first Rust project, I spent more time than I care to admit figuring out how to efficiently get an array from a slice. Update the array documentation to explain this a bit more clearly.

(As a side note, it's a bit unfortunate that get-array-from-slice is only available via trait since that means it can't be used from const functions yet.)

22 months agoAuto merge of #101890 - rust-lang:pa-bump-version, r=pietroalbini
bors [Sat, 17 Sep 2022 16:32:58 +0000 (16:32 +0000)]
Auto merge of #101890 - rust-lang:pa-bump-version, r=pietroalbini

Bump version to 1.66.0

Part of the release process.

22 months agorustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`
Michael Howell [Sat, 17 Sep 2022 16:00:20 +0000 (09:00 -0700)]
rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`

This selector was added in 959a13d53e27ca92b59798e6c6737f8249d59a2e to
target a `<div class="non-exhaustive">`. With
4edcf6147912e7e4c1f13208d830c3c25e544a8c, the non-exhaustive indicator was
changed to a `<details>`, and a separate selector targetting
`details.non-exhaustive` was added for it, but the old selector was never
removed.

22 months agoUse Predicate ConstraintCategory when normalizing
Jack Huey [Wed, 31 Aug 2022 01:50:22 +0000 (21:50 -0400)]
Use Predicate ConstraintCategory when normalizing

22 months agoAdd back in normalize call
Jack Huey [Fri, 16 Sep 2022 21:52:04 +0000 (17:52 -0400)]
Add back in normalize call

22 months agoRevert "fix #101691: copy stage0 binaries into stage0-sysroot"
Mark Rousskov [Sat, 17 Sep 2022 15:03:40 +0000 (11:03 -0400)]
Revert "fix #101691: copy stage0 binaries into stage0-sysroot"

This reverts commit 32f8eb2fee4d6781a79052b560abd10e12ebb34f.

22 months agoAuto merge of #101857 - lcnr:make-dyn-again, r=jackh726
bors [Sat, 17 Sep 2022 13:37:48 +0000 (13:37 +0000)]
Auto merge of #101857 - lcnr:make-dyn-again, r=jackh726

change `FnMutDelegate` to trait objects

cc #100016 as mentioned in the last t-compiler meeting

r? `@jackh726`

22 months agobless tests again
Deadbeef [Sat, 17 Sep 2022 13:31:04 +0000 (13:31 +0000)]
bless tests again

22 months agoAuto merge of #13239 - mdx97:mathew/fix-add-reference-for-macros, r=Veykril
bors [Sat, 17 Sep 2022 11:23:05 +0000 (11:23 +0000)]
Auto merge of #13239 - mdx97:mathew/fix-add-reference-for-macros, r=Veykril

Fix add reference action on macros.

Before we were using the range of the corresponding expression node in the macro expanded file, which is obviously incorrect as we are setting the text in the original source.

For some reason, the test I added is failing and I haven't found a way to fix it. Does anyone know why `check_fix` wouldn't work with macros? Getting this error:

```text
thread 'handlers::type_mismatch::tests::test_add_reference_to_macro_call' panicked at 'no diagnostics', crates/ide-diagnostics/src/handlers/type_mismatch.rs:317:9
```

closes #13219

22 months agoAuto merge of #101938 - Dylan-DPC:rollup-6vlohhs, r=Dylan-DPC
bors [Sat, 17 Sep 2022 10:56:42 +0000 (10:56 +0000)]
Auto merge of #101938 - Dylan-DPC:rollup-6vlohhs, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #93628 (Stabilize `let else`)
 - #98441 (Implement simd_as for pointers)
 - #101790 (Do not suggest a placeholder to const and static without a type)
 - #101807 (Disallow defaults on type GATs)
 - #101915 (doc: fix redirected link in `/index.html`)
 - #101931 (doc: Fix a typo in `Rc::make_mut` docstring)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #101931 - msakuta:master, r=thomcc
Dylan DPC [Sat, 17 Sep 2022 10:01:09 +0000 (15:31 +0530)]
Rollup merge of #101931 - msakuta:master, r=thomcc

doc: Fix a typo in `Rc::make_mut` docstring

A very minor typo fix.

22 months agoRollup merge of #101915 - notriddle:notriddle/redirect, r=GuillaumeGomez
Dylan DPC [Sat, 17 Sep 2022 10:01:09 +0000 (15:31 +0530)]
Rollup merge of #101915 - notriddle:notriddle/redirect, r=GuillaumeGomez

doc: fix redirected link in `/index.html`

Fallout from #101166

22 months agoRollup merge of #101807 - jackh726:no-gat-defaults, r=lcnr
Dylan DPC [Sat, 17 Sep 2022 10:01:08 +0000 (15:31 +0530)]
Rollup merge of #101807 - jackh726:no-gat-defaults, r=lcnr

Disallow defaults on type GATs

Fixes #99205

22 months agoRollup merge of #101790 - TaKO8Ki:do-not-suggest-placeholder-to-const-and-static...
Dylan DPC [Sat, 17 Sep 2022 10:01:08 +0000 (15:31 +0530)]
Rollup merge of #101790 - TaKO8Ki:do-not-suggest-placeholder-to-const-and-static-without-type, r=compiler-errors

Do not suggest a placeholder to const and static without a type

Fixes #101755

22 months agoRollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
Dylan DPC [Sat, 17 Sep 2022 10:01:07 +0000 (15:31 +0530)]
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk

Implement simd_as for pointers

Expands `simd_as` (and `simd_cast`) to handle pointer-to-pointer, pointer-to-integer, and integer-to-pointer conversions.

cc ``@programmerjake`` ``@thomcc``