Remove lock wrappers in `sys_common`
This moves the lazy allocation to `sys` (SGX and UNIX). While this leads to a bit more verbosity, it will simplify future improvements by making room in `sys_common` for platform-independent implementations.
This also removes the condvar check on SGX as it is not necessary for soundness and will be removed anyway once mutex has been made movable.
For simplicity's sake, `libunwind` also uses lazy allocation now on SGX. This will require an update to the C definitions before merging this (CC `@raoulstrackx).`
r? `@m-ou-se`
Build the profiler runtime to allow using -C profile-generate
and -C instrument-coverage on s390x-linux.
I've verified in a local build that the runtime builds and
the profiler is working fine on the platform.
9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497
2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)
A relative path with just one component will return `Some("")` as its
parent, which wasn't clear to me from the documentation.
The parent of `""` is `None`, which was missing from the documentation
as well.
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
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.
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
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.
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).
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
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>
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.
`#[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````
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.
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