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

Tracking Issue for Rust 2024: Make ! fall back to ! #123748

Closed
8 tasks done
traviscross opened this issue Apr 10, 2024 · 15 comments
Closed
8 tasks done

Tracking Issue for Rust 2024: Make ! fall back to ! #123748

traviscross opened this issue Apr 10, 2024 · 15 comments
Assignees
Labels
A-edition-2024 Area: The 2024 edition C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-never_type `#![feature(never_type)]` S-tracking-ready-for-edition Status: This issue is ready for inclusion in the edition. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@traviscross
Copy link
Contributor

traviscross commented Apr 10, 2024

This is a tracking issue for the change to make fallback fall back from ! to ! (rather than to ()) in Rust 2024. This is part of a plan that leads to eventually stabilizing the never (!) type.

What this change means

This change means that ! does not spontaneously decay to (). For example, consider this code:

fn print_return_type<R>(_: fn() -> R) {
    println!("`{}`", std::any::type_name::<R>());
}

print_return_type(|| todo!()); // before this change: prints `()`
                               // after this change: prints `!`

todo!() "returns" !, but before this change this ! decayed to () when being returned from the closure. In general, this can happen at any coercion site, if the type is not set by something else.

If your code is broken with errors like `!: Trait` is not satisfied, then you need to make sure the type is specified explicitly. For example:

fn create_zst<T: From<()>>() -> T {
    ().into()
}

if condition {
    create_zst()
} else {
    return
};

Before this change ! from return decays to (), meaning that create_zst will also return (), and since () implements From<()> this was fine. With this change however, ! from return keeps being ! and inference makes create_zst also return !, however ! does not implement From<()> causing a compilation error.

The easiest fix is to specify the type explicitly:

if condition {
    create_zst::<()>()
} else {
    return
};

However, this can also be a sign that you don't care what the type is, and maybe the better solution is to refactor the code.

Also note that this "create something or return" pattern can also be caused by ? with code like this:

deserialize(input)?;

Because deserialize's output type is not bound to be anything, it gets inferred from ?'s desugaring that includes a return. (there is a separate initiative to stop ? from affecting inference like this: #122412)

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

Related

@traviscross traviscross added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-lang Relevant to the language team, which will review and decide on the PR/issue. A-edition-2024 Area: The 2024 edition labels Apr 10, 2024
@WaffleLapkin WaffleLapkin self-assigned this Apr 11, 2024
@WaffleLapkin WaffleLapkin added the F-never_type `#![feature(never_type)]` label Apr 11, 2024
@traviscross traviscross changed the title Tracking Issue for making ! fall back to ! Tracking Issue for Rust 2024: Make ! fall back to ! Apr 19, 2024
@WaffleLapkin
Copy link
Member

WaffleLapkin commented May 17, 2024

Add a lint against fallback affecting non-diverging variables in weird ways / ? guiding inference.

It turned out that this is actually tricky/impossible to implement, because we can loose the relationships between inference variables by unifying them:

// easy to lint
// coercion graph edges: [?1t -> ?3t, ?2t -> ?3t]
match true {
    false => return /* ?1t */,
    true => Default::default() /* ?2t */,
} /* ?3t */;

// impossible to lint
// coercion graph edges: [?2t -> ?1t]
match true {
    true => Default::default() /* ?1t */,
    false => return /* ?2t */,
} /* ?1t */;

Even though these examples are very similar, they have enough of a difference in the coercion graph, that we can't lint them both reliably.

I talked with Niko at RustNL and we agreed that given these circumstances this lint can be omitted.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 20, 2024
…rovements, r=compiler-errors

Never type unsafe lint improvements

- Move linting code to a separate method
- Remove mentions of `core::convert::absurd` (rust-lang#124311 was rejected)
- Make the lint into FCW

The last thing is a bit weird though. On one hand it should be `EditionSemanticsChange(2024)`, but on the other hand it shouldn't, because we also plan to break it on all editions some time later. _Also_, it's weird that we don't have `FutureReleaseSemanticsChangeReportInDeps`, IMO "this might cause UB in a future release" is important enough to be reported in deps...

IMO we ought to have three enums instead of [`FutureIncompatibilityReason`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.FutureIncompatibilityReason.html#):

```rust
enum IncompatibilityWhen {
     FutureRelease,
     Edition(Edition),
}

enum IncompatibilyWhat {
    Error,
    SemanticChange,
}

enum IncompatibilityReportInDeps {
    No,
    Yes,
}
```

Tracking:
- rust-lang#123748
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 20, 2024
Rollup merge of rust-lang#125282 - WaffleLapkin:never-type-unsafe-improvements, r=compiler-errors

Never type unsafe lint improvements

- Move linting code to a separate method
- Remove mentions of `core::convert::absurd` (rust-lang#124311 was rejected)
- Make the lint into FCW

The last thing is a bit weird though. On one hand it should be `EditionSemanticsChange(2024)`, but on the other hand it shouldn't, because we also plan to break it on all editions some time later. _Also_, it's weird that we don't have `FutureReleaseSemanticsChangeReportInDeps`, IMO "this might cause UB in a future release" is important enough to be reported in deps...

IMO we ought to have three enums instead of [`FutureIncompatibilityReason`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.FutureIncompatibilityReason.html#):

```rust
enum IncompatibilityWhen {
     FutureRelease,
     Edition(Edition),
}

enum IncompatibilyWhat {
    Error,
    SemanticChange,
}

enum IncompatibilityReportInDeps {
    No,
    Yes,
}
```

Tracking:
- rust-lang#123748
@traviscross traviscross added S-tracking-impl-incomplete Status: The implementation is incomplete. S-tracking-needs-documentation Status: Needs documentation. labels May 21, 2024
@joshlf
Copy link
Contributor

joshlf commented May 22, 2024

zerocopy ran into a potentially sharp edge with the never_type_fallback_flowing_into_unsafe lint today. Not sure yet whether this is actually problematic, but it's at least worth letting folks know about. The docs say:

Instead of depending on the fallback, you should specify the type explicitly

We ran into this issue when updating to the latest nightly. Here's the error message:

warning: never type fallback affects this call to an `unsafe` function
  --> tests/ui-nightly/transmute-mut-src-dst-not-references.rs:17:44
   |
17 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize);
   |                                            ^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this will change its meaning in a future release!
   = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
   = help: specify the type explicitly
   = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default
   = note: this warning originates in the macro `$crate::assert_size_eq` which comes from the expansion of the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

Here's the offending macro:

/// Do `t` and `u` have the same size?  If not, this macro produces a compile
/// error. It must be invoked in a dead codepath. This is used in
/// `transmute_ref!` and `transmute_mut!`.
#[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`.
#[macro_export]
macro_rules! assert_size_eq {
    ($t:ident, $u:ident) => {{
        // The comments here should be read in the context of this macro's
        // invocations in `transmute_ref!` and `transmute_mut!`.
        if false {
            // SAFETY: This code is never run.
            $u = unsafe {
                // Clippy:
                // - It's okay to transmute a type to itself.
                // - We can't annotate the types; this macro is designed to
                //   infer the types from the calling context.
                #[allow(clippy::useless_transmute, clippy::missing_transmute_annotations)]
                $crate::macro_util::core_reexport::mem::transmute($t)
            };
        } else {
            loop {}
        }
    }};
}

Note that $t and $u are values, not types. This macro is called from transmute_mut!, which is simply invoked as transmute_mut!(<expr>), and is structured so that Rust will correctly infer the source and destination types from the surrounding context. The punchline is: there's no way for us to name the correct type as suggested by the lint documentation.

I believe that this lint isn't actually an issue, and we could soundly allow it. In particular, this particular test case tests an intentionally-invalid invocation of the macro, which presumably causes type inference to not have as much information as it normally would, which in turn causes the fallback logic to be reached. Note that the warning is not generated in our various success tests.

However, I will admit to being spooked by this since it's new to me and I haven't spent the time to really wrap my head around it to convince myself that it's definitely fine. I might instead just rewrite that macro. In particular, it's always called from dead code, but has the if false { ... } else { loop {} } structure so that the macro itself doesn't have to be unsafe to call. I might just give up on that aspiration and rewrite it so that what is currently the body of if false { ... } becomes the entire macro, making it unsafe to call:

/// Do `t` and `u` have the same size?  If not, this macro produces a compile
/// error. It must be invoked in a dead codepath. This is used in
/// `transmute_ref!` and `transmute_mut!`.
///
/// # Safety
///
/// The code generated by this macro must never be executed at runtime.
#[doc(hidden)] // `#[macro_export]` bypasses this module's `#[doc(hidden)]`.
#[macro_export]
macro_rules! assert_size_eq {
    ($t:ident, $u:ident) => {{
        // Clippy:
        // - It's okay to transmute a type to itself.
        // - We can't annotate the types; this macro is designed to
        //   infer the types from the calling context.
        #[allow(clippy::useless_transmute, clippy::missing_transmute_annotations)]
        $crate::macro_util::core_reexport::mem::transmute($t)
    }};
}

@joshlf
Copy link
Contributor

joshlf commented May 22, 2024

Hmmm, confusingly the "remove the loop {}" approach didn't actually work - note that the lint is still triggered in google/zerocopy#1339

@WaffleLapkin
Copy link
Member

@joshlf note that this only happens when there is an error already, so I don't think this is a problem.

The reason warning is emitted is that compiler can't infer type of e (it knows it's &mut {something}, but not what {something} is; this is only the case when you assign a non-reference to e, which causes a type error). Then e gets unified with a diverging variable and ultimately gets passed to transmute. I believe the lint is correct. See [code I copied] and, more importantly, [my minimization with explanations].

@joshlf
Copy link
Contributor

joshlf commented May 23, 2024

@joshlf note that this only happens when there is an error already, so I don't think this is a problem.

The reason warning is emitted is that compiler can't infer type of e (it knows it's &mut {something}, but not what {something} is; this is only the case when you assign a non-reference to e, which causes a type error). Then e gets unified with a diverging variable and ultimately gets passed to transmute. I believe the lint is correct. See [code I copied] and, more importantly, [my minimization with explanations].

Okay that makes sense, thanks for investigating!

bors added a commit to rust-lang-ci/rust that referenced this issue Jun 11, 2024
Implement lint for obligations broken by never type fallback change

This is the second (and probably last major?) lint required for the never type fallback change.

The idea is to check if the code errors with `fallback = ()` and if it errors with `fallback = !` and if it went from "ok" to "error", lint.

I'm not happy with the diagnostic, ideally we'd highlight what bound is the problem. But I'm really unsure how to do that  (cc `@jackh726,` iirc you had some ideas?)

r? `@compiler-errors`

Thanks `@BoxyUwU` with helping with trait solver stuff when I was implementing the initial version of this lint.

Tracking:
- rust-lang#123748
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 12, 2024
…mpiler-errors

Implement lint for obligations broken by never type fallback change

This is the second (and probably last major?) lint required for the never type fallback change.

The idea is to check if the code errors with `fallback = ()` and if it errors with `fallback = !` and if it went from "ok" to "error", lint.

I'm not happy with the diagnostic, ideally we'd highlight what bound is the problem. But I'm really unsure how to do that  (cc `@jackh726,` iirc you had some ideas?)

r? `@compiler-errors`

Thanks `@BoxyUwU` with helping with trait solver stuff when I was implementing the initial version of this lint.

Tracking:
- rust-lang#123748
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 13, 2024
…mpiler-errors

Implement lint for obligations broken by never type fallback change

This is the second (and probably last major?) lint required for the never type fallback change.

The idea is to check if the code errors with `fallback = ()` and if it errors with `fallback = !` and if it went from "ok" to "error", lint.

I'm not happy with the diagnostic, ideally we'd highlight what bound is the problem. But I'm really unsure how to do that  (cc `@jackh726,` iirc you had some ideas?)

r? `@compiler-errors`

Thanks `@BoxyUwU` with helping with trait solver stuff when I was implementing the initial version of this lint.

Tracking:
- rust-lang#123748
@i18nsite

This comment was marked as resolved.

Xuanwo pushed a commit to apache/opendal that referenced this issue Aug 1, 2024
* fix never type

warning: this function depends on never type fallback being `()`
   --> src/services/redis/backend.rs:438:5
    |
438 |     async fn append(&self, key: &str, value: &[u8]) -> Result<()> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #123748 <rust-lang/rust#123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: FromRedisValue` will fail
   --> src/services/redis/backend.rs:442:22
    |
442 |                 conn.append(key, value).await.map_err(format_redis_error)?;
    |                      ^^^^^^
    = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

Signed-off-by: xxchan <xxchan22f@gmail.com>

* fix needless borrow

warning: the borrowed expression implements the required traits
    --> src/services/s3/backend.rs:1240:55
     |
1240 |                 let mut err: Error = Error::new(kind, &format!("{i:?}"));
     |                                                       ^^^^^^^^^^^^^^^^^ help: change this to: `format!("{i:?}")`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
     = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

warning: the borrowed expression implements the required traits
   --> src/services/dropbox/core.rs:437:29
    |
437 | ...                   &format!("delete failed with error {} {}", error.tag, error_cause),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with error {} {}", error.tag, error_cause)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

warning: the borrowed expression implements the required traits
   --> src/services/dropbox/core.rs:446:25
    |
446 |                         &format!("delete failed with unexpected tag {}", entry.tag),
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with unexpected tag {}", entry.tag)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Signed-off-by: xxchan <xxchan22f@gmail.com>

---------

Signed-off-by: xxchan <xxchan22f@gmail.com>
khvzak added a commit to mlua-rs/mlua that referenced this issue Aug 4, 2024
Replace `IntoLua(Multi)` generic with positional arg (impl trait) where possible
This allow to shorten syntax from `a.get::<_, T>` to `a.get::<T>`
ho-229 pushed a commit to ho-229/incubator-opendal that referenced this issue Aug 6, 2024
* fix never type

warning: this function depends on never type fallback being `()`
   --> src/services/redis/backend.rs:438:5
    |
438 |     async fn append(&self, key: &str, value: &[u8]) -> Result<()> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #123748 <rust-lang/rust#123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: FromRedisValue` will fail
   --> src/services/redis/backend.rs:442:22
    |
442 |                 conn.append(key, value).await.map_err(format_redis_error)?;
    |                      ^^^^^^
    = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

Signed-off-by: xxchan <xxchan22f@gmail.com>

* fix needless borrow

warning: the borrowed expression implements the required traits
    --> src/services/s3/backend.rs:1240:55
     |
1240 |                 let mut err: Error = Error::new(kind, &format!("{i:?}"));
     |                                                       ^^^^^^^^^^^^^^^^^ help: change this to: `format!("{i:?}")`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
     = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

warning: the borrowed expression implements the required traits
   --> src/services/dropbox/core.rs:437:29
    |
437 | ...                   &format!("delete failed with error {} {}", error.tag, error_cause),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with error {} {}", error.tag, error_cause)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

warning: the borrowed expression implements the required traits
   --> src/services/dropbox/core.rs:446:25
    |
446 |                         &format!("delete failed with unexpected tag {}", entry.tag),
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with unexpected tag {}", entry.tag)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Signed-off-by: xxchan <xxchan22f@gmail.com>

---------

Signed-off-by: xxchan <xxchan22f@gmail.com>
ianrrees added a commit to ianrrees/atsamd that referenced this issue Aug 18, 2024
The TryFrom approach resulted in warnings, following Rust updates aimed
at stabilizing the never type.

rust-lang/rust#123748
ianrrees added a commit to ianrrees/atsamd that referenced this issue Aug 19, 2024
The TryFrom approach resulted in warnings, following Rust updates aimed
at stabilizing the never type.

rust-lang/rust#123748
FauxFaux added a commit to FauxFaux/gitgeoff that referenced this issue Aug 19, 2024
iximeow added a commit to oxidecomputer/propolis that referenced this issue Sep 5, 2024
on 1.81, this expression caused rustc warning, and clippy error:

```
warning: this function depends on never type fallback being `()`
   --> bin/propolis-cli/src/main.rs:497:1
    |
497 | / async fn migrate_instance(
498 | |     src_client: Client,
499 | |     dst_client: Client,
500 | |     src_addr: SocketAddr,
501 | |     dst_uuid: Uuid,
502 | |     disks: Vec<DiskRequest>,
503 | | ) -> anyhow::Result<()> {
    | |_______________________^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #123748 <rust-lang/rust#123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: FromIterator<()>` will fail
   --> bin/propolis-cli/src/main.rs:598:20
    |
598 |         .collect::<anyhow::Result<_>>()?;
    |                    ^^^^^^^^^^^^^^^^^
    = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

warning: `propolis-cli` (bin "propolis-cli") generated 1 warning
```

i am, honestly, entirely missing how the never type is involved here, or how
changing the `collect`'s type from `anyhow::Result<_>` to `anyhow::Result<()>`
changes things in a direction to satisfy rustc. but bounding the type further
doesn't seem like it would cause a problem?
alerque added a commit to sile-typesetter/sile that referenced this issue Sep 5, 2024
New in Rust 1.81.0, scheduled to be an error in edition 2024:

rust-lang/rust#123748

It looks like mlua v0.10 won't need this workaround:

mlua-rs/mlua@3641c98
saulecabrera added a commit to saulecabrera/javy that referenced this issue Sep 6, 2024
xoolive added a commit to xoolive/rs1090 that referenced this issue Sep 10, 2024
saulecabrera added a commit to bytecodealliance/javy that referenced this issue Sep 10, 2024
* Add support for `-J` option group

This commit adds support for the `-J` option group and enables
`javy-json` and `override-json-parse-and-stringify` by default.

Additionally, this change improves how the javy cli integration tests
are defined by introducing a `javy_cli_test` which:

* Produces a test per supported command (`compile` and `build`)
* Provides a set of defaults depending on the command under test

Generating a test per command improves the developer experience of
determining failures on particular command configurations.

Lastly, this change bumps the provider to v3, given that new
funcionality is introduced as part of enabling `javy-json` and
`override-json-parse-and-stringify`. In order to test that the `compile`
command remains "frozen", using version 2 of the provider, this commit
introduces a static copy of the v2 provided downloaded from the releases
section.

* Add explicit types to `this.eval[_with_options]` calls

To address: rust-lang/rust#123748

* Clarify the usage of `clippy::too_many_arguments`

* Clippy fixes

* Rename `override-json-parse-and-stringify` to `simd-json-builtins`

* Update `javy-fuzz`

* More migration

* Update test-macros to use `simd_json_builtins`
iximeow added a commit to oxidecomputer/propolis that referenced this issue Sep 10, 2024
* fix new 1.81.0 warning and clippy error

on 1.81, this expression caused rustc warning, and clippy error:

```
warning: this function depends on never type fallback being `()`
   --> bin/propolis-cli/src/main.rs:497:1
    |
497 | / async fn migrate_instance(
498 | |     src_client: Client,
499 | |     dst_client: Client,
500 | |     src_addr: SocketAddr,
501 | |     dst_uuid: Uuid,
502 | |     disks: Vec<DiskRequest>,
503 | | ) -> anyhow::Result<()> {
    | |_______________________^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #123748 <rust-lang/rust#123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: FromIterator<()>` will fail
   --> bin/propolis-cli/src/main.rs:598:20
    |
598 |         .collect::<anyhow::Result<_>>()?;
    |                    ^^^^^^^^^^^^^^^^^
    = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

warning: `propolis-cli` (bin "propolis-cli") generated 1 warning
```

i am, honestly, entirely missing how the never type is involved here, or how
changing the `collect`'s type from `anyhow::Result<_>` to `anyhow::Result<()>`
changes things in a direction to satisfy rustc. but bounding the type further
doesn't seem like it would cause a problem?

* the unused pub(crate) struct warnings are new also, allow these cases
lutter added a commit to graphprotocol/graph-node that referenced this issue Sep 11, 2024
rustc 1.81 produces a warning (see
rust-lang/rust#123748) in a few places. This
change fixes that.
strohel added a commit to tonarino/innernet that referenced this issue Sep 13, 2024
This relates to
- rust-lang/rust#123748
- https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html

And frankly I still don't really understand why never type was involved in our code in the first place.
strohel added a commit to tonarino/innernet that referenced this issue Sep 13, 2024
This relates to
- rust-lang/rust#123748
- https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html

And frankly I still don't really understand why never type was involved in our code in the first place.
chriswk added a commit to Unleash/unleash-edge that referenced this issue Sep 17, 2024
Work around for Rust 2024 implementing Never type (!)

rust-lang/rust#123748
chriswk added a commit to Unleash/unleash-edge that referenced this issue Sep 17, 2024
Work around for Rust 2024 implementing Never type (!)

rust-lang/rust#123748
loops added a commit to loops/wezterm that referenced this issue Sep 18, 2024
As per <rust-lang/rust#123748>
! will no longer degrade into () which in this situation
breaks type deduction; so specify it explicitly.
loops added a commit to loops/wezterm that referenced this issue Sep 20, 2024
As per <rust-lang/rust#123748>
! will no longer degrades into () which in this situation
breaks type deduction; so specify it explicitly.
loops added a commit to loops/wezterm that referenced this issue Sep 20, 2024
As per <rust-lang/rust#123748>
! will no longer degrades into () which in this situation
breaks type deduction; so specify it explicitly.
cutsea110 added a commit to cutsea110/tx-rs that referenced this issue Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2024 Area: The 2024 edition C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-never_type `#![feature(never_type)]` S-tracking-ready-for-edition Status: This issue is ready for inclusion in the edition. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

8 participants