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

[experiment] Set never type fallback = ! #123482

Conversation

WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Apr 5, 2024

@rustbot rustbot added 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. labels Apr 5, 2024
@WaffleLapkin WaffleLapkin added the F-never_type `#![feature(never_type)]` label Apr 5, 2024
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 29.5s done
#16 DONE 41.0s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---

---- [ui] tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): Add<A>` is not satisfied
+ error[E0277]: the trait bound `!: Add<A>` is not satisfied
3    |
3    |
4 LL |     r = r + a;

-    |           ^ the trait `Add<A>` is not implemented for `()`
+    |           ^ the trait `Add<A>` is not implemented for `!`
7 help: this trait has no implementations, consider adding one
8   --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:15:1


---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-ICE-when-projecting-out-of-err/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `!: Add<A>` is not satisfied
   |
   |
LL |     r = r + a;
   |           ^ the trait `Add<A>` is not implemented for `!`
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs:15:1
   |
   |
LL | trait Add<RHS=Self> {

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
---

error[E0282]: type annotations needed
##[error]  --> /checkout/tests/ui/async-await/async-error-span.rs:13:9
   |
LL |     let a; //~ ERROR type annotations needed
   |
   |
help: consider giving `a` an explicit type
   |
LL |     let a: /* Type */; //~ ERROR type annotations needed

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0282.
Some errors have detailed explanations: E0277, E0282.
For more information about an error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#nofallback stdout ----

error in revision `nofallback`: ui test compiled successfully!
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/coercion/coerce-issue-49593-box-never.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coercion/coerce-issue-49593-box-never.nofallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coercion/coerce-issue-49593-box-never.nofallback/auxiliary"
stderr: none


---- [ui] tests/ui/consts/try-operator.rs stdout ----
---- [ui] tests/ui/consts/try-operator.rs stdout ----
diff of stderr:

4 LL | #![feature(const_convert)]
5    |            ^^^^^^^^^^^^^
6 
- error[E0015]: `?` cannot determine the branch of `Result<(), ()>` in constant functions
+ error[E0015]: `?` cannot determine the branch of `Result<!, ()>` in constant functions
9    |
10 LL |         Err(())?;


32 LL + #![feature(effects)]
34 
34 
- error[E0015]: `?` cannot determine the branch of `Option<()>` in constant functions
+ error[E0015]: `?` cannot determine the branch of `Option<!>` in constant functions
37    |
38 LL |         None?;


---
   |
LL | #![feature(const_convert)]
   |            ^^^^^^^^^^^^^

error[E0015]: `?` cannot determine the branch of `Result<!, ()>` in constant functions
   |
LL |         Err(())?;
   |         ^^^^^^^^
   |
   |
note: impl defined here, but it is not `const`
  --> /rustc/FAKE_PREFIX/library/core/src/result.rs:1940:1
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
   |
LL + #![feature(effects)]


error[E0015]: `?` cannot convert from residual of `Result<bool, ()>` in constant functions
   |
LL |         Err(())?;
   |         ^^^^^^^^
   |
   |
note: impl defined here, but it is not `const`
  --> /rustc/FAKE_PREFIX/library/core/src/result.rs:1959:1
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
   |
LL + #![feature(effects)]


error[E0015]: `?` cannot determine the branch of `Option<!>` in constant functions
   |
LL |         None?;
   |         ^^^^^
   |
   |
note: impl defined here, but it is not `const`
  --> /rustc/FAKE_PREFIX/library/core/src/option.rs:2443:1
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
   |
LL + #![feature(effects)]


error[E0015]: `?` cannot convert from residual of `Option<()>` in constant functions
   |
LL |         None?;
   |         ^^^^^
   |
   |
note: impl defined here, but it is not `const`
  --> /rustc/FAKE_PREFIX/library/core/src/option.rs:2462:1
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
   |
LL + #![feature(effects)]

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0015, E0635.
---

124 LL |     reuse to_reuse::opaque_ret;
125    |                     ^^^^^^^^^^
126 
+ error[E0277]: the trait bound `!: opaque::Trait` is not satisfied
+    |
+    |
+ LL |         pub fn opaque_ret() -> impl Trait { unimplemented!() }
+    |                                ^^^^^^^^^^ the trait `opaque::Trait` is not implemented for `!`
+    = help: the trait `opaque::Trait` is implemented for `()`
+    = help: the trait `opaque::Trait` is implemented for `()`
+    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
+    = help: did you intend to use the type `()` here instead?
127 error: delegation to unsafe functions is not supported yet
128   --> $DIR/not-supported.rs:88:21
129    |

---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/delegation/not-supported.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/delegation/not-supported" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/delegation/not-supported/auxiliary"
stdout: none
--- stderr -------------------------------
error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn bar(&self, x: T) -> T { x }
   |         ------------------------ callee defined here
LL |         reuse GenericTrait::bar;
   |                             ^^^


error: delegation with early bound generics is not supported yet
   |
LL |         fn bar1() {}
   |         --------- callee defined here
...
...
LL |         reuse GenericTrait::bar1;
   |                             ^^^^

error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn bar(&self, x: T) -> T { x }
   |         ------------------------ callee defined here
...
LL |         reuse <F as GenericTrait<T>>::bar { &self.0 }


error: delegation with early bound generics is not supported yet
   |
LL |         fn bar1() {}
   |         --------- callee defined here
...
...
LL |         reuse GenericTrait::<T>::bar1;
   |                                  ^^^^

error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn bar(&self, x: T) -> T { x }
   |         ------------------------ callee defined here
...
LL |         reuse GenericTrait::bar { &F }


error: delegation with early bound generics is not supported yet
   |
LL |         fn bar1() {}
   |         --------- callee defined here
...
...
LL |         reuse GenericTrait::bar1;
   |                             ^^^^

error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn foo(&self, x: i32) -> i32 { x }
   |         ---------------------------- callee defined here
LL |         reuse Trait::foo;
   |                      ^^^


error[E0049]: method `foo2` has 0 type parameters but its trait declaration has 1 type parameter
   |
   |
LL |         fn foo2<T>(&self, x: T) -> T { x }
   |                 - expected 1 type parameter
LL |         reuse Trait::foo2 { &self.0 }
   |                      ^^^^ found 0 type parameters


error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn foo3<'a: 'a>(_: &'a u32) {}
   |         --------------------------- callee defined here
...
LL |         reuse <F as Trait>::foo3;


error[E0195]: lifetime parameters or bounds on method `foo3` do not match the trait declaration
   |
   |
LL |         fn foo3<'a: 'a>(_: &'a u32) {}
   |                -------- lifetimes in impl do not match this method in trait
...
LL |         reuse <F as Trait>::foo3;
   |                             ^^^^ lifetimes do not match method in trait

error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn foo(&self, x: i32) -> i32 { x }
   |         ---------------------------- callee defined here
LL |         reuse Trait::foo { &self.0 }
   |                      ^^^


error: delegation with early bound generics is not supported yet
   |
   |
LL |         fn foo2<T>(&self, x: T) -> T { x }
   |         ---------------------------- callee defined here
LL |         reuse Trait::foo2 { &self.0 }
   |                      ^^^^


error: delegation with early bound generics is not supported yet
   |
   |
LL |         pub fn opaque_arg(_: impl Trait) -> i32 { 0 }
   |         --------------------------------------- callee defined here
LL |     reuse to_reuse::opaque_arg;
   |                     ^^^^^^^^^^

error: delegation to a function with opaque type is not supported yet
error: delegation to a function with opaque type is not supported yet
##[error]  --> /checkout/tests/ui/delegation/not-supported.rs:76:21
   |
LL |         pub fn opaque_ret() -> impl Trait { unimplemented!() }
   |         --------------------------------- callee defined here
LL |     reuse to_reuse::opaque_ret;
   |                     ^^^^^^^^^^


error[E0277]: the trait bound `!: opaque::Trait` is not satisfied
   |
   |
LL |         pub fn opaque_ret() -> impl Trait { unimplemented!() }
   |                                ^^^^^^^^^^ the trait `opaque::Trait` is not implemented for `!`
   = help: the trait `opaque::Trait` is implemented for `()`
   = help: the trait `opaque::Trait` is implemented for `()`
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
error: delegation to unsafe functions is not supported yet
##[error]  --> /checkout/tests/ui/delegation/not-supported.rs:88:21
   |
LL |         pub unsafe fn unsafe_fn() {}
LL |         pub unsafe fn unsafe_fn() {}
   |         ------------------------- callee defined here
...
LL |     reuse to_reuse::unsafe_fn;
   |                     ^^^^^^^^^

error: delegation to non Rust ABI functions is not supported yet
   |
LL |         pub extern "C" fn extern_fn() {}
   |         ----------------------------- callee defined here
...
...
LL |     reuse to_reuse::extern_fn;
   |                     ^^^^^^^^^

error: delegation to variadic functions is not supported yet
##[error]  --> /checkout/tests/ui/delegation/not-supported.rs:92:21
   |
LL |         pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {}
   |         ------------------------------------------------------------- callee defined here
LL |     reuse to_reuse::variadic_fn;
   |                     ^^^^^^^^^^^

error: delegation to const functions is not supported yet
---

---- [ui] tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs#edition2021 stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
+ error[E0277]: the trait bound `!: AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
3    |
3    |
4 LL | fn ice() -> impl AsRef<Fn(&())> {

-    |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
+    |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `!`
7 error[E0782]: trait objects must include the `dyn` keyword
8   --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-trait/generic-with-implicit-hrtb-without-dyn.rs`

error in revision `edition2021`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "edition2021" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021/auxiliary" "--edition=2021"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
   |
   |
LL | fn ice() -> impl AsRef<Fn(&())> {
   |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `!`
error[E0782]: trait objects must include the `dyn` keyword
##[error]  --> /checkout/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs:6:24
   |
   |
LL | fn ice() -> impl AsRef<Fn(&())> {
   |
   |
help: add `dyn` keyword before this trait
   |
LL | fn ice() -> impl AsRef<dyn Fn(&())> {

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0782.
Some errors have detailed explanations: E0277, E0782.
For more information about an error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs#edition2015 stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
+ error[E0277]: the trait bound `!: AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
3    |
3    |
4 LL | fn ice() -> impl AsRef<Fn(&())> {

-    |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
+    |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `!`
7 error: aborting due to 1 previous error
8 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015/generic-with-implicit-hrtb-without-dyn.edition2015.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-trait/generic-with-implicit-hrtb-without-dyn.rs`

error in revision `edition2015`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "edition2015" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
   |
   |
LL | fn ice() -> impl AsRef<Fn(&())> {
   |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `!`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
---
- error[E0277]: `()` is not an iterator
+ error[E0277]: `!` is not an iterator
2   --> $DIR/issue-72911.rs:16:20
3    |
4 LL | fn lint_files() -> impl Iterator<Item = foo::MissingItem> {
-    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator
+    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `!` is not an iterator
6    |
-    = help: the trait `Iterator` is not implemented for `()`
---
To only update this specific test, also pass `--test-args impl-trait/issue-72911.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/issue-72911.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/issue-72911" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/issue-72911/auxiliary"
--- stderr -------------------------------
error[E0277]: `!` is not an iterator
##[error]  --> /checkout/tests/ui/impl-trait/issue-72911.rs:16:20
   |
   |
LL | fn lint_files() -> impl Iterator<Item = foo::MissingItem> {
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `!` is not an iterator
   = help: the trait `Iterator` is not implemented for `!`

error[E0433]: failed to resolve: use of undeclared crate or module `foo`
##[error]  --> /checkout/tests/ui/impl-trait/issue-72911.rs:11:33
##[error]  --> /checkout/tests/ui/impl-trait/issue-72911.rs:11:33
   |
LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator<Item = Lint> {

error[E0433]: failed to resolve: use of undeclared crate or module `foo`
##[error]  --> /checkout/tests/ui/impl-trait/issue-72911.rs:16:41
   |
   |
LL | fn lint_files() -> impl Iterator<Item = foo::MissingItem> {

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0277, E0433.
---
diff of stderr:

11   --> $DIR/early_bound.rs:3:29
12    |
13 LL | fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
-    |                             ^^^^^^^^^^^^^^^ expected `&()`, got `()`
+    |                             ^^^^^^^^^^^^^^^ expected `&()`, got `!`
16 note: previous use here
17   --> $DIR/early_bound.rs:7:36


---
--- stderr -------------------------------
error[E0792]: expected generic lifetime parameter, found `'_`
##[error]  --> /checkout/tests/ui/impl-trait/rpit/early_bound.rs:7:17
   |
LL | fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
   |                                          -- this generic parameter must be used with a generic lifetime parameter
...
LL |         let _ = identity::<&'a ()>(test(false));

error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/impl-trait/rpit/early_bound.rs:3:29
   |
   |
LL | fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
   |                             ^^^^^^^^^^^^^^^ expected `&()`, got `!`
note: previous use here
  --> /checkout/tests/ui/impl-trait/rpit/early_bound.rs:7:36
   |
   |
LL |         let _ = identity::<&'a ()>(test(false));

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0792`.
For more information about this error, try `rustc --explain E0792`.
------------------------------------------


---- [ui] tests/ui/never_type/diverging-fallback-control-flow.rs#fallback stdout ----

error in revision `fallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/diverging-fallback-control-flow.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "fallback" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-control-flow.fallback/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-control-flow.fallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: UnitDefault` is not satisfied
   |
LL |         x = UnitDefault::default();
   |             ^^^^^^^^^^^^^^^^^^^^^^ the trait `UnitDefault` is not implemented for `!`
   |
   |
   = help: the following other types implement trait `UnitDefault`:
             ()
             u32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?

error[E0277]: the trait bound `!: UnitDefault` is not satisfied
   |
LL |         x = UnitDefault::default();
   |             ^^^^^^^^^^^^^^^^^^^^^^ the trait `UnitDefault` is not implemented for `!`
   |
   |
   = help: the following other types implement trait `UnitDefault`:
             ()
             u32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#fallback stdout ----

error in revision `fallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/diverging-fallback-unconstrained-return.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "fallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-unconstrained-return.fallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-unconstrained-return.fallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: UnitReturn` is not satisfied
   |
   |
LL |     let _ = if true { unconstrained_return() } else { panic!() };
   |                       ^^^^^^^^^^^^^^^^^^^^^^ the trait `UnitReturn` is not implemented for `!`
   = help: the following other types implement trait `UnitReturn`:
             ()
             i32
             i32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
  --> /checkout/tests/ui/never_type/diverging-fallback-unconstrained-return.rs:20:28
   |
   |
LL | fn unconstrained_return<T: UnitReturn>() -> T {

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
For more information about this error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/never_type/defaulted-never-note.rs#nofallback stdout ----

error in revision `nofallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/defaulted-never-note.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/defaulted-never-note.nofallback/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/defaulted-never-note.nofallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied
   |
LL |     foo(_x);
LL |     foo(_x);
   |     --- ^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!`
   |     required by a bound introduced by this call
   |
   |
   = help: the trait `ImplementedForUnitButNotNever` is implemented for `()`
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
note: required by a bound in `foo`
   |
   |
LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/diverging-fallback-control-flow.rs#nofallback stdout ----

error in revision `nofallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/diverging-fallback-control-flow.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-control-flow.nofallback/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-control-flow.nofallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: UnitDefault` is not satisfied
   |
LL |         x = UnitDefault::default();
   |             ^^^^^^^^^^^^^^^^^^^^^^ the trait `UnitDefault` is not implemented for `!`
   |
   |
   = help: the following other types implement trait `UnitDefault`:
             ()
             u32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?

error[E0277]: the trait bound `!: UnitDefault` is not satisfied
   |
LL |         x = UnitDefault::default();
   |             ^^^^^^^^^^^^^^^^^^^^^^ the trait `UnitDefault` is not implemented for `!`
   |
   |
   = help: the following other types implement trait `UnitDefault`:
             ()
             u32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#nofallback stdout ----

error in revision `nofallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/diverging-fallback-unconstrained-return.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-unconstrained-return.nofallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-unconstrained-return.nofallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: UnitReturn` is not satisfied
   |
   |
LL |     let _ = if true { unconstrained_return() } else { panic!() };
   |                       ^^^^^^^^^^^^^^^^^^^^^^ the trait `UnitReturn` is not implemented for `!`
   = help: the following other types implement trait `UnitReturn`:
             ()
             i32
             i32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
  --> /checkout/tests/ui/never_type/diverging-fallback-unconstrained-return.rs:20:28
   |
   |
LL | fn unconstrained_return<T: UnitReturn>() -> T {

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
For more information about this error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/never_type/diverging-fallback-no-leak.rs#nofallback stdout ----

error in revision `nofallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/diverging-fallback-no-leak.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-no-leak.nofallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/diverging-fallback-no-leak.nofallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: Test` is not satisfied
   |
LL |     unconstrained_arg(return);
   |     ----------------- ^^^^^^ the trait `Test` is not implemented for `!`
   |     |
   |     |
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `Test`:
             ()
             i32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
  --> /checkout/tests/ui/never_type/diverging-fallback-no-leak.rs:12:25
   |
   |
LL | fn unconstrained_arg<T: Test>(_: T) {}

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
For more information about this error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/never_type/fallback-closure-ret.rs#nofallback stdout ----

error in revision `nofallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/fallback-closure-ret.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/fallback-closure-ret.nofallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/fallback-closure-ret.nofallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: Bar` is not satisfied
   |
   |
LL |     foo(|| panic!());
   |     ^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `!`
   = help: the following other types implement trait `Bar`:
             ()
             u32
             u32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
note: required by a bound in `foo`
   |
   |
LL | fn foo<R: Bar>(_: impl Fn() -> R) {}
   |           ^^^ required by this bound in `foo`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/fallback-closure-wrap.rs#nofallback stdout ----

error in revision `nofallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/fallback-closure-wrap.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/fallback-closure-wrap.nofallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/fallback-closure-wrap.nofallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0271]: expected `{closure@fallback-closure-wrap.rs:18:40}` to be a closure that returns `()`, but it returns `!`
   |
LL |       let error = Closure::wrap(Box::new(move || {
   |  _______________________________^
   |  _______________________________^
LL | |         //[fallback]~^ to be a closure that returns `()`, but it returns `!`
LL | |         panic!("Can't connect to server.");
LL | |     }) as Box<dyn FnMut()>);
   | |______^ expected `()`, found `!`
   = note: expected unit type `()`
                   found type `!`
                   found type `!`
   = note: required for the cast from `Box<{closure@/checkout/tests/ui/never_type/fallback-closure-wrap.rs:18:40: 18:47}>` to `Box<dyn FnMut()>`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0271`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/fallback-closure-ret.rs#fallback stdout ----

error in revision `fallback`: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/fallback-closure-ret.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "fallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/fallback-closure-ret.fallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/fallback-closure-ret.fallback/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `!: Bar` is not satisfied
   |
   |
LL |     foo(|| panic!());
   |     ^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `!`
   = help: the following other types implement trait `Bar`:
             ()
             u32
             u32
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
note: required by a bound in `foo`
   |
   |
LL | fn foo<R: Bar>(_: impl Fn() -> R) {}
   |           ^^^ required by this bound in `foo`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/feature-gate-never_type_fallback.rs stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): T` is not satisfied
+ error[E0277]: the trait bound `!: T` is not satisfied
3    |
4 LL |     foo(panic!())

5    |     --- ^^^^^^^^
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/feature-gate-never_type_fallback.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/feature-gate-never_type_fallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/feature-gate-never_type_fallback/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `!: T` is not satisfied
   |
   |
LL |     foo(panic!()) //~ ERROR
   |     |   |
   |     |   the trait `T` is not implemented for `!`
   |     |   this tail expression is of type `!`
   |     required by a bound introduced by this call
---
   | ^^^^^^^
note: required by a bound in `foo`
  --> /checkout/tests/ui/never_type/feature-gate-never_type_fallback.rs:13:16
   |
LL | fn foo(_: impl T) {}
   |                ^ required by this bound in `foo`
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/impl_trait_fallback.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `!: T` is not satisfied
   |
LL | fn should_ret_unit() -> impl T {
   |                         ^^^^^^ the trait `T` is not implemented for `!`
   |
   |
   = help: the trait `T` is implemented for `()`
   = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
   = help: did you intend to use the type `()` here instead?
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/impl_trait_fallback2.rs stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): T` is not satisfied
+ error[E0277]: the trait bound `!: T` is not satisfied
3    |
4 LL | fn should_ret_unit() -> impl T {

-    |                         ^^^^^^ the trait `T` is not implemented for `()`
-    |                         ^^^^^^ the trait `T` is not implemented for `()`
+    |                         ^^^^^^ the trait `T` is not implemented for `!`
6    |
7    = help: the trait `T` is implemented for `i32`
8 

- error[E0277]: the trait bound `(): T` is not satisfied
+ error[E0277]: the trait bound `!: T` is not satisfied
11    |
12 LL | fn a() -> Foo {

-    |           ^^^ the trait `T` is not implemented for `()`
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/impl_trait_fallback2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback2/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `!: T` is not satisfied
   |
LL | fn should_ret_unit() -> impl T {
   |                         ^^^^^^ the trait `T` is not implemented for `!`
   |
   |
   = help: the trait `T` is implemented for `i32`

error[E0277]: the trait bound `!: T` is not satisfied
   |
LL | fn a() -> Foo {
   |           ^^^ the trait `T` is not implemented for `!`
   |
---

---- [ui] tests/ui/never_type/impl_trait_fallback3.rs stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): T` is not satisfied
+ error[E0277]: the trait bound `!: T` is not satisfied
3    |
4 LL | fn a() -> Foo {

-    |           ^^^ the trait `T` is not implemented for `()`
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/impl_trait_fallback3.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback3" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback3/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `!: T` is not satisfied
   |
LL | fn a() -> Foo {
   |           ^^^ the trait `T` is not implemented for `!`
   |
---

---- [ui] tests/ui/never_type/impl_trait_fallback4.rs stdout ----
diff of stderr:

- error[E0277]: the trait bound `(): T` is not satisfied
+ error[E0277]: the trait bound `!: T` is not satisfied
3    |
4 LL | fn foo() -> impl T {

-    |             ^^^^^^ the trait `T` is not implemented for `()`
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/impl_trait_fallback4.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback4" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/impl_trait_fallback4/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `!: T` is not satisfied
   |
LL | fn foo() -> impl T {
   |             ^^^^^^ the trait `T` is not implemented for `!`
   |
---
- error[E0277]: cannot add `()` to `usize`
+ error[E0277]: cannot add `!` to `usize`
2   --> $DIR/issue-13352.rs:7:13
3    |
4 LL |     2_usize + (loop {});
-    |             ^ no implementation for `usize + ()`
+    |             ^ no implementation for `usize + !`
6    |
6    |
-    = help: the trait `Add<()>` is not implemented for `usize`
+    = help: the trait `Add<!>` is not implemented for `usize`
8    = help: the following other types implement trait `Add<Rhs>`:
9              <&'a usize as Add<usize>>
10              <&usize as Add<&usize>>

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

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/issue-13352.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-13352" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-13352/auxiliary"
--- stderr -------------------------------
error[E0277]: cannot add `!` to `usize`
##[error]  --> /checkout/tests/ui/never_type/issue-13352.rs:7:13
   |
   |
LL |     2_usize + (loop {});
   |             ^ no implementation for `usize + !`
   |
   = help: the trait `Add<!>` is not implemented for `usize`
   = help: the following other types implement trait `Add<Rhs>`:
             <&'a usize as Add<usize>>
             <&usize as Add<&usize>>
             <usize as Add<&usize>>
             <usize as Add>
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/never_type/never-value-fallback-issue-66757.rs#nofallback stdout ----

error in revision `nofallback`: ui test compiled successfully!
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/never-value-fallback-issue-66757.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "nofallback" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/never-value-fallback-issue-66757.nofallback" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/never-value-fallback-issue-66757.nofallback/auxiliary"
stderr: none


---- [ui] tests/ui/never_type/issue-2149.rs stdout ----
---- [ui] tests/ui/never_type/issue-2149.rs stdout ----
diff of stderr:

- error[E0277]: cannot add `Vec<B>` to `()`
+ error[E0277]: cannot add `Vec<B>` to `!`
3    |
3    |
4 LL |         for elt in self { r = r + f(*elt); }

-    |                                 ^ no implementation for `() + Vec<B>`
+    |                                 ^ no implementation for `! + Vec<B>`
6    |
-    = help: the trait `Add<Vec<B>>` is not implemented for `()`
+    = help: the trait `Add<Vec<B>>` is not implemented for `!`
8 
9 error[E0599]: no method named `bind` found for array `[&str; 1]` in the current scope


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

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/never_type/issue-2149.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-2149" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/never_type/issue-2149/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: cannot add `Vec<B>` to `!`
   |
   |
LL |         for elt in self { r = r + f(*elt); }
   |                                 ^ no implementation for `! + Vec<B>`
   |
   = help: the trait `Add<Vec<B>>` is not implemented for `!`

error[E0599]: no method named `bind` found for array `[&str; 1]` in the current scope
   |
   |
LL |     ["hi"].bind(|x| [x] );
   |            ^^^^ method not found in `[&str; 1]`
   = help: items from traits can only be used if the trait is implemented and in scope
   = help: items from traits can only be used if the trait is implemented and in scope
note: `VecMonad` defines an item `bind`, perhaps you need to implement it
   |
   |
LL | trait VecMonad<A> {

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0599.
---

13 LL | #![deny(unreachable_code)]
14    |         ^^^^^^^^^^^^^^^^
15 
- error[E0605]: non-primitive cast: `()` as `!`
-    |
-    |
- LL |     let x = {return} as !;
-    |             ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
21 
- error: aborting due to 2 previous errors
- 
- For more information about this error, try `rustc --explain E0605`.
---
--- stderr -------------------------------
error: unreachable expression
##[error]  --> /checkout/tests/ui/reachable/expr_cast.rs:9:13
   |
LL |     let x = {return} as !; //~ ERROR unreachable
   |             ^------^^^^^^
   |             ||
   |             |any code following this expression is unreachable
   |             unreachable expression
note: the lint level is defined here
  --> /checkout/tests/ui/reachable/expr_cast.rs:4:9
   |
LL | #![deny(unreachable_code)]
---
- warning: 1 warning emitted
+ warning: unreachable pattern
+   --> $DIR/protect-precedences.rs:13:16
+    |
+ LL |         if let _ = return true && false {};
+    |
+    = note: `#[warn(unreachable_patterns)]` on by default
+ 
+ warning: 2 warnings emitted
---
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2497-if-let-chains/protect-precedences/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2497-if-let-chains/protect-precedences/auxiliary"
stdout: none
--- stderr -------------------------------
warning: unreachable block in `if` or `while` expression
   |
   |
LL |         if let _ = return true && false {};
   |                    -------------------- ^^ unreachable block in `if` or `while` expression
   |                    any code following this expression is unreachable
   |
   = note: `#[warn(unreachable_code)]` on by default


warning: unreachable pattern
##[warning]  --> /checkout/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.rs:13:16
   |
LL |         if let _ = return true && false {};
   |
   = note: `#[warn(unreachable_patterns)]` on by default

warning: 2 warnings emitted
---

2   --> $DIR/different_defining_uses_never_type.rs:12:13
3    |
4 LL | fn bar() -> Foo {
-    |             ^^^ expected `&'static str`, got `()`
+    |             ^^^ expected `&'static str`, got `!`
7 note: previous use here
8   --> $DIR/different_defining_uses_never_type.rs:9:5


---
--- stderr -------------------------------
error: concrete type differs from previous defining opaque type use
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/different_defining_uses_never_type.rs:12:13
   |
LL | fn bar() -> Foo { //~ ERROR: concrete type differs from previous defining opaque type use
   |             ^^^ expected `&'static str`, got `!`
note: previous use here
  --> /checkout/tests/ui/type-alias-impl-trait/different_defining_uses_never_type.rs:9:5
   |
LL |     ""

@WaffleLapkin
Copy link
Member Author

@bors try

@WaffleLapkin WaffleLapkin marked this pull request as draft April 5, 2024 00:28
@bors
Copy link
Contributor

bors commented Apr 5, 2024

⌛ Trying commit 1868b33 with merge 2d84f27...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2024
…self, r=<try>

[experiment] Set never type fallback = `!`

r? ghost
cc `@traviscross`
@bors
Copy link
Contributor

bors commented Apr 5, 2024

☀️ Try build successful - checks-actions
Build commit: 2d84f27 (2d84f2737f3bd9ebfcb07f75aa198d6cf7c715d2)

@WaffleLapkin
Copy link
Member Author

@craterbot run start=master#385fa9d845dd326c6bbfd58c22244215e431948a end=try#2d84f2737f3bd9ebfcb07f75aa198d6cf7c715d2 mode=check-only name=never-type-fallback-to-never list:https://crater-reports.s3.amazonaws.com/no-never-type-fallback/retry-regressed-list.txt

(using #122955's regressions as the crate list, since this can only break things that #122955 broke)

@craterbot
Copy link
Collaborator

🚨 Error: failed to parse the command

🆘 If you have any trouble with Crater please ping @rust-lang/infra!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@WaffleLapkin
Copy link
Member Author

@craterbot run start=master#385fa9d845dd326c6bbfd58c22244215e431948a end=try#2d84f2737f3bd9ebfcb07f75aa198d6cf7c715d2 mode=check-only name=never-type-fallback-to-never crates=https://crater-reports.s3.amazonaws.com/no-never-type-fallback/retry-regressed-list.txt

(using #122955 regressions as the crate list, since this can only break things that #122955 broke)

@craterbot
Copy link
Collaborator

👌 Experiment never-type-fallback-to-never created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 5, 2024
@craterbot
Copy link
Collaborator

🚧 Experiment never-type-fallback-to-never is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment never-type-fallback-to-never is completed!
📊 1822 regressed and 0 fixed (97965 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 5, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 18, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 18, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Apr 18, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2024
Rollup merge of rust-lang#123571 - WaffleLapkin:properly-adjust-never, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
@WaffleLapkin WaffleLapkin added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-never_type `#![feature(never_type)]` S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants