Commit Graph

221371 Commits

Author SHA1 Message Date
bors
540a50df0f Auto merge of #109941 - compiler-errors:rollup-5lsst2u, r=compiler-errors
Rollup of 9 pull requests

Successful merges:

 - #109723 (Pull some tuple variant fields out into their own struct)
 - #109838 (Fix `non_exhaustive_omitted_patterns` lint span)
 - #109901 (Enforce VarDebugInfo::Place in MIR validation.)
 - #109913 (Doc-comment  `IndexVec::from_elem` and use it in a few more places)
 - #109914 (Emit feature error for parenthesized generics in associated type bounds)
 - #109919 (rustdoc: escape GAT args in more cases)
 - #109937 (Don't collect return-position impl traits for documentation)
 - #109938 (Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible)
 - #109940 (Add regression test for #93911)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-04 16:39:26 +00:00
Michael Goulet
678d7c505d
Rollup merge of #109940 - JohnTitor:issue-93911, r=compiler-errors
Add regression test for #93911

r? `@compiler-errors`
Closes #93911
2023-04-04 09:27:48 -07:00
Michael Goulet
b0483e8004
Rollup merge of #109938 - oli-obk:try_norm, r=compiler-errors
Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible

fixes #109743

This hack didn't need to live in the mir interpreter. For const-prop-lint it is entirely correct to avoid doing any const prop if normalization fails at this stage. Most likely we couldn't const propagate anything anyway, and if revealing was needed (so opaque types were involved), we wouldn't want to be too smart and leak the hidden type anyway.
2023-04-04 09:27:47 -07:00
Michael Goulet
d984671246
Rollup merge of #109937 - compiler-errors:rustdoc-rpit-cant-be-documented, r=GuillaumeGomez
Don't collect return-position impl traits for documentation

#104889 modified the rustdoc ast collection step to use a HIR visitor, which more thoroughly walks the HIR tree. that means that we're going to encounter inner items (incl return-position impl traits and async fn opaque futures) that are not possible to document.

FIxes (but does not close due to being a beta regression) #109931

r? `@GuillaumeGomez`
2023-04-04 09:27:47 -07:00
Michael Goulet
72e535ea99
Rollup merge of #109919 - fmease:rustdoc-fix-issue-109488, r=notriddle
rustdoc: escape GAT args in more cases

Fixes #109488.

Previously we printed the *un*escaped form of GAT arguments not only when `f.alternate()` was true but *also* when we failed to compute the URL of the trait associated with the type projection, i.e. when `href(…)` returned an `Err(_)`.

In this PR the argument printing logic is entirely separate from the link resolution code above as it should be.
Further, we now only try to compute the URL if the HTML format was requested with `!f.alternate()`. Before, we would sometimes compute the `href` only to throw it away later.
2023-04-04 09:27:46 -07:00
Michael Goulet
a5c395ed94
Rollup merge of #109914 - compiler-errors:rtn-bad-parens, r=oli-obk
Emit feature error for parenthesized generics in associated type bounds

We don't actually do AST->HIR lowering with some `-Zunpretty` flags, so it's not correct to just delay a bug instead of emitting a feature error.

Some diagnostics regressed because of the new errors, but oh well. 🤷

Fixes #109898
2023-04-04 09:27:46 -07:00
Michael Goulet
5485a54e19
Rollup merge of #109913 - scottmcm:index-slice, r=WaffleLapkin
Doc-comment  `IndexVec::from_elem` and use it in a few more places

Since this PR is a reply to https://github.com/rust-lang/rust/pull/109819#discussion_r1156128164,
r? ``@WaffleLapkin``
2023-04-04 09:27:45 -07:00
Michael Goulet
ed17b599df
Rollup merge of #109901 - cjgillot:validate-debuginfo, r=b-naber
Enforce VarDebugInfo::Place in MIR validation.
2023-04-04 09:27:44 -07:00
Michael Goulet
4d32de6fcb
Rollup merge of #109838 - clubby789:non-exhaustive-span, r=Nilstrieb
Fix `non_exhaustive_omitted_patterns` lint span

Fixes #109837

`DUMMY_SP` was being passed as the span in many cases where we have a span available to use. This meant that the location of the violating pattern wasn't shown, or the list of un-covered variants

r? `@Nilstrieb`
2023-04-04 09:27:44 -07:00
Michael Goulet
ec22850c2c
Rollup merge of #109723 - oli-obk:ast_refactor, r=Nilstrieb
Pull some tuple variant fields out into their own struct

This is groundwork for adding more fields to those new structs, but I believe the change to be useful on its own.

r? `@Nilstrieb` but feel free to reroll for `compiler`
2023-04-04 09:27:43 -07:00
Yuki Okushi
1a8612e723
Add regression test for #93911
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-04-05 01:01:45 +09:00
Oli Scherer
373807a95c Rename ast::Static to ast::StaticItem to match ast::ConstItem 2023-04-04 15:34:40 +00:00
Guillaume Gomez
8aef0c7926 Add GUI test for scrollbar position on source code page 2023-04-04 16:35:53 +02:00
Guillaume Gomez
6f9b988578 Move scrollbar on the <main> element rather than only on the code block to improve UX 2023-04-04 16:35:36 +02:00
Michael Goulet
72ef85d83e Don't collect return-position impl traits for documentation 2023-04-04 14:03:50 +00:00
Oli Scherer
4bebdd7104 box a bunch of large types 2023-04-04 13:58:50 +00:00
clubby789
ebde2ab363 Deny useing tool paths 2023-04-04 14:10:13 +01:00
jyn
92b7591371 Add a best guess at what line-directives-only means 2023-04-04 07:37:33 -04:00
bors
be8e5ba157 Auto merge of #109917 - compiler-errors:remove-relation-methods, r=oli-obk
Remove `intercrate` and `mark_ambiguous` from `TypeRelation`

Fixes #109863

Pulls this logic into `super_combine_tys`, which has access to `InferCtxt` and takes a `ObligationEmittingRelation` -- both of which simplify the logic here.

r? `@oli-obk` `@aliemjay`
2023-04-04 11:08:23 +00:00
Oli Scherer
b5d96d5ec5 Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible 2023-04-04 10:39:26 +00:00
Oli Scherer
ec74653652 Split out ast::ItemKind::Const into its own struct 2023-04-04 09:44:50 +00:00
Oli Scherer
e3828777a6 rust-analyzer guided tuple field to named field 2023-04-04 09:44:50 +00:00
Oli Scherer
b08a557f80 rust-analyzer guided enum variant structification 2023-04-04 09:44:45 +00:00
Oli Scherer
54214c8d8d Use a simpler atomic operation than the compare_exchange hammer 2023-04-04 09:01:44 +00:00
Oli Scherer
300901b705 Use new iteration helpers instead of manually rolling them 2023-04-04 09:01:44 +00:00
Oli Scherer
a1d20cf7a2 Another AppendOnlyVec 2023-04-04 09:01:44 +00:00
Oli Scherer
7edd1d8799 Replace another lock with an append-only vec 2023-04-04 09:01:44 +00:00
Oli Scherer
4699632637 Remove a lock in favor of an AppendOnlyVec 2023-04-04 09:01:44 +00:00
Oli Scherer
daee746771 Add a usize-indexed append-only-vec 2023-04-04 09:01:44 +00:00
Oli Scherer
c7a3a943f2 Replace a lock with an atomic 2023-04-04 09:01:44 +00:00
Oli Scherer
aad33198ff Remove a fishy Clone impl 2023-04-04 09:01:44 +00:00
bors
7c96e40da8 Auto merge of #109891 - the8472:llvm-16-fixes-79308, r=nikic
llvm 16 finally reconizes some additional vec in-place conversions as noops

closes #79308

r? `@nikic`
2023-04-04 08:54:33 +00:00
SparrowLii
8b21f9ee22 write threads info into log only when debugging 2023-04-04 15:31:37 +08:00
bors
35d06f9c74 Auto merge of #109599 - notriddle:notriddle/use-redundant-glob, r=petrochenkov
diagnostics: account for glob shadowing when linting redundant imports

Fixes #92904
2023-04-04 06:41:27 +00:00
bors
bd991d9953 Auto merge of #109888 - Mark-Simulacrum:balanced-compression, r=pietroalbini
Remove optimal xz settings from CI

This is a companion PR to rust-lang/promote-release#58, which moves the relevant optimal code to rust-lang/promote-release. As mentioned in the comments of that PR, this is expected to cut CI costs (and time, though predominantly felt on fast builders) and reduce wasted resources due to in-practice single-threaded compression not using the full 8+ vCPU builders we have available.

This probably shouldn't land before that PR + a simpleinfra change to enable the recompression of xz artifacts. But if it does land, it's just a matter of a few nightlies with slightly larger artifacts, so not a big deal.

r? `@pietroalbini`
2023-04-04 03:54:22 +00:00
Amanieu d'Antras
69e3f7a30d Disable has_thread_local on OpenHarmony
OpenHarmony uses emulated TLS, which doesn't link properly when using
thread-local variables across crate boundaries with `-C prefer-dynamic`.
This PR makes thread_local! use pthreads directly instead.
2023-04-04 02:42:42 +01:00
bors
eb48e9771a Auto merge of #109876 - jsha:uniquify-intra-doc, r=notriddle
rustdoc: make intra-doc link pass non-quadratic for repeated links

In the collect_intra_doc_links pass, links to a given item that occurred repeatedly were getting inserted into a `Vec<clean::ItemLink>` repeatedly. This led to n^2 behavior (where n = the number of pages generated), particularly for the intra-doc link on the `Into<U> for T where U: From<T>` blanket implementation, since that link appears on every single struct page.

Fixes #109851
2023-04-04 01:12:24 +00:00
Michael Goulet
1b5ac39908 dyn* is a valid const 2023-04-04 00:28:05 +00:00
León Orell Valerian Liehr
6567bc9a47
rustdoc: escape GAT args in more cases 2023-04-04 02:09:23 +02:00
Michael Goulet
a368316905 Remove intercrate and mark_ambiguous from Relation 2023-04-04 00:09:12 +00:00
bors
cf7ada217c Auto merge of #109911 - JohnTitor:rollup-7gjiqim, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #109783 (Update contributing links for rustc-dev-guide changes)
 - #109883 (Add links to <cell.rs>)
 - #109889 (Update book, rustc-dev-guide, rust-by-example)
 - #109896 (Never consider int and float vars for `FnPtr` candidates)
 - #109902 (Add async-await test for #107414)
 - #109903 (Add Chris Denton to `.mailmap`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-03 22:29:54 +00:00
Scott McMurray
5c3e5af2ed Doc-comment IndexVec::from_elem and use it in a few more places 2023-04-03 14:29:32 -07:00
Michael Goulet
ab0b9356e6 Emit feature error for parenthesized generics in associated type bounds 2023-04-03 21:20:48 +00:00
Yuki Okushi
b691507b73
Rollup merge of #109903 - ChrisDenton:map-me, r=compiler-errors
Add Chris Denton to `.mailmap`
2023-04-04 05:52:36 +09:00
Yuki Okushi
52dad9933b
Rollup merge of #109902 - Nilstrieb:107414test, r=compiler-errors
Add async-await test for #107414

fixes #107414

r? `@cjgillot`
2023-04-04 05:52:36 +09:00
Yuki Okushi
7d3207be97
Rollup merge of #109896 - Nilstrieb:integers-are-not-fn-ptrs-remember-this-dear-transmuter, r=compiler-errors
Never consider int and float vars for `FnPtr` candidates

This solves a regression where `0.0.cmp()` was ambiguous when a custom trait with a `cmp` method was in scope.

For integers it shouldn't be a problem in practice so I wasn't able to add a test.

I'm not sure whether there could be more issues hidden in the shadows as mentioned in the issue, but this should at least fix the problematic regression immediately.

fixes #109892

r? oli-obk
2023-04-04 05:52:35 +09:00
Yuki Okushi
4e25d20f95
Rollup merge of #109889 - ferrocene:pa-update-books, r=ehuss
Update book, rustc-dev-guide, rust-by-example

Changes from `rust-lang/book`:

* https://github.com/rust-lang/book/pull/3598

Changes from `rust-lang/rust-by-example`:

* https://github.com/rust-lang/rust-by-example/pull/1695
* https://github.com/rust-lang/rust-by-example/pull/1694
* https://github.com/rust-lang/rust-by-example/pull/1693
* https://github.com/rust-lang/rust-by-example/pull/1688
* https://github.com/rust-lang/rust-by-example/pull/1696

Changes from `rust-lang/rustc-dev-guide`:

* https://github.com/rust-lang/rustc-dev-guide/pull/1655
* https://github.com/rust-lang/rustc-dev-guide/pull/1657
* https://github.com/rust-lang/rustc-dev-guide/pull/1659
* d436bf134e...fca8af6c15

r? `@ehuss`
2023-04-04 05:52:35 +09:00
Yuki Okushi
ed5e2ddeed
Rollup merge of #109883 - skaunov:patch-1, r=thomcc
Add links to <cell.rs>

`UnsafeCell` page could benefit too from having links to these most popular structs in the module.
2023-04-04 05:52:34 +09:00
Yuki Okushi
bce7253178
Rollup merge of #109783 - jyn514:dev-guide-links, r=Mark-Simulacrum
Update contributing links for rustc-dev-guide changes

Companion PR to https://github.com/rust-lang/rustc-dev-guide/pull/1653.

- Remove unused reference link in CONTRIBUTING.md
- Change the contributing_url for triagebot to the getting started page
2023-04-04 05:52:34 +09:00
bors
48829ea74b Auto merge of #109771 - uweigand:s390x-miri-libffi, r=oli-obk
Increase libffi version to 3.2 to support s390x

libffi versions prior to 3.2 have no support for s390x, causing the Miri build to fail on our platform.
2023-04-03 19:53:24 +00:00