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

Increase in type mismatches on webrender and diesel #11551

Closed
lnicola opened this issue Feb 25, 2022 · 2 comments · Fixed by #11554
Closed

Increase in type mismatches on webrender and diesel #11551

lnicola opened this issue Feb 25, 2022 · 2 comments · Fixed by #11554
Assignees
Labels
C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now

Comments

@lnicola
Copy link
Member

lnicola commented Feb 25, 2022

These went yesterday from 16 and 84 to 23 and 116, presumably because of a change in 1.59.

@lnicola lnicola added S-actionable Someone could pick this issue up and work on it right now C-bug Category: bug labels Feb 25, 2022
@lnicola
Copy link
Member Author

lnicola commented Feb 25, 2022

Repro for the webrender errors:

fn foo() -> i32 {
    unreachable!();
 // ^ Expected i32, got ()
}

@lnicola
Copy link
Member Author

lnicola commented Feb 25, 2022

This is because the definition of unreachable! changed in rust-lang/rust#93179 from:

#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
macro_rules! unreachable {
    () => ({
        $crate::panic!("internal error: entered unreachable code")
    });
    ($msg:expr $(,)?) => ({
        $crate::unreachable!("{}", $msg)
    });
    ($fmt:expr, $($arg:tt)*) => ({
        $crate::panic!($crate::concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
    });
}

to:

#[cfg(not(bootstrap))]
#[macro_export]
#[rustc_builtin_macro(unreachable)]
#[allow_internal_unstable(edition_panic)]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "unreachable_macro")]
macro_rules! unreachable {
    // Expands to either `$crate::panic::unreachable_2015` or `$crate::panic::unreachable_2021`
    // depending on the edition of the caller.
    ($($arg:tt)*) => {
        /* compiler built-in */
    };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants