Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #105456

Merged
merged 30 commits into from Dec 9, 2022
Merged

Rollup of 10 pull requests #105456

merged 30 commits into from Dec 9, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

estebank and others added 30 commits November 28, 2022 14:08
On type error with long types, print an abridged type and write the full
type to disk.

Print the widest possible short type while still fitting in the
terminal.
…ger casts

Pointer-integer casts are required for conversion between `EXINF` (ITRON
task entry point parameter) and `*const ThreadInner`. Addresses the
deny-level lint `fuzzy_provenance_casts`.
Copied from `unsupported/io.rs`. Fixes build failure.
Addresses the warn-by-default lints `unused_imports` and
`unused_unsafe`.
This pattern seems to be considered illegal by Miri.
-export-dynamic was a temporary hack added in the early days of the Rust
wasm32 target when Rust didn't have a way to specify wasm exports in the
source code. This flag causes all global symbols, and some compiler-internal
symbols, to be exported, which is often more than needed.

Rust now does have a way to specify exports in the source code:
`#[export_name = "..."]`.

So as the original comment suggests, -export-dynamic can now be removed,
allowing users to have smaller binaries and better encapsulation in
their wasm32-unknown-unknown modules.

It's possible that this change will require existing wasm32-unknown-unknown
users will to add explicit `#[export_name = "..."]` directives to
exporrt the symbols that their programs depend on having exported.
This adds a new variant `ImplTraitContext::FeatureGated`, so we can
generalize the help for `return_position_impl_trait_in_trait` to also
work for `impl_trait_in_fn_trait_return`.
Resolves this docker warning:

```
[WARNING]: Empty continuation line found in:
    RUN apt-get update && apt-get install -y --no-install-recommends   g++   gcc-multilib   make   ninja-build   file   curl   ca-certificates   python2.7   python3.9   git   cmake   sudo   gdb   llvm-13-tools   llvm-13-dev   libedit-dev   libssl-dev   pkg-config   zlib1g-dev   xz-utils   nodejs     apt-transport-https software-properties-common &&     curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     apt-get update &&     apt-get install -y powershell     && rm -rf /var/lib/apt/lists/*
Warning: : Empty continuation lines will become errors in a future release.
```
`FnCtxt::ps` is the only occurrence. It gets updated during HIR
typechecking, but is never looked at.
Detect long types in E0308 and write them to disk

On type error with long types, print an abridged type and write the full type to disk.

Print the widest possible short type while still fitting in the terminal.
…nce, r=thomcc

kmc-solid: `std::sys` code maintenance

Includes a set of changes to fix the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets and make some other improvements.

- Address `fuzzy_provenance_casts` by using `expose_addr` and `from_exposed_addr` for pointer-integer casts
- Add a stub implementation of `is_terminal` (rust-lang#98070)
- Address `unused_imports` and `unused_unsafe`
- Stop doing `Box::from_raw(&*(x: Box<T>) as *const T as *mut T)`
…errors

Make nested RPIT inherit the parent opaque's generics.

Fixes rust-lang#105197

r? ```@compiler-errors```
make retagging work even with 'unstable' places

This is based on top of rust-lang#105301. Only the last two commits are new.

While investigating rust-lang/unsafe-code-guidelines#381 I realized that we would have caught this issue much earlier if the add_retag pass wouldn't bail out on assignments of the form `*ptr = ...`.

So this PR changes our retag strategy:
- When a new reference is created via `Rvalue::Ref` (or a raw ptr via `Rvalue::AddressOf`), we do the retagging as part of just executing that address-taking operation.
- For everything else, we still insert retags -- these retags basically serve to ensure that references stored in local variables (and their fields) are always freshly tagged, so skipping this for assignments like `*ptr = ...` is less egregious.
r? ```@oli-obk```
…amic, r=TaKO8Ki

Stop passing -export-dynamic to wasm-ld.

-export-dynamic was a temporary hack added in the early days of the Rust wasm32 target when Rust didn't have a way to specify wasm exports in the source code. This flag causes all global symbols, and some compiler-internal symbols, to be exported, which is often more than needed.

Rust now does have a way to specify exports in the source code: `#[export_name = "..."]`.

So as the original comment suggests, -export-dynamic can now be removed, allowing users to have smaller binaries and better encapsulation in their wasm32-unknown-unknown modules.

It's possible that this change will require existing wasm32-unknown-unknown users will to add explicit `#[export_name = "..."]` directives to exporrt the symbols that their programs depend on having exported.
…-errors

Add help for `#![feature(impl_trait_in_fn_trait_return)]`

This adds a new variant `ImplTraitContext::FeatureGated`, so we can
generalize the help for `return_position_impl_trait_in_trait` to also
work for `impl_trait_in_fn_trait_return`.

cc rust-lang#99697
Use `Symbol` for the crate name instead of `String`/`str`

It always got converted to a symbol anyway
…fix, r=jyn514

CI: add missing line continuation marker

Resolves this docker warning:

```
[WARNING]: Empty continuation line found in:
    RUN apt-get update && apt-get install -y --no-install-recommends   g++   gcc-multilib   make   ninja-build   file   curl   ca-certificates   python2.7   python3.9   git   cmake   sudo   gdb   llvm-13-tools   llvm-13-dev   libedit-dev   libssl-dev   pkg-config   zlib1g-dev   xz-utils   nodejs     apt-transport-https software-properties-common &&     curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     apt-get update &&     apt-get install -y powershell     && rm -rf /var/lib/apt/lists/*
Warning: : Empty continuation lines will become errors in a future release.
```
Fix warning when libcore is compiled with no_fp_fmt_parse

Discovered when trying to compile Rust-for-Linux with Rust 1.66 beta.

It'll be helpful if this is backported to beta (should be trivial enough for backporting), so Rust-for-Linux's rust version bump wouldn't need to do `--cap-lints allow` for libcore.
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 8, 2022
@ehuss
Copy link
Contributor

ehuss commented Dec 8, 2022

@bors retry

#105477 will hopefully fix the coverage-reports issue

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 8, 2022
@bors
Copy link
Contributor

bors commented Dec 9, 2022

⌛ Testing commit 660795e with merge 7701a7e...

@ehuss
Copy link
Contributor

ehuss commented Dec 9, 2022

@bors treeclosed-

@bors
Copy link
Contributor

bors commented Dec 9, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 7701a7e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 9, 2022
@bors bors merged commit 7701a7e into rust-lang:master Dec 9, 2022
@rustbot rustbot added this to the 1.67.0 milestone Dec 9, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7701a7e): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.9% [1.9%, 1.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

@rust-log-analyzer

This comment was marked as resolved.

@rust-log-analyzer

This comment was marked as resolved.

@rust-log-analyzer

This comment was marked as resolved.

@rust-log-analyzer

This comment was marked as resolved.

@matthiaskrgr matthiaskrgr deleted the rollup-yennygf branch December 22, 2022 10:47
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#104922 (Detect long types in E0308 and write them to disk)
 - rust-lang#105120 (kmc-solid: `std::sys` code maintenance)
 - rust-lang#105255 (Make nested RPIT inherit the parent opaque's generics.)
 - rust-lang#105317 (make retagging work even with 'unstable' places)
 - rust-lang#105405 (Stop passing -export-dynamic to wasm-ld.)
 - rust-lang#105408 (Add help for `#![feature(impl_trait_in_fn_trait_return)]`)
 - rust-lang#105423 (Use `Symbol` for the crate name instead of `String`/`str`)
 - rust-lang#105433 (CI: add missing line continuation marker)
 - rust-lang#105434 (Fix warning when libcore is compiled with no_fp_fmt_parse)
 - rust-lang#105441 (Remove `UnsafetyState`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet