Commit Graph

210535 Commits

Author SHA1 Message Date
Andrew Pollack
e1636b83e3 Adding Fuchsia compiler testing script, docs 2022-11-11 18:44:33 +00:00
Bryan Garza
b678e9221a Ignore wasm and emscripten targets for test 2022-11-11 17:35:13 +00:00
bors
7d85104b96 Auto merge of #104289 - Dylan-DPC:rollup-v7wei2t, r=Dylan-DPC
Rollup of 9 pull requests

Successful merges:

 - #100633 (Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`)
 - #103445 (`#[test]`: Point at return type if `Termination` bound is unsatisfied)
 - #103924 (Fix broken link in description of error code E0706)
 - #104146 (Retry binding TCP Socket in remote-test-server)
 - #104169 (Migrate `:target` rules to use CSS variables)
 - #104202 (Fix ICE #103748)
 - #104216 (Don't ICE on operator trait methods with generic methods)
 - #104217 (Display help message when fluent arg was referenced incorrectly)
 - #104245 (Reduce default configuration's dependency upon static libstdcpp library (#103606))

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-11 17:29:10 +00:00
Michael Goulet
93921dd16d Don't ICE with inline const errors during MIR build 2022-11-11 17:21:58 +00:00
Manish Goregaokar
b74d042be2
Rollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait, r=Manishearth
rustdoc: use javascript to layout notable traits popups

Fixes #102576

Preview: https://notriddle.com/notriddle-rustdoc-demos/102576-js-notable-trait/std/iter/trait.Iterator.html#method.step_by

## Before

