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 11 pull requests #88854

Closed
wants to merge 42 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

kpreid and others added 30 commits August 9, 2021 18:55
The existing documentation felt a little unhelpfully concise, so this
change tries to improve it by using longer sentences, each of which
specifies which kinds of types it applies to as early as possible. In
particular, the third item starts with “Structs ...” instead of
saying “Foo is a struct” later.

Also, the previous list items “Only the last field has a type
involving `T`” and “`T` is not part of the type of any other
fields” are, as far as I see, redundant with each other, so I removed
the latter.
Commit 95e096d changed a bunch of size checks already, but more have
been added, so this fixes the new ones the same way: the various size
checks that are conditional on target_arch = "x86_64" were not intended
to apply to x86_64-unknown-linux-gnux32, so add
target_pointer_width = "64" to the conditions.
Rustdoc doesn't require the build artifacts to generate the docs, and
especially in the case of rustc, it greatly increases the time needed to
run the build.
Local variables can never be exported.
matthiaskrgr and others added 12 commits September 11, 2021 10:18
Reword description of automatic impls of `Unsize`.

The existing documentation felt a little unhelpfully concise, so this change tries to improve it by using longer sentences, each of which specifies which kinds of types it applies to as early as possible. In particular, the third item starts with “Structs ...” instead of saying “Foo is a struct” later.

Also, the previous list items “Only the last field has a type involving `T`” and “`T` is not part of the type of any other fields” are, as far as I see, redundant with each other, so I removed the latter.

I have no particular knowledge of `Unsize`; I have attempted to leave the meaning entirely unchanged but may have missed a nuance.

Markdown preview of the edited documentation:

> All implementations of `Unsize` are provided automatically by the compiler.
> Those implementations are:
>
> - Arrays `[T; N]` implement `Unsize<[T]>`.
> - Types implementing a trait `Trait` also implement `Unsize<dyn Trait>`.
> - Structs `Foo<..., T, ...>` implement `Unsize<Foo<..., U, ...>>` if all of these conditions
>   are met:
>   - `T: Unsize<U>`.
>   - Only the last field of `Foo` has a type involving `T`.
>   - `Bar<T>: Unsize<Bar<U>>`, where `Bar<T>` stands for the actual type of that last field.
Fix non-capturing closure return type coercion

Fixes rust-lang#88097. For the example given there:
```rust
fn peculiar() -> impl Fn(u8) -> u8 {
    return |x| x + 1
}
```
which incorrectly reports an error, I noticed something weird in the debug log:
```
DEBUG rustc_typeck::check::coercion coercion::try_find_coercion_lub([closure@test.rs:2:12: 2:21], [closure@test.rs:2:12: 2:21], exprs=1 exprs)
```
Apparently, `try_find_coercion_lub()` thinks that the LUB for two closure types always has to be a function pointer (which explains the `expected closure, found fn pointer` error in rust-lang#88097). There is one corner case where that isn't true, though — namely, when the two closure types are equal, in which case the trivial LUB is the type itself. This PR fixes this by inserting an explicit check for type equality in `try_find_coercion_lub()`.
Improve error message when _ is used for in/inout asm operands

As suggested by ``@Commeownist`` in rust-lang#72016 (comment).
…ports, r=Amanieu

Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues

Fixes rust-lang#88304.

I tested it based on rust-lang#88292.

Not sure if it's the best approach, but at least it makes thing a bit simpler.

cc ``@jyn514``
Change more x64 size checks to not apply to x32.

Commit 95e096d changed a bunch of size checks already, but more have
been added, so this fixes the new ones the same way: the various size
checks that are conditional on target_arch = "x86_64" were not intended
to apply to x86_64-unknown-linux-gnux32, so add
target_pointer_width = "64" to the conditions.
Don't build the compiler and standard library before documenting them

Rustdoc doesn't require the build artifacts to generate the docs, and
especially in the case of rustc, it greatly increases the time needed to
run the build.

r? ``@Mark-Simulacrum`` cc ``@steffahn``
rustc: Remove local variable IDs from `Export`s

Local variables can never be exported.
generic_const_exprs: use thir for abstract consts instead of mir

not sure if this is handling some of the weirder `thir::ExprKind` correctly in `recurse_build` (it probably isnt)

r? ``@lcnr``
Use more accurate spans for "unused delimiter" lint
…chenkov

don't clone types that are Copy (clippy::clone_on_copy)
@rustbot rustbot added the rollup A PR which is a rollup label Sep 11, 2021
@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Sep 11, 2021

📌 Commit 35b66f8 has been approved by GuillaumeGomez

@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 11, 2021
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
  IMAGE: x86_64-gnu-tools
##[endgroup]
From https://github.com/rust-lang/rust
 * branch              master     -> FETCH_HEAD
Searching for toolstate changes between 4e880f8cbc191374ce7db335962489f41d6d4e3e and b7691295658c8c8b928d0df1628b5cc17ba2b06f
Clippy or rustfmt subtrees were updated
##[group]Run src/ci/scripts/verify-channel.sh
src/ci/scripts/verify-channel.sh
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
env:
---

 error: using a non-octal value to set unix file permissions
   --> $DIR/non_octal_unix_permissions.rs:12:18
    |
 LL |     options.mode(440);
    |                  ^^^ help: consider using an octal literal instead: `0o440`
    |
    = note: `-D clippy::non-octal-unix-permissions` implied by `-D warnings`
 error: using a non-octal value to set unix file permissions
-  --> $DIR/non_octal_unix_permissions.rs:17:47
-   |
-   |
-LL |     let _permissions = Permissions::from_mode(647);
-   |                                               ^^^ help: consider using an octal literal instead: `0o647`
-error: using a non-octal value to set unix file permissions
   --> $DIR/non_octal_unix_permissions.rs:26:26
    |
 LL |     permissions.set_mode(644);
 LL |     permissions.set_mode(644);
    |                          ^^^ help: consider using an octal literal instead: `0o644`
 error: using a non-octal value to set unix file permissions
   --> $DIR/non_octal_unix_permissions.rs:31:18
    |
    |
 LL |     builder.mode(755);
    |                  ^^^ help: consider using an octal literal instead: `0o755`
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
error: test failed, to rerun pass '--test compile-test'
error: test failed, to rerun pass '--test compile-test'
 

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/non_octal_unix_permissions.stage-id.stderr
diff of fixed:

 // ignore-windows
 // run-rustfix
 #![warn(clippy::non_octal_unix_permissions)]
 use std::fs::{DirBuilder, File, OpenOptions, Permissions};
 use std::os::unix::fs::{DirBuilderExt, OpenOptionsExt, PermissionsExt};
 fn main() {
     let permissions = 0o760;
 
     // OpenOptionsExt::mode
     // OpenOptionsExt::mode
     let mut options = OpenOptions::new();
     options.mode(0o440);
     options.mode(0o400);
     options.mode(permissions);
 
     // PermissionsExt::from_mode
-    let _permissions = Permissions::from_mode(0o647);
+    let _permissions = Permissions::from_mode(647);
     let _permissions = Permissions::from_mode(0o000);
     let _permissions = Permissions::from_mode(permissions);
     // PermissionsExt::set_mode
     // PermissionsExt::set_mode
     let f = File::create("foo.txt").unwrap();
     let metadata = f.metadata().unwrap();
     let mut permissions = metadata.permissions();
     permissions.set_mode(0o644);
     permissions.set_mode(0o704);
 
     // DirBuilderExt::mode
     // DirBuilderExt::mode
     let mut builder = DirBuilder::new();
     builder.mode(0o755);
     builder.mode(0o406);
 

The actual fixed differed from the expected fixed.
The actual fixed differed from the expected fixed.
Actual fixed saved to /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/non_octal_unix_permissions.stage-id.fixed
To only update this specific test, also pass `--test-args non_octal_unix_permissions.rs`

error: 2 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/clippy-driver" "tests/ui/non_octal_unix_permissions.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/non_octal_unix_permissions.stage-id" "-A" "unused" "--emit=metadata" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "-L" "dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-Dwarnings" "-Zui-testing" "--extern" "derive_new=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libderive_new-ea1db0c41efed0d6.so" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-b0f19a5fad83a10b.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-2c42e7af51424ce5.rlib" "--extern" "clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-bc2b0c8a9dcb9fb3.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-89222f6e0d369b36.rlib" "--extern" "if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-b3e76e8f62643cc6.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-c6bd037ba33baa25.rlib" "--extern" "serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-8bd56d0234290b82.so" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-49c9d70aa8b59e5f.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/test_build_base/non_octal_unix_permissions.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
{"message":"using a non-octal value to set unix file permissions","code":{"code":"clippy::non_octal_unix_permissions","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/non_octal_unix_permissions.rs","byte_start":339,"byte_end":342,"line_start":12,"line_end":12,"column_start":18,"column_end":21,"is_primary":true,"text":[{"text":"    options.mode(440);","highlight_start":18,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`-D clippy::non-octal-unix-permissions` implied by `-D warnings`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider using an octal literal instead","code":null,"level":"help","spans":[{"file_name":"tests/ui/non_octal_unix_permissions.rs","byte_start":339,"byte_end":342,"line_start":12,"line_end":12,"column_start":18,"column_end":21,"is_primary":true,"text":[{"text":"    options.mode(440);","highlight_start":18,"highlight_end":21}],"label":null,"suggested_replacement":"0o440","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: using a non-octal value to set unix file permissions\n  --> tests/ui/non_octal_unix_permissions.rs:12:18\n   |\nLL |     options.mode(440);\n   |                  ^^^ help: consider using an octal literal instead: `0o440`\n   |\n   = note: `-D clippy::non-octal-unix-permissions` implied by `-D warnings`\n\n"}
{"message":"using a non-octal value to set unix file permissions","code":{"code":"clippy::non_octal_unix_permissions","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/non_octal_unix_permissions.rs","byte_start":798,"byte_end":801,"line_start":26,"line_end":26,"column_start":26,"column_end":29,"is_primary":true,"text":[{"text":"    permissions.set_mode(644);","highlight_start":26,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider using an octal literal instead","code":null,"level":"help","spans":[{"file_name":"tests/ui/non_octal_unix_permissions.rs","byte_start":798,"byte_end":801,"line_start":26,"line_end":26,"column_start":26,"column_end":29,"is_primary":true,"text":[{"text":"    permissions.set_mode(644);","highlight_start":26,"highlight_end":29}],"label":null,"suggested_replacement":"0o644","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: using a non-octal value to set unix file permissions\n  --> tests/ui/non_octal_unix_permissions.rs:26:26\n   |\nLL |     permissions.set_mode(644);\n   |                          ^^^ help: consider using an octal literal instead: `0o644`\n\n"}
{"message":"using a non-octal value to set unix file permissions","code":{"code":"clippy::non_octal_unix_permissions","explanation":null},"level":"error","spans":[{"file_name":"tests/ui/non_octal_unix_permissions.rs","byte_start":923,"byte_end":926,"line_start":31,"line_end":31,"column_start":18,"column_end":21,"is_primary":true,"text":[{"text":"    builder.mode(755);","highlight_start":18,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider using an octal literal instead","code":null,"level":"help","spans":[{"file_name":"tests/ui/non_octal_unix_permissions.rs","byte_start":923,"byte_end":926,"line_start":31,"line_end":31,"column_start":18,"column_end":21,"is_primary":true,"text":[{"text":"    builder.mode(755);","highlight_start":18,"highlight_end":21}],"label":null,"suggested_replacement":"0o755","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: using a non-octal value to set unix file permissions\n  --> tests/ui/non_octal_unix_permissions.rs:31:18\n   |\nLL |     builder.mode(755);\n   |                  ^^^ help: consider using an octal literal instead: `0o755`\n\n"}

------------------------------------------

thread 'compile_test' panicked at 'Some tests failed', /cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.6.0/src/lib.rs:105:22

@bors
Copy link
Contributor

bors commented Sep 11, 2021

⌛ Testing commit 35b66f8 with merge 91caa5afc7abb41d1d303f006c50c8c43661f6f1...

@rust-log-analyzer
Copy link
Collaborator

The job wasm32 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] object test:false 6.569
[RUSTC-TIMING] gimli test:false 6.689
warning: dropping unsupported crate type `dylib` for target `wasm32-unknown-emscripten`

error[E0433]: failed to resolve: could not find `unix` in `os`
  |
  |
9 | use crate::os::unix::io::OwnedFd;
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
    |
206 |             use crate::os::unix::prelude::*;
206 |             use crate::os::unix::prelude::*;
    |                            ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
   |
76 |     use crate::os::unix::prelude::*;
76 |     use crate::os::unix::prelude::*;
   |                    ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> library/std/src/sys/unix/fd.rs:8:16
  |
8 | use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
  |
1 | use crate::os::unix::prelude::*;
1 | use crate::os::unix::prelude::*;
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
  |
  |
7 | use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd};
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
     |
     |
1257 |     use crate::os::unix::fs::{OpenOptionsExt, PermissionsExt};
     |                    ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
  |
  |
6 | use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> library/std/src/sys/unix/os.rs:8:16
8 | use crate::os::unix::prelude::*;
8 | use crate::os::unix::prelude::*;
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> library/std/src/sys/unix/pipe.rs:3:16
  |
3 | use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> library/std/src/sys/unix/process/process_common.rs:4:16
4 | use crate::os::unix::prelude::*;
4 | use crate::os::unix::prelude::*;
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> library/std/src/sys/unix/stdio.rs:3:16
  |
3 | use crate::os::unix::io::{AsFd, BorrowedFd, FromRawFd};
  |                ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: use of undeclared type `OsStringExt`
    |
    |
146 |                     OsStringExt::from_vec(cstr.to_bytes().to_vec())
    |                     ^^^^^^^^^^^ use of undeclared type `OsStringExt`

error[E0433]: failed to resolve: use of undeclared type `OsStrExt`
   --> library/std/src/sys/unix/os.rs:184:33
    |
184 |         PathBuf::from(<OsStr as OsStrExt>::from_bytes(b))
    |                                 ^^^^^^^^ use of undeclared type `OsStrExt`

error[E0433]: failed to resolve: use of undeclared type `OsStringExt`
   --> library/std/src/sys/unix/os.rs:227:8
    |
227 |     Ok(OsStringExt::from_vec(joined))
    |        ^^^^^^^^^^^ use of undeclared type `OsStringExt`

error[E0433]: failed to resolve: use of undeclared type `OsStringExt`
   --> library/std/src/sys/unix/os.rs:520:17
    |
520 |                 OsStringExt::from_vec(input[..p].to_vec()),
    |                 ^^^^^^^^^^^ use of undeclared type `OsStringExt`

error[E0433]: failed to resolve: use of undeclared type `OsStringExt`
   --> library/std/src/sys/unix/os.rs:521:17
    |
521 |                 OsStringExt::from_vec(input[p + 1..].to_vec()),
    |                 ^^^^^^^^^^^ use of undeclared type `OsStringExt`

error[E0433]: failed to resolve: use of undeclared type `OsStringExt`
   --> library/std/src/sys/unix/os.rs:537:18
    |
537 |             Some(OsStringExt::from_vec(CStr::from_ptr(s).to_bytes().to_vec()))
    |                  ^^^^^^^^^^^ use of undeclared type `OsStringExt`

error[E0433]: failed to resolve: use of undeclared type `OwnedFd`
    |
    |
153 |         unsafe { fs::File::from(OwnedFd::from_raw_fd(fd)) }
    |
help: consider importing this struct
    |
5   | use crate::os::fd::owned::OwnedFd;
5   | use crate::os::fd::owned::OwnedFd;
    |

error[E0412]: cannot find type `OwnedFd` in this scope
  --> library/std/src/sys/unix/fd.rs:15:21
   |
15 | pub struct FileDesc(OwnedFd);
   |
help: consider importing this struct
   |
   |
6  | use crate::os::fd::net::OwnedFd;


error[E0412]: cannot find type `OwnedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:299:14
    |
299 | impl AsInner<OwnedFd> for FileDesc {
    |
help: consider importing this struct
    |
    |
6   | use crate::os::fd::net::OwnedFd;


error[E0412]: cannot find type `OwnedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:300:28
    |
300 |     fn as_inner(&self) -> &OwnedFd {
    |
help: consider importing this struct
    |
    |
6   | use crate::os::fd::net::OwnedFd;


error[E0412]: cannot find type `OwnedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:305:16
    |
305 | impl IntoInner<OwnedFd> for FileDesc {
    |
help: consider importing this struct
    |
    |
6   | use crate::os::fd::net::OwnedFd;


error[E0412]: cannot find type `OwnedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:306:28
    |
306 |     fn into_inner(self) -> OwnedFd {
    |
help: consider importing this struct
    |
    |
6   | use crate::os::fd::net::OwnedFd;


error[E0412]: cannot find type `OwnedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:311:16
    |
311 | impl FromInner<OwnedFd> for FileDesc {
    |
help: consider importing this struct
    |
    |
6   | use crate::os::fd::net::OwnedFd;


error[E0412]: cannot find type `OwnedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:312:29
    |
312 |     fn from_inner(owned_fd: OwnedFd) -> Self {
    |
help: consider importing this struct
    |
    |
6   | use crate::os::fd::net::OwnedFd;


error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/fd.rs:317:6
    |
317 | impl AsFd for FileDesc {
    |
help: consider importing this trait
    |
6   | use crate::os::fd::owned::AsFd;
6   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/fd.rs:318:24
    |
318 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
6   | use crate::os::fd::owned::BorrowedFd;
6   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsRawFd` in this scope
   --> library/std/src/sys/unix/fd.rs:323:6
    |
323 | impl AsRawFd for FileDesc {
    |
help: consider importing this trait
    |
6   | use crate::os::fd::net::AsRawFd;
6   | use crate::os::fd::net::AsRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/fd.rs:324:28
    |
324 |     fn as_raw_fd(&self) -> RawFd {
    |
help: consider importing this type alias
    |
6   | use crate::os::fd::net::RawFd;
6   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `IntoRawFd` in this scope
   --> library/std/src/sys/unix/fd.rs:329:6
329 | impl IntoRawFd for FileDesc {
    |      ^^^^^^^^^ not found in this scope
    |
help: consider importing this trait
help: consider importing this trait
    |
6   | use crate::os::fd::net::IntoRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/fd.rs:330:29
    |
330 |     fn into_raw_fd(self) -> RawFd {
    |
help: consider importing this type alias
    |
6   | use crate::os::fd::net::RawFd;
6   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `FromRawFd` in this scope
   --> library/std/src/sys/unix/fd.rs:335:6
    |
335 | impl FromRawFd for FileDesc {
    |
help: consider importing this trait
    |
6   | use crate::os::fd::net::FromRawFd;
6   | use crate::os::fd::net::FromRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/fd.rs:336:35
    |
336 |     unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
    |
help: consider importing this type alias
    |
6   | use crate::os::fd::net::RawFd;
6   | use crate::os::fd::net::RawFd;
    |

error[E0433]: failed to resolve: use of undeclared type `FromRawFd`
   --> library/std/src/sys/unix/fd.rs:337:14
    |
337 |         Self(FromRawFd::from_raw_fd(raw_fd))
    |
help: consider importing this trait
    |
6   | use crate::os::fd::net::FromRawFd;
6   | use crate::os::fd::net::FromRawFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
    |
    |
954 | impl AsFd for File {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
    |
    |
955 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsRawFd` in this scope
    |
    |
960 | impl AsRawFd for File {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::AsRawFd;
1   | use crate::os::fd::net::AsRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/fs.rs:961:28
    |
961 |     fn as_raw_fd(&self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `IntoRawFd` in this scope
    |
966 | impl IntoRawFd for File {
    |      ^^^^^^^^^ not found in this scope
    |
---

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/fs.rs:967:29
    |
967 |     fn into_raw_fd(self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `FromRawFd` in this scope
   --> library/std/src/sys/unix/fs.rs:972:6
    |
972 | impl FromRawFd for File {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::FromRawFd;
1   | use crate::os::fd::net::FromRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/fs.rs:973:35
    |
973 |     unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0433]: failed to resolve: use of undeclared type `FromRawFd`
   --> library/std/src/sys/unix/fs.rs:974:14
    |
974 |         Self(FromRawFd::from_raw_fd(raw_fd))
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::FromRawFd;
1   | use crate::os::fd::net::FromRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/net.rs:441:29
    |
441 |     pub fn as_raw(&self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
    |
    |
464 | impl AsFd for Socket {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
    |
    |
465 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsRawFd` in this scope
    |
    |
470 | impl AsRawFd for Socket {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::AsRawFd;
1   | use crate::os::fd::net::AsRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/net.rs:471:28
    |
471 |     fn as_raw_fd(&self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `IntoRawFd` in this scope
    |
476 | impl IntoRawFd for Socket {
    |      ^^^^^^^^^ not found in this scope
    |
---

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/net.rs:477:29
    |
477 |     fn into_raw_fd(self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `FromRawFd` in this scope
   --> library/std/src/sys/unix/net.rs:482:6
    |
482 | impl FromRawFd for Socket {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::FromRawFd;
1   | use crate::os::fd::net::FromRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/net.rs:483:35
    |
483 |     unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0433]: failed to resolve: use of undeclared type `FromRawFd`
   --> library/std/src/sys/unix/net.rs:484:14
    |
484 |         Self(FromRawFd::from_raw_fd(raw_fd))
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::FromRawFd;
1   | use crate::os::fd::net::FromRawFd;
    |

error[E0405]: cannot find trait `AsRawFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:129:6
    |
129 | impl AsRawFd for AnonPipe {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::AsRawFd;
1   | use crate::os::fd::net::AsRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:130:28
    |
130 |     fn as_raw_fd(&self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:135:6
    |
135 | impl AsFd for AnonPipe {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:136:24
    |
136 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `IntoRawFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:141:6
    |
141 | impl IntoRawFd for AnonPipe {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::IntoRawFd;
1   | use crate::os::fd::net::IntoRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:142:29
    |
142 |     fn into_raw_fd(self) -> RawFd {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0405]: cannot find trait `FromRawFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:147:6
    |
147 | impl FromRawFd for AnonPipe {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::FromRawFd;
1   | use crate::os::fd::net::FromRawFd;
    |

error[E0412]: cannot find type `RawFd` in this scope
   --> library/std/src/sys/unix/pipe.rs:148:35
    |
148 |     unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
    |
help: consider importing this type alias
    |
1   | use crate::os::fd::net::RawFd;
1   | use crate::os::fd::net::RawFd;
    |

error[E0433]: failed to resolve: use of undeclared type `FromRawFd`
   --> library/std/src/sys/unix/pipe.rs:149:14
    |
149 |         Self(FromRawFd::from_raw_fd(raw_fd))
    |
help: consider importing this trait
    |
1   | use crate::os::fd::net::FromRawFd;
1   | use crate::os::fd::net::FromRawFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
  --> library/std/src/sys/unix/stdio.rs:96:6
   |
96 | impl AsFd for io::Stdin {
   |
help: consider importing this trait
   |
1  | use crate::os::fd::owned::AsFd;
1  | use crate::os::fd::owned::AsFd;
   |

error[E0412]: cannot find type `BorrowedFd` in this scope
  --> library/std/src/sys/unix/stdio.rs:98:24
   |
98 |     fn as_fd(&self) -> BorrowedFd<'_> {
   |
help: consider importing this struct
   |
1  | use crate::os::fd::owned::BorrowedFd;
1  | use crate::os::fd::owned::BorrowedFd;
   |

error[E0433]: failed to resolve: use of undeclared type `BorrowedFd`
  --> library/std/src/sys/unix/stdio.rs:99:18
   |
99 |         unsafe { BorrowedFd::borrow_raw_fd(libc::STDIN_FILENO) }
   |
help: consider importing this struct
   |
1  | use crate::os::fd::owned::BorrowedFd;
1  | use crate::os::fd::owned::BorrowedFd;
   |

error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:104:10
    |
104 | impl<'a> AsFd for io::StdinLock<'a> {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:106:24
    |
106 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0433]: failed to resolve: use of undeclared type `BorrowedFd`
   --> library/std/src/sys/unix/stdio.rs:107:18
    |
107 |         unsafe { BorrowedFd::borrow_raw_fd(libc::STDIN_FILENO) }
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:112:6
    |
112 | impl AsFd for io::Stdout {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:114:24
    |
114 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0433]: failed to resolve: use of undeclared type `BorrowedFd`
   --> library/std/src/sys/unix/stdio.rs:115:18
    |
115 |         unsafe { BorrowedFd::borrow_raw_fd(libc::STDOUT_FILENO) }
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:120:10
    |
120 | impl<'a> AsFd for io::StdoutLock<'a> {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:122:24
    |
122 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0433]: failed to resolve: use of undeclared type `BorrowedFd`
   --> library/std/src/sys/unix/stdio.rs:123:18
    |
123 |         unsafe { BorrowedFd::borrow_raw_fd(libc::STDOUT_FILENO) }
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:128:6
    |
128 | impl AsFd for io::Stderr {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:130:24
    |
130 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0433]: failed to resolve: use of undeclared type `BorrowedFd`
   --> library/std/src/sys/unix/stdio.rs:131:18
    |
131 |         unsafe { BorrowedFd::borrow_raw_fd(libc::STDERR_FILENO) }
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0405]: cannot find trait `AsFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:136:10
    |
136 | impl<'a> AsFd for io::StderrLock<'a> {
    |
help: consider importing this trait
    |
1   | use crate::os::fd::owned::AsFd;
1   | use crate::os::fd::owned::AsFd;
    |

error[E0412]: cannot find type `BorrowedFd` in this scope
   --> library/std/src/sys/unix/stdio.rs:138:24
    |
138 |     fn as_fd(&self) -> BorrowedFd<'_> {
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;
1   | use crate::os::fd::owned::BorrowedFd;
    |

error[E0433]: failed to resolve: use of undeclared type `BorrowedFd`
   --> library/std/src/sys/unix/stdio.rs:139:18
    |
139 |         unsafe { BorrowedFd::borrow_raw_fd(libc::STDERR_FILENO) }
    |
help: consider importing this struct
    |
1   | use crate::os::fd::owned::BorrowedFd;

@bors
Copy link
Contributor

bors commented Sep 11, 2021

💔 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 11, 2021
@GuillaumeGomez GuillaumeGomez deleted the rollup-xr98ra7 branch September 11, 2021 13:35
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.