Bug: Rust compile failure in 115.10.0 (rc2)
Status: UNCONFIRMED
Priority: --
Created: 2024-04-14 20:43:25+00:00
Resolved: 2024-05-25 13:37:28+00:00

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

Steps to reproduce:

The following build error occurs on FreeBSD 15-CURRENT with rust-1.77.0 installed.

     Running `CARGO=/usr/local/bin/cargo CARGO_CRATE_NAME=mdns_service 
CARGO_MANIFEST_DIR=/export/wrkdir/amd64/usr
/ports/mail/thunderbird/work/thunderbird-115.10.0/dom/media/webrtc/transport
/mdns_service CARGO_PKG_AUTHORS='Dan M
inor <dminor@mozilla.com>' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' 
CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICE
NSE_FILE='' CARGO_PKG_NAME=mdns_service CARGO_PKG_README='' 
CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARG
O_PKG_VERSION=0.1.1 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 
CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSIO
N_PRE='' LD_LIBRARY_PATH='/export/wrkdir/amd64/usr/ports/mail/thunderbird/wo
rk/.build/release/deps:/usr/local/lib'
 /usr/local/bin/rustc --crate-name mdns_service --edition=2018 
dom/media/webrtc/transport/mdns_service/src/lib.rs
--error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompa
t --diagnostic-width=114 --crate-type
lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C 
embed-bitcode=no -C metadata=894ec80d65a2e1eb -
C extra-filename=-894ec80d65a2e1eb --out-dir /export/wrkdir/amd64/usr/ports/
mail/thunderbird/work/.build/x86_64-un
known-freebsd/release/deps --target x86_64-unknown-freebsd -C 
linker=/export/wrkdir/amd64/usr/ports/mail/thunderbi
rd/work/thunderbird-115.10.0/build/cargo-linker -L 
dependency=/export/wrkdir/amd64/usr/ports/mail/thunderbird/work
/.build/x86_64-unknown-freebsd/release/deps -L dependency=/export/wrkdir/amd
64/usr/ports/mail/thunderbird/work/.bu
ild/release/deps --extern byteorder=/export/wrkdir/amd64/usr/ports/mail/thun
derbird/work/.build/x86_64-unknown-fre
ebsd/release/deps/libbyteorder-e1742701afaa1e83.rmeta --extern 
dns_parser=/export/wrkdir/amd64/usr/ports/mail/thun
derbird/work/.build/x86_64-unknown-freebsd/release/deps/libdns_parser-813018
e540cadd90.rmeta --extern gecko_profil
er=/export/wrkdir/amd64/usr/ports/mail/thunderbird/work/.build/x86_64-unknow
n-freebsd/release/deps/libgecko_profil
er-4ee41bbaea0c96b6.rmeta --extern log=/export/wrkdir/amd64/usr/ports/mail/t
hunderbird/work/.build/x86_64-unknown-
freebsd/release/deps/liblog-1530d20d7812c073.rmeta --extern 
socket2=/export/wrkdir/amd64/usr/ports/mail/thunderbir
d/work/.build/x86_64-unknown-freebsd/release/deps/libsocket2-68d43f91c15b301
f.rmeta --extern uuid=/export/wrkdir/a
md64/usr/ports/mail/thunderbird/work/.build/x86_64-unknown-freebsd/release/d
eps/libuuid-2c3651165594b1c4.rmeta -C
force-frame-pointers=yes --cap-lints warn -Cembed-bitcode=yes -C 
codegen-units=1`
error[E0412]: cannot find type `_Pred` in this scope
     --> /export/wrkdir/amd64/usr/ports/mail/thunderbird/work/.build/x86_64-
unknown-freebsd/release/build/style-5fb673490cc43b88/out/gecko/structs.rs:34
497:49
      |
34497 |                 pub _base: root::std::__1::_And<_Pred>,
      |                                                 ^^^^^ not found in 
this scope
      |
help: you might be missing a type parameter
      |
34496 |             pub struct tuple__EnableUTypesCtor<_Pred> {
      |                                               +++++++

rustc --explain tells me:

bob$ rustc --explain E0412 
A used type name is not in scope.

Erroneous code examples:

impl Something {} // error: type name `Something` is not in scope

// or:

trait Foo {
    fn bar(N); // error: type name `N` is not in scope
}

// or:

fn foo(x: T) {} // type name `T` is not in scope

To fix this error, please verify you didn't misspell the type name, you did 
declare
it or imported it into the scope. Examples:

struct Something;

impl Something {} // ok!

// or:

trait Foo {
    type N;

    fn bar(_: Self::N); // ok!
}

// or:

fn foo<T>(x: T) {} // ok!

Another case that causes this error is when a type is imported into a 
parent module.
To fix this, you can follow the suggestion and use File directly or use
super::File; which will import the types from the parent namespace. An 
example
that causes this error is below:

use std::fs::File;

mod foo {
    fn some_function(f: File) {}
}

use std::fs::File;

mod foo {
    // either
    use super::File;
    // or
    // use std::fs::File;
    fn foo(f: File) {}
}
bob$



Actual results:

The following build error occurs on FreeBSD 15-CURRENT with rust-1.77.0 installed.

     Running `CARGO=/usr/local/bin/cargo CARGO_CRATE_NAME=mdns_service 
CARGO_MANIFEST_DIR=/export/wrkdir/amd64/usr
/ports/mail/thunderbird/work/thunderbird-115.10.0/dom/media/webrtc/transport
/mdns_service CARGO_PKG_AUTHORS='Dan M
inor <dminor@mozilla.com>' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' 
CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICE
NSE_FILE='' CARGO_PKG_NAME=mdns_service CARGO_PKG_README='' 
CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARG
O_PKG_VERSION=0.1.1 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 
CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSIO
N_PRE='' LD_LIBRARY_PATH='/export/wrkdir/amd64/usr/ports/mail/thunderbird/wo
rk/.build/release/deps:/usr/local/lib'
 /usr/local/bin/rustc --crate-name mdns_service --edition=2018 
dom/media/webrtc/transport/mdns_service/src/lib.rs
--error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompa
t --diagnostic-width=114 --crate-type
lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C 
embed-bitcode=no -C metadata=894ec80d65a2e1eb -
C extra-filename=-894ec80d65a2e1eb --out-dir /export/wrkdir/amd64/usr/ports/
mail/thunderbird/work/.build/x86_64-un
known-freebsd/release/deps --target x86_64-unknown-freebsd -C 
linker=/export/wrkdir/amd64/usr/ports/mail/thunderbi
rd/work/thunderbird-115.10.0/build/cargo-linker -L 
dependency=/export/wrkdir/amd64/usr/ports/mail/thunderbird/work
/.build/x86_64-unknown-freebsd/release/deps -L dependency=/export/wrkdir/amd
64/usr/ports/mail/thunderbird/work/.bu
ild/release/deps --extern byteorder=/export/wrkdir/amd64/usr/ports/mail/thun
derbird/work/.build/x86_64-unknown-fre
ebsd/release/deps/libbyteorder-e1742701afaa1e83.rmeta --extern 
dns_parser=/export/wrkdir/amd64/usr/ports/mail/thun
derbird/work/.build/x86_64-unknown-freebsd/release/deps/libdns_parser-813018
e540cadd90.rmeta --extern gecko_profil
er=/export/wrkdir/amd64/usr/ports/mail/thunderbird/work/.build/x86_64-unknow
n-freebsd/release/deps/libgecko_profil
er-4ee41bbaea0c96b6.rmeta --extern log=/export/wrkdir/amd64/usr/ports/mail/t
hunderbird/work/.build/x86_64-unknown-
freebsd/release/deps/liblog-1530d20d7812c073.rmeta --extern 
socket2=/export/wrkdir/amd64/usr/ports/mail/thunderbir
d/work/.build/x86_64-unknown-freebsd/release/deps/libsocket2-68d43f91c15b301
f.rmeta --extern uuid=/export/wrkdir/a
md64/usr/ports/mail/thunderbird/work/.build/x86_64-unknown-freebsd/release/d
eps/libuuid-2c3651165594b1c4.rmeta -C
force-frame-pointers=yes --cap-lints warn -Cembed-bitcode=yes -C 
codegen-units=1`
error[E0412]: cannot find type `_Pred` in this scope
     --> /export/wrkdir/amd64/usr/ports/mail/thunderbird/work/.build/x86_64-
unknown-freebsd/release/build/style-5fb673490cc43b88/out/gecko/structs.rs:34
497:49
      |
34497 |                 pub _base: root::std::__1::_And<_Pred>,
      |                                                 ^^^^^ not found in 
this scope
      |
help: you might be missing a type parameter
      |
34496 |             pub struct tuple__EnableUTypesCtor<_Pred> {
      |                                               +++++++

rustc --explain tells me:

bob$ rustc --explain E0412 
A used type name is not in scope.

Erroneous code examples:

impl Something {} // error: type name `Something` is not in scope

// or:

trait Foo {
    fn bar(N); // error: type name `N` is not in scope
}

// or:

fn foo(x: T) {} // type name `T` is not in scope

To fix this error, please verify you didn't misspell the type name, you did 
declare
it or imported it into the scope. Examples:

struct Something;

impl Something {} // ok!

// or:

trait Foo {
    type N;

    fn bar(_: Self::N); // ok!
}

// or:

fn foo<T>(x: T) {} // ok!

Another case that causes this error is when a type is imported into a 
parent module.
To fix this, you can follow the suggestion and use File directly or use
super::File; which will import the types from the parent namespace. An 
example
that causes this error is below:

use std::fs::File;

mod foo {
    fn some_function(f: File) {}
}

use std::fs::File;

mod foo {
    // either
    use super::File;
    // or
    // use std::fs::File;
    fn foo(f: File) {}
}
bob$



Expected results:

It should have built correctly.