![image](https://user-images.githubusercontent.com/1593513/200432713-23aa8d49-ba2b-469f-9eab-089e0c174039.png)

## After

![image](https://user-images.githubusercontent.com/1593513/200432735-edd5b53d-e99d-4fc5-9410-8a79e0efdc9d.png)
2022-11-11 12:12:31 -05:00
Manish Goregaokar
e8bc6e1328
Rollup merge of #104051 - RalfJung:miri, r=RalfJung
update Miri

Notable PRs:
- https://github.com/rust-lang/miri/pull/2636
- https://github.com/rust-lang/miri/pull/2641
- https://github.com/rust-lang/miri/pull/2638
2022-11-11 12:12:31 -05:00
Manish Goregaokar
a13809ae51
Rollup merge of #103960 - AndyJado:var_path_only_diag, r=davidtwco
piece of diagnostic migrate

r? `@davidtwco`
2022-11-11 12:12:30 -05:00
Manish Goregaokar
f00897e2f4
Rollup merge of #103531 - chenyukang:yukang/fix-103474, r=estebank
Suggest calling the instance method of the same name when method not found

Fixes #103474
2022-11-11 12:12:30 -05:00
Manish Goregaokar
fd5ff82f28
Rollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, r=estebank
Fix unused lint and parser caring about spaces to won't produce invalid code

Fixes #103435
2022-11-11 12:12:29 -05:00
Manish Goregaokar
9553fea23a
Rollup merge of #102215 - alexcrichton:wasm-link-whole-archive, r=estebank
Implement the `+whole-archive` modifier for `wasm-ld`

This implements the `Linker::{link_whole_staticlib,link_whole_rlib}` methods for the `WasmLd` linker used on wasm targets. Previously these methods were noops since I think historically `wasm-ld` did not have support for `--whole-archive` but nowadays it does, so the flags are passed through.
2022-11-11 12:12:29 -05:00
Manish Goregaokar
76ce198128
Rollup merge of #100386 - compiler-errors:sized-coinductive-redux, r=lcnr
Make `Sized` coinductive, again

A revival of #83647

---

What exactly makes co-induction sound? Better question: are there any unsoundness risks from this? `Sized` can't be implemented by custom `impl` blocks, nor can it be conditionally implemented based on anything other than child fields being `Sized`, right?

r? `@nikomatsakis` for whenever he gets back from vacation
2022-11-11 12:12:28 -05:00
Manish Goregaokar
cd30ccf974
Rollup merge of #95292 - BGR360:const-trait-specialize, r=lcnr
Allow specialized const trait impls.

Fixes #95186.
Fixes #95187.

I've done my best to create a comprehensive test suite for the interaction between `min_specialization` and `const_trait_impls`. I wouldn't be surprised if there are interesting cases I haven't tested, please let me know.
2022-11-11 12:12:27 -05:00
Michael Howell
05824cd7b7 rustdoc: fix HTML validation failure by escaping data-ty 2022-11-11 10:01:54 -07:00
Michael Howell
269dad27f2 rustdoc: add test cases for checkbox toggles 2022-11-11 09:57:58 -07:00
clubby789
b2da155a9a Introduce ExprKind::IncludedBytes 2022-11-11 16:31:32 +00:00
Guillaume Gomez
0839d39570 Add regression test for multi-level import 2022-11-11 17:31:02 +01:00
Guillaume Gomez
8c80fe7f15 Correctly import all attributes from multi-level import 2022-11-11 17:31:02 +01:00
Florian Bartels
f149837f0d
Add Tristan as maintainer 2022-11-11 16:29:33 +01:00
Dylan DPC
378112034e
Rollup merge of #104245 - kubycsolutions:master, r=jyn514
Reduce default configuration's dependency upon static libstdcpp library (#103606)

Fixes #103606

Remove default dependency on static libstdcpp except during dist llvm builds (where we want static libraries so `libLLVM.so` is self-contained).
2022-11-11 20:51:42 +05:30
Dylan DPC
6026785b7a
Rollup merge of #104217 - Nilstrieb:funny-dollar-syntax, r=TaKO8Ki
Display help message when fluent arg was referenced incorrectly

The fluent argument syntax is a little special and easy to get wrong, so we emit a small help message when someone gets it wrong.

Example:
```
parser_mismatched_closing_delimiter = mismatched closing delimiter: `${delimiter}`
```
panics with
```
thread 'rustc' panicked at 'Encountered errors while formatting message for `parser_mismatched_closing_delimiter`
help: Argument `delimiter` exists but was not referenced correctly. Try using `{$delimiter}` instead
attr: `None`
args: `FluentArgs([("delimiter", String("}"))])`
errors: `[ResolverError(Reference(Message { id: "delimiter", attribute: None }))]`', compiler/rustc_errors/src/translation.rs:123:21
```

fixes #103539
2022-11-11 20:51:41 +05:30
Dylan DPC
e83b4765c3
Rollup merge of #104216 - Nilstrieb:dont-ice-invalid-operator-traits, r=estebank
Don't ICE on operator trait methods with generic methods

Emit a fatal error instead.
fixes #104213
2022-11-11 20:51:41 +05:30
Dylan DPC
f3931c8be5
Rollup merge of #104202 - camsteffen:103748, r=estebank
Fix ICE #103748

Fixes #103748
2022-11-11 20:51:40 +05:30
Dylan DPC
eca27a2f94
Rollup merge of #104169 - GuillaumeGomez:migrate-css-target, r=notriddle
Migrate `:target` rules to use CSS variables

There should be no GUI changes.

r? `@notriddle`
2022-11-11 20:51:40 +05:30
Dylan DPC
e9b4a84dfa
Rollup merge of #104146 - Ayush1325:remote-test-server, r=jyn514
Retry binding TCP Socket in remote-test-server

This allows retrying binding TCP Socket multiple times. This is useful when using emulators as network might not be available in the beginning.

This was orignally implemented in https://github.com/rust-lang/rust/pull/100316

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-11 20:51:39 +05:30
Dylan DPC
6e819af3a7
Rollup merge of #103924 - PeteDevoy:patch-1, r=estebank
Fix broken link in description of error code E0706

Corresponding subsection in async book is `07.05` not `07.06`.

The information on the linked page is the same so it may be reasonable to remove the whole sentence.
2022-11-11 20:51:39 +05:30
Dylan DPC
bc9567fbf6
Rollup merge of #103445 - fmease:fix-50291, r=estebank
`#[test]`: Point at return type if `Termination` bound is unsatisfied

Together with #103142 (already merged) this fully fixes #50291.

I don't consider my current solution of changing a few spans “here and there” very clean since the
failed obligation is a `FunctionArgumentObligation` and we point at a type instead of a function argument.

If you agree with me on this point, I can offer to keep the spans of the existing nodes and instead inject
`let _: AssertRetTyIsTermination<$ret_ty>;` (type to be defined in `libtest`) similar to `AssertParamIsEq` etc.
used by some built-in derive-macros.

I haven't tried that approach yet though and cannot promise that it would actually work out or
be “cleaner” for that matter.

````@rustbot```` label A-libtest A-diagnostics
r? ````@estebank````
2022-11-11 20:51:38 +05:30
Dylan DPC
978e7abece
Rollup merge of #100633 - estebank:must_use_async_fn_return, r=tmandry
Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`

No longer lint against `#[must_use] async fn foo()`.

When encountering a statement that awaits on a `Future`, check if the
`Future`'s parent item is annotated with `#[must_use]` and emit a lint
if so. This effectively makes `must_use` an annotation on the
`Future::Output` instead of only the `Future` itself.

Fix #78149.
2022-11-11 20:51:38 +05:30
Oli Scherer
df2adc4760 Print all labels, even if they have no span. Fall back to main item's span. 2022-11-11 14:45:28 +00:00
Oli Scherer
21ce58732b Don't add message that will never be shown to users
It will still be used in json, as seen by the ui test changes
2022-11-11 14:45:28 +00:00
Oli Scherer
014f7f4092 Remove some redundant arguments 2022-11-11 14:17:27 +00:00
bors
742d3f02c2 Auto merge of #102872 - mikebenfield:better-get-discr, r=nagisa
rustc_codegen_ssa: Better code generation for niche discriminants.

In some cases we can avoid arithmetic before checking whether a niche is a tag.

Also rename some identifiers around niches.

This is relevant to #101872
2022-11-11 13:50:32 +00:00
Camille GILLOT
9d86e6abaf Use the interned stable hash as plain hash. 2022-11-11 13:02:37 +00:00
Camille GILLOT
d47424b833 Hash spans when interning. 2022-11-11 13:02:37 +00:00
Camille GILLOT
c42a4245cc Do not rename bound variables when verbose-printing binders. 2022-11-11 13:02:37 +00:00
León Orell Valerian Liehr
c2b906ba9a
Recover from fn ptr tys with generic param list 2022-11-11 13:42:40 +01:00
Albert Larsan
a1909b7b07
Try another way 2022-11-11 12:17:32 +01:00
Camille GILLOT
6c95805a34 Clean-up formatting. 2022-11-11 10:32:49 +00:00
Camille GILLOT
60892e8b1d Visit opaque types during type collection too. 2022-11-11 10:29:27 +00:00
Jannis Christopher Köhl
3c6d1a723d Add test for repr(transparent) with scalar 2022-11-11 11:24:31 +01:00
Albert Larsan
fb98796892
Apply suggestions 2022-11-11 11:14:09 +01:00
Camille GILLOT
3075f03513 Resolve lifetimes using the regular logic for RPIT. 2022-11-11 10:12:28 +00:00
Camille GILLOT
44c10e4cb0 Resolve lifetimes independently for each item-like. 2022-11-11 10:11:50 +00:00
Camille GILLOT
0ff1d1e122 Tweak signatures in rustc_middle::hir::map. 2022-11-11 10:10:16 +00:00
Florian Bartels
ae71df987b Add nto as known target_os 2022-11-11 10:44:48 +01:00
Florian Bartels
84e1fbcadf Add no_std AArch64 support for the QNX Neutrino (nto) 7.1 RTOS
This change allows to compile no_std applications for the QNX Neutrino
realtime operating system for ARM 64 bit CPUs.
Tested with QNX Neutrino 7.1.
2022-11-11 10:44:48 +01:00
Michael Benfield
51918dcc51 rustc_codegen_ssa: Better code generation for niche discriminants.
In some cases we can avoid arithmetic before checking whether a niche
represents an untagged variant.

This is relevant to #101872
2022-11-11 05:54:30 +00:00
bors
b7b7f2716e Auto merge of #103898 - Nilstrieb:match-macro, r=nnethercote
Retry failed macro matching for diagnostics

When a declarative macro fails to match, retry the matching to collect diagnostic info instead of collecting it on the fly in the hot path. Split out of #103439.

You made a bunch of changes to declarative macro matching, so
r? `@nnethercote`

This change should produce a few small perf wins: https://github.com/rust-lang/rust/pull/103439#issuecomment-1294249602
2022-11-11 04:54:59 +00:00
Ben Reeves
94f67e667b Oops, bless this test. 2022-11-10 22:14:08 -06:00
Esteban Küber
f57713b010 Fix tests after rebase 2022-11-10 19:01:33 -08:00
bors
5b82ea74b7 Auto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank
Recover wrong-cased keywords that start items

(_this pr was inspired by [this tweet](https://twitter.com/Azumanga/status/1552982326409367561)_)

r? `@estebank`

We've talked a bit about this recovery, but I just wanted to make sure that this is the right approach :)

For now I've only added the case insensitive recovery to `use`s, since most other items like `impl` blocks, modules, functions can start with multiple keywords which complicates the matter.
2022-11-11 02:07:52 +00:00