Commit Graph

206138 Commits

Author SHA1 Message Date
inquisitivecrystal
a0eb46788a Fix a typo in std's root docs 2022-09-23 01:45:43 -07:00
Miguel Ojeda
cb8a9c496f Add llvm-dis to the set of tools in ci-llvm
The LLVM disassembler is needed for the test introduced in
https://github.com/rust-lang/rust/pull/97550.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-23 10:19:59 +02:00
Florian Bartels
ccd19c7e9e Repair stderr test result to added line 2022-09-23 10:10:07 +02:00
Oli Scherer
7ed999b616 Also require other subtrees to always build successfully 2022-09-23 08:03:10 +00:00
Florian Bartels
0be3cc8234 ignore test cases when checking emscripten 2022-09-23 09:41:12 +02:00
bors
bc4d574ff2 Auto merge of #102150 - matthiaskrgr:rollup-6xmd8f3, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #102113 (OpTy: fix a method taking self rather than &self)
 - #102118 (rustdoc: clean up line numbers on code examples)
 - #102123 (Add note to clippy::non_expressive_names doc)
 - #102125 (rustdoc: remove no-op CSS `.content .item-info { position: relative }`)
 - #102127 (Use appropriate variable names)
 - #102128 (Const unification is already infallible, remove the error handling logic)
 - #102133 (Use valtrees for comparison)
 - #102135 (Improve some AllTypes fields name)
 - #102144 (Extend const_convert with const {FormResidual, Try} for ControlFlow.)
 - #102147 (rustdoc: remove no-op CSS `.location:empty { border: none }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-23 06:52:39 +00:00
Florian Bartels
10f3657936 Adapt test results 2022-09-23 08:19:58 +02:00
Florian Bartels
0b0027fd2e Restore ignore tag
This test case actually requires std::process.
2022-09-23 08:19:58 +02:00
Florian Bartels
7bfbaa3881 Detect panic strategy using rustc --print cfg
Instead of relying on a command line parameter, detect if a target
is able to unwind or not.
Ignore tests that require unwinding on targets that don't support it.
2022-09-23 08:19:58 +02:00
Scott McMurray
cbbcd9f52c rustfmt 2022-09-22 23:13:12 -07:00
Scott McMurray
44b4ce1d61 Make ZST checks in core/alloc more readable
There's a bunch of these checks because of special handing for ZSTs in various unsafe implementations of stuff.

This lets them be `T::IS_ZST` instead of `mem::size_of::<T>() == 0` every time, making them both more readable and more terse.

*Not* proposed for stabilization at this time.  Would be `pub(crate)` except `alloc` wants to use it too.

(And while it doesn't matter now, if we ever get something like 85836 making it a const can help codegen be simpler.)
2022-09-22 23:12:29 -07:00
Thom Chiovoloni
29efe8c789
Add #[inline] to trivial functions on core::sync::Exclusive 2022-09-22 22:15:27 -07:00
bors
77e7e88567 Auto merge of #100488 - khyperia:invalid-calling-convention-help-message, r=nagisa,jyn514
Improve the help message for an invalid calling convention

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

I mostly followed the suggestions of `@nagisa` in that issue, ~~however, I wasn't sure how to check stability for the suggestion of "Do not suggest CCs that cannot be used due to them being unstable and feature not being enabled", so I did not implement that point.~~

I haven't contributed to rustc much, please feel free to point out suggestions! For example, the `.map(|s| Symbol::intern(s)).collect::<Vec<_>>()` seems pretty gross performance-wise, but maybe that's OK in error reporting code.
2022-09-23 04:22:14 +00:00
Matthias Krüger
8e3b9bca65
Rollup merge of #102112 - cuviper:powerpc64-full-relro, r=eholk
Allow full relro on powerpc64-unknown-linux-gnu

This was previously limited to partial relro, citing issues on RHEL6,
but that's no longer a supported platform since #95026. We have long
been enabling full relro in RHEL7's own Rust builds for ppc64, without
trouble, so it should be fine to drop this workaround.
2022-09-23 04:29:20 +02:00
Matthias Krüger
3148b3dc16
Rollup merge of #102104 - Aaron1011:no-test-backtrace, r=Mark-Simulacrum
Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests

This allows the tests to pass even if the user has RUST_BACKTRACE set when running 'x.py'
2022-09-23 04:29:19 +02:00
Matthias Krüger
dac0f6e821
Rollup merge of #102095 - oli-obk:simplify, r=TaKO8Ki
Deduplicate two functions that would soon have been three

https://github.com/rust-lang/rust/pull/101900 would have added another copy of this for effects
2022-09-23 04:29:19 +02:00
Matthias Krüger
f4c492cb5d
Rollup merge of #102066 - notriddle:notriddle/headers-max-width, r=GuillaumeGomez
rustdoc: remove unnecessary `max-width` on headers

This code was added in 003b2bc1c6 to prevent these headers from overlapping `.out-of-band` side items. That stopped being a problem when 3f92ff34b5 switched rustdoc over to using `float`, rather than `position: absolute`, to implement this.
2022-09-23 04:29:18 +02:00
Matthias Krüger
adde928305
Rollup merge of #102042 - LukeMathWalker:add-rust-json-docs-to-rustup, r=Mark-Simulacrum
Distribute rust-docs-json via rustup.

I am not 100% sure on how to treat `rust-json-docs` in `target_host_combination`. I went along with a similar strategy to the one used for `rust-docs`, but looking for guidance there.
2022-09-23 04:29:17 +02:00
Matthias Krüger
695b708311
Rollup merge of #101815 - diegooliveira:master, r=davidtwco
Migrated the rustc_passes annotation without effect diagnostic infrastructure

Small change to move the validation for annotations to the new diagnostic infrastructure.
2022-09-23 04:29:16 +02:00
Matthias Krüger
c2d2535b84
Rollup merge of #101664 - mejrs:similarity, r=fee1-dead
Note if mismatched types have a similar name

If users get a type error between similarly named types, it will point out that these are actually different types, and where they were defined.
2022-09-23 04:29:16 +02:00
Matthias Krüger
5d7937de8c
Rollup merge of #100734 - ComputerDruid:afit_feature, r=compiler-errors
Split out async_fn_in_trait into a separate feature

PR #101224 added support for async fn in trait desuraging behind the `return_position_impl_trait_in_trait` feature.

Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
2022-09-23 04:29:15 +02:00
bors
9279c547c7 Auto merge of #101708 - compiler-errors:issue-101696, r=jackh726
Normalize closure signature after construction

Astconv can't normalize inputs or outputs with escaping bound vars ([see this](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/check/fn_ctxt/mod.rs.html#294)), so normalize them after we've wrapped them in a binder.

Fixes #101696
2022-09-23 01:21:25 +00:00
Michael Howell
51f335deca rustdoc: fix unit tests 2022-09-22 16:29:51 -07:00
Michael Howell
dedf6fcde4 rustdoc: clean up CSS/DOM for deprecation warnings 2022-09-22 14:54:38 -07:00
khyperia
9a206a78eb Improve the help message for an invalid calling convention 2022-09-22 22:18:30 +02:00
Michael Goulet
79c665b2a3 Calculate ProjectionTy::trait_def_id correctly 2022-09-22 19:49:18 +00:00
Matthias Krüger
dfeff64550
Rollup merge of #102147 - notriddle:notriddle/location-border-none, r=GuillaumeGomez
rustdoc: remove no-op CSS `.location:empty { border: none }`

This rule was added in 2bb2a2975f to remove a border placed around the location when it's empty. That rule was removed in 6a5f8b1aef, so this rule does nothing.
2022-09-22 21:34:56 +02:00
Matthias Krüger
23370637ef
Rollup merge of #102144 - chriss0612:const_convert_control_flow, r=scottmcm
Extend const_convert with const {FormResidual, Try} for ControlFlow.

Very small change so I just used the existing `const_convert` feature flag.  #88674
Newly const API:
```
impl<B, C> const ops::Try for ControlFlow<B, C>;
impl<B, C> const ops::FromResidual for ControlFlow<B, C>;
```

`@usbalbin` I hope it is ok that I added to your feature.
2022-09-22 21:34:55 +02:00
Matthias Krüger
a99e675a98
Rollup merge of #102135 - GuillaumeGomez:rename-alltypes-fields, r=notriddle
Improve some AllTypes fields name

r? `@notriddle`
2022-09-22 21:34:55 +02:00
Matthias Krüger
aa384834d7
Rollup merge of #102133 - b-naber:use-valtrees-in-fast-reject, r=lcnr
Use valtrees for comparison

r? `@lcnr`
2022-09-22 21:34:54 +02:00
Matthias Krüger
b93c9a7d37
Rollup merge of #102128 - oli-obk:const_unification, r=lcnr
Const unification is already infallible, remove the error handling logic

r? `@lcnr`

is this expected to be used in the future? Right now it is dead code.
2022-09-22 21:34:53 +02:00
Matthias Krüger
c5d223033b
Rollup merge of #102127 - TaKO8Ki:use-appropriate-variable-names, r=lcnr
Use appropriate variable names
2022-09-22 21:34:52 +02:00
Matthias Krüger
dee0c422e7
Rollup merge of #102125 - notriddle:notriddle/content-item-info, r=GuillaumeGomez
rustdoc: remove no-op CSS `.content .item-info { position: relative }`

This rule was added to help position the marker line in 110e7270ab, which was a `position: absolute` pseudo-element that relied on its parent to put it in the right spot. (it was changed from a line to an arrow in 1ffb9cf8d7, then a different arrow in ae3a53ff58).

The arrow was removed in 73d0f7c7b6, so the `relative` position is no longer necessary.
2022-09-22 21:34:52 +02:00
Matthias Krüger
86acea401a
Rollup merge of #102123 - schteve:clippy-note, r=Manishearth
Add note to clippy::non_expressive_names doc

Addresses confusion in rust-lang/rust-clippy#9514 by updating the lint docs.
2022-09-22 21:34:51 +02:00
Matthias Krüger
ecbc00fa9e
Rollup merge of #102118 - notriddle:notriddle/line-numbers, r=GuillaumeGomez
rustdoc: clean up line numbers on code examples

* First commit switches from `display: inline-flex; width: 100%` to `display: flex`.

  `display: inline-flex` was used as part of e961d397ca, the original commit that added these line numbers. Does anyone know why it was done this way?

* Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does.

Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html
2022-09-22 21:34:50 +02:00
Matthias Krüger
41ad726110
Rollup merge of #102113 - RalfJung:opty-assert-mem, r=oli-obk
OpTy: fix a method taking self rather than &self

r? `@oli-obk`
2022-09-22 21:34:49 +02:00
Ralf Jung
a7cdfafafb make Miri build in stage 0 2022-09-22 21:01:23 +02:00
Ralf Jung
7927f0919f add regression test for miri issue 2433 2022-09-22 21:01:13 +02:00
Michael Howell
8abf4870ce rustdoc: remove no-op CSS .location:empty { border: none }
This rule was added in 2bb2a2975f to remove a
border placed around the location when it's empty. That rule was removed in
6a5f8b1aef, so this rule does nothing.
2022-09-22 11:09:29 -07:00
bors
e7119a0300 Auto merge of #98840 - cjgillot:span-inline-ctxt, r=wesleywiser
Inline SyntaxContext in both encoded span representation.

The current interned representation for spans does not use the `ctxt_or_zero: u16` field.  This PR proposes to use this field to store the `SyntaxContext` of the interned span instead.  When `ctxt_or_zero` and the interned span's `ctxt` don't match, the inlined one takes precedence.

This allows to implement `Span::ctxt` and `Span::with_ctxt` with much less probability to access the interner.  Those functions are used a lot for hygiene, so this may be worth it.
2022-09-22 17:59:27 +00:00
Camille GILLOT
fc43df0333 Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk"
This reverts commit 2cb9a65684, reversing
changes made to 750bd1a7ff.
2022-09-22 19:36:11 +02:00
Camille GILLOT
381bd2a836 Revert "Auto merge of #101862 - cjgillot:lint-regression, r=oli-obk"
This reverts commit bc7b17cfe3, reversing
changes made to 5253b0a0a1.
2022-09-22 19:34:01 +02:00
onestacked
5a5138df59 Constify {FormResidual, Try} for ControlFlow 2022-09-22 18:21:34 +02:00
bors
89e4e1f1b3 Auto merge of #102139 - Dylan-DPC:rollup-ljlipt8, r=Dylan-DPC
Rollup of 8 pull requests

Successful merges:

 - #101598 (Update rustc's information on Android's sanitizers)
 - #102036 (Remove use of `io::ErrorKind::Other` in std)
 - #102037 (Make cycle errors recoverable)
 - #102069 (Skip `Equate` relation in `handle_opaque_type`)
 - #102076 (rustc_transmute: fix big-endian discriminants)
 - #102107 (Add missing space between notable trait tooltip and where clause)
 - #102119 (Fix a typo “pararmeter” in error message)
 - #102131 (Added which number is computed in compute_float.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-22 15:18:35 +00:00
Maybe Waffle
98a32305af Apply changes proposed in the review 2022-09-22 17:44:06 +04:00
Dylan DPC
33b7ff128f
Rollup merge of #102131 - orlp:patch-1, r=thomcc
Added which number is computed in compute_float.

The original comment was very elaborate but ultimately did not mention at all what is being computed using parameters `w, q`, only referencing an external article for the algorithm.
2022-09-22 18:25:57 +05:30
Dylan DPC
53e08f36be
Rollup merge of #102119 - steffahn:fix-pararmeter, r=dtolnay
Fix a typo “pararmeter” in error message

Issue reported on IRLO: https://internals.rust-lang.org/t/fixing-a-typo/17427
2022-09-22 18:25:56 +05:30
Dylan DPC
83bea3ddec
Rollup merge of #102107 - Urgau:rustdoc-missing-space-before-where-clause, r=GuillaumeGomez
Add missing space between notable trait tooltip and where clause

This PR add a missing space between the notable trait tooltip and the where clause.

The issue can be seeing on the [BufRead](https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html) page.

Added a simple snapshot regression test in `src/test/rustdoc/where.rs`.

Before:
![image](https://user-images.githubusercontent.com/3616612/191566999-2f80e138-29c9-4f66-8bed-07781cbd9783.png)

After:
![image](https://user-images.githubusercontent.com/3616612/191567025-0ed3f7d4-7cec-4788-901f-5980fc241daa.png)

r? `@GuillaumeGomez`
2022-09-22 18:25:55 +05:30
Dylan DPC
7cac18e1be
Rollup merge of #102076 - cuviper:transmute-discr-endian, r=jackh726
rustc_transmute: fix big-endian discriminants

I noticed that some new tests were failing in Fedora on s390x only, which usually means there's a problem with big-endian, and sure enough there's a FIXME(``@jswrenn)`` for that in `rustc_transmute`. This patch implements the appropriate consideration for target endianness, rather than using native (host) endian.
2022-09-22 18:25:54 +05:30
Dylan DPC
8bf533593d
Rollup merge of #102069 - compiler-errors:no-eq-in-register-opaque, r=oli-obk
Skip `Equate` relation in `handle_opaque_type`

r? ``@oli-obk``
2022-09-22 18:25:54 +05:30