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 7 pull requests #101273

Closed
wants to merge 21 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

shepmaster and others added 21 commits August 23, 2022 09:58
There are times where computing a value may be cheap, or where
computing a reference may be expensive, so this fills out the
possibilities.
…ref_of}`

While the `provide_*` methods already short-circuit when a value has
been provided, there are times where an expensive computation is
needed to determine if the `provide_*` method can even be called.
Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.
Before, it called `normalize_erasing_regions` twice since
`equal_up_to_regions` called it as well for both types.
`std::os::fd` defines types like `OwnedFd` and `RawFd` and is common
between Unix and non-Unix platforms that share a basic file-descriptor
concept. Rust currently uses this internally to simplify its own code,
but it would be useful for external users in the same way, so make it
public.

This means that `OwnedFd` etc. will all appear in three places, for
example on unix platforms:
 - `std::os::fd::OwnedFd`
 - `std::os::unix::io::OwnedFd`
 - `std::os::unix::prelude::OwnedFd`
Add `#[unstable(feature = "os_fd", issue = "98699")]` to the new
`pub use` declarations.
Walkthrough currently say:

```
rustup target add aarch_64-fuchsia
```
but should say

```
rustup target add aarch64-fuchsia
```
…r=joshtriplett

Make `std::os::fd` public.

`std::os::fd` defines types like `OwnedFd` and `RawFd` and is common
between Unix and non-Unix platforms that share a basic file-descriptor
concept. Rust currently uses this internally to simplify its own code,
but it would be useful for external users in the same way, so make it
public.

This means that `OwnedFd` etc. will all appear in three places, for
example on unix platforms:
 - `std::os::fd::OwnedFd`
 - `std::os::unix::io::OwnedFd`
 - `std::os::unix::prelude::OwnedFd`

r? `````@joshtriplett`````
Add additional methods to the Demand type

This adds on to the original tracking issue rust-lang#96024

r? `````@yaahc`````
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ````@compiler-errors```` who nicely helped me on zulip
…henkov

Add warning against unexpected --cfg with --check-cfg

This PR adds a warning when an unexpected `--cfg` is specified but not in the specified list of `--check-cfg`.

This is the follow-up PR I mentioned in rust-lang#99519.

r? `````@petrochenkov`````
…re-whitespace, r=notriddle

Remove unneeded where whitespace

It fixes these two bugs:

![Screenshot from 2022-08-31 18-14-40](https://user-images.githubusercontent.com/3050060/187727950-94657419-abfa-454c-9d27-004280fbcb45.png)
![Screenshot from 2022-08-31 18-14-49](https://user-images.githubusercontent.com/3050060/187727956-21d1b39d-62d7-4e7b-8f6f-631ceda67a19.png)

It's a relic from a very old time (this commit: rust-lang@bfd01b7).

You can test the result [here](https://rustdoc.crud.net/imperio/remove-unneeded-where-whitespace/lib2/struct.WhereWhitespace.html).

cc `````@jsha`````
r? `````@notriddle`````
Fix  bad target name in Walkthrough

Walkthrough currently say:

```
rustup target add aarch_64-fuchsia
```
but should say

```
rustup target add aarch64-fuchsia
```
… r=tmandry

Fixes/adjustments to Fuchsia doc walkthrough

Small fixes/adjustments missed during rust-lang#100927
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 1, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Sep 1, 2022

📌 Commit 0472344 has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 1, 2022
@bors
Copy link
Contributor

bors commented Sep 1, 2022

⌛ Testing commit 0472344 with merge 136bfbcd9c4a1983f2536016955a10568f8bc782...

@rust-log-analyzer
Copy link
Collaborator

The job i686-gnu-nopt failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [ui] src/test/ui/check-cfg/mix.rs stdout ----
diff of stderr:

28 LL | #[cfg_attr(uu, test)]
30 
- warning: unexpected `unknown_name` as condition name
-    |
-    |
-    = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
- 
35 warning: unexpected condition value `bar` for condition name `feature`
36    |
37    = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
+ 
+ warning: unexpected `unknown_name` as condition name
+    |
+    |
+    = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
Some tests failed in compiletest suite=ui mode=ui host=i686-unknown-linux-gnu target=i686-unknown-linux-gnu
39 warning: unexpected `cfg` condition name
40   --> $DIR/mix.rs:35:10



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/i686-unknown-linux-gnu/test/ui/check-cfg/mix/mix.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args check-cfg/mix.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: "/checkout/obj/build/i686-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/check-cfg/mix.rs" "-Zthreads=1" "--target=i686-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/i686-unknown-linux-gnu/test/ui/check-cfg/mix" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--check-cfg=names()" "--check-cfg=values(feature,\"foo\")" "--cfg" "feature=\"bar\"" "--cfg" "unknown_name" "-Z" "unstable-options" "-L" "/checkout/obj/build/i686-unknown-linux-gnu/test/ui/check-cfg/mix/auxiliary"
stdout: none
--- stderr -------------------------------
  --> /checkout/src/test/ui/check-cfg/mix.rs:11:7
   |
   |
LL | #[cfg(widnows)]
   |       ^^^^^^^ help: did you mean: `windows`
   = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:18:7
---

warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:22:7
   |
LL | #[cfg(feature = "zebra")]
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition name
warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:26:12
   |
LL | #[cfg_attr(uu, test)]


warning: unexpected condition value `bar` for condition name `feature`
   |
   = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
warning: unexpected `unknown_name` as condition name
   |
   |
   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:35:10
   |
   |
LL |     cfg!(widnows);
   |          ^^^^^^^ help: did you mean: `windows`
warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:38:10
   |
   |
LL |     cfg!(feature = "bar");
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition value
warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:40:10
   |
LL |     cfg!(feature = "zebra");
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition name
warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:42:10
   |
LL |     cfg!(xxx = "foo");

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:44:10
   |
   |
LL |     cfg!(xxx);

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:46:14
   |
   |
LL |     cfg!(any(xxx, windows));

warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:48:14
   |
   |
LL |     cfg!(any(feature = "bad", windows));
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition name
warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:50:23
   |
LL |     cfg!(any(windows, xxx));

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:52:20
   |
   |
LL |     cfg!(all(unix, xxx));

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:54:14
   |
   |
LL |     cfg!(all(aa, bb));

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:54:18
   |
   |
LL |     cfg!(all(aa, bb));

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:57:14
   |
   |
LL |     cfg!(any(aa, bb));

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:57:18
   |
   |
LL |     cfg!(any(aa, bb));

warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:60:20
   |
   |
LL |     cfg!(any(unix, feature = "zebra"));
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition name
warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:62:14
   |
LL |     cfg!(any(xxx, feature = "zebra"));

warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:62:19
   |
   |
LL |     cfg!(any(xxx, feature = "zebra"));
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition name
warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:65:14
   |
LL |     cfg!(any(xxx, unix, xxx));

warning: unexpected `cfg` condition name
  --> /checkout/src/test/ui/check-cfg/mix.rs:65:25
   |
   |
LL |     cfg!(any(xxx, unix, xxx));

warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:68:14
   |
   |
LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition value
warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:68:33
   |
LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
   |
   = note: expected values for `feature` are: foo

warning: unexpected `cfg` condition value
warning: unexpected `cfg` condition value
  --> /checkout/src/test/ui/check-cfg/mix.rs:68:52
   |
LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
   |
   = note: expected values for `feature` are: foo

warning: 27 warnings emitted

@bors
Copy link
Contributor

bors commented Sep 1, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 1, 2022
@Dylan-DPC Dylan-DPC closed this Sep 1, 2022
@davidtwco davidtwco removed the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. T-rustdoc Relevant to the rustdoc 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