Skip to content

ci: try with 1.87 beta #7280

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

ci: try with 1.87 beta #7280

wants to merge 1 commit into from

Conversation

Darksonn
Copy link
Contributor

@Darksonn Darksonn commented Apr 22, 2025

Run ci with beta 1.87 to check for issues in advance.

Should not be merged.

@Darksonn Darksonn added the A-ci Area: The continuous integration setup label Apr 22, 2025
@Darksonn
Copy link
Contributor Author

Darksonn commented Apr 22, 2025

One error is that doctests starting with

    /// # if cfg!(miri) { return }

no longer work if they contain a fn main(). This is rust-lang/rust#140162

@Darksonn
Copy link
Contributor Author

Another error is in cargo-semver-checks for a new rustdoc format.

error: unsupported rustdoc format v43 for file: /home/runner/work/tokio/tokio/semver-checks/target/doc/tokio.json

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   1: cargo_semver_checks::data_generation::request::load_rustdoc_with_optional_metadata
   2: cargo_semver_checks::data_generation::request::CrateDataRequest::resolve
   3: cargo_semver_checks::rustdoc_gen::generate_rustdoc
   4: <cargo_semver_checks::rustdoc_gen::RustdocFromProjectRoot as cargo_semver_checks::rustdoc_gen::RustdocGenerator>::load_rustdoc
   5: cargo_semver_checks::generate_crate_data
   6: cargo_semver_checks::Check::check_release
   7: cargo_semver_checks::exit_on_error
   8: cargo_semver_checks::main
   9: std::sys::backtrace::__rust_begin_short_backtrace
  10: main
  11: <unknown>
  12: __libc_start_main
  13: _start

This is obi1kenobi/cargo-semver-checks#1251

@Darksonn
Copy link
Contributor Author

There's also a change to the error emitted by macros_type_mismatch.rs.

Click to show error
EXPECTED:
  ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
  error[E0308]: mismatched types
   --> tests/fail/macros_type_mismatch.rs:5:5
    |
  5 |     Ok(())
    |     ^^^^^^ expected `()`, found `Result<(), _>`
    |
    = note: expected unit type `()`
                    found enum `Result<(), _>`
  help: a return type might be missing here
    |
  4 | async fn missing_semicolon_or_return_type() -> _ {
    |                                             ++++
  help: consider using `Result::expect` to unwrap the `Result<(), _>` value, panicking if the value is a `Result::Err`
    |
  5 |     Ok(()).expect("REASON")
    |           +++++++++++++++++
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:10:5
     |
  10 |     return Ok(());
     |     ^^^^^^^^^^^^^^ expected `()`, found `Result<(), _>`
     |
     = note: expected unit type `()`
                     found enum `Result<(), _>`
  help: a return type might be missing here
     |
  9  | async fn missing_return_type() -> _ {
     |                                ++++
  help: consider using `Result::expect` to unwrap the `Result<(), _>` value, panicking if the value is a `Result::Err`
     |
  10 |     return Ok(());.expect("REASON")
     |                   +++++++++++++++++
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:23:5
     |
  14 | async fn extra_semicolon() -> Result<(), ()> {
     |                               -------------- expected `Result<(), ()>` because of return type
  ...
  23 |     Ok(());
     |     ^^^^^^^ expected `Result<(), ()>`, found `()`
     |
     = note:   expected enum `Result<(), ()>`
             found unit type `()`
  help: try adding an expression at the end of the block
     |
  23 ~     Ok(());;
  24 +     Ok(())
     |
  
  error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
    --> tests/fail/macros_type_mismatch.rs:40:9
     |
  38 | #[tokio::main]
     | -------------- this function should return `Result` or `Option` to accept `?`
  39 | async fn question_mark_operator_with_invalid_option() -> Option<()> {
  40 |     None?;
     |         ^ cannot use the `?` operator in an async block that returns `()`
     |
     = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `()`
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:40:5
     |
  39 | async fn question_mark_operator_with_invalid_option() -> Option<()> {
     |                                                          ---------- expected `Option<()>` because of return type
  40 |     None?;
     |     ^^^^^^ expected `Option<()>`, found `()`
     |
     = note:   expected enum `Option<()>`
             found unit type `()`
  help: try adding an expression at the end of the block
     |
  40 ~     None?;;
  41 +     None
     |
  40 ~     None?;;
  41 +     Some(())
     |
  
  error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
    --> tests/fail/macros_type_mismatch.rs:57:11
     |
  55 | #[tokio::main]
     | -------------- this function should return `Result` or `Option` to accept `?`
  56 | async fn question_mark_operator_with_invalid_result() -> Result<(), ()> {
  57 |     Ok(())?;
     |           ^ cannot use the `?` operator in an async block that returns `()`
     |
     = help: the trait `FromResidual<Result<Infallible, _>>` is not implemented for `()`
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:57:5
     |
  56 | async fn question_mark_operator_with_invalid_result() -> Result<(), ()> {
     |                                                          -------------- expected `Result<(), ()>` because of return type
  57 |     Ok(())?;
     |     ^^^^^^^^ expected `Result<(), ()>`, found `()`
     |
     = note:   expected enum `Result<(), ()>`
             found unit type `()`
  help: try adding an expression at the end of the block
     |
  57 ~     Ok(())?;;
  58 +     Ok(())
     |
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:66:5
     |
  64 | async fn issue_4635() {
     |                      - help: try adding a return type: `-> i32`
  65 |     return 1;
  66 |     ;
     |     ^ expected `()`, found integer
  ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
  
  ACTUAL OUTPUT:
  ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
  error[E0308]: mismatched types
   --> tests/fail/macros_type_mismatch.rs:5:5
    |
  5 |     Ok(())
    |     ^^^^^^ expected `()`, found `Result<(), _>`
    |
    = note: expected unit type `()`
                    found enum `Result<(), _>`
  help: a return type might be missing here
    |
  4 | async fn missing_semicolon_or_return_type() -> _ {
    |                                             ++++
  help: consider using `Result::expect` to unwrap the `Result<(), _>` value, panicking if the value is a `Result::Err`
    |
  5 |     Ok(()).expect("REASON")
    |           +++++++++++++++++
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:10:5
     |
  10 |     return Ok(());
     |     ^^^^^^^^^^^^^^ expected `()`, found `Result<(), _>`
     |
     = note: expected unit type `()`
                     found enum `Result<(), _>`
  help: a return type might be missing here
     |
  9  | async fn missing_return_type() -> _ {
     |                                ++++
  help: consider using `Result::expect` to unwrap the `Result<(), _>` value, panicking if the value is a `Result::Err`
     |
  10 |     return Ok(());.expect("REASON")
     |                   +++++++++++++++++
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:23:5
     |
  14 | async fn extra_semicolon() -> Result<(), ()> {
     |                               -------------- expected `Result<(), ()>` because of return type
  ...
  23 |     Ok(());
     |     ^^^^^^^ expected `Result<(), ()>`, found `()`
     |
     = note:   expected enum `Result<(), ()>`
             found unit type `()`
  help: try adding an expression at the end of the block
     |
  23 ~     Ok(());;
  24 +     Ok(())
     |
  
  error[E0[277](https://github.com/tokio-rs/tokio/actions/runs/14593663217/job/40934470982?pr=7280#step:7:278)]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
    --> tests/fail/macros_type_mismatch.rs:40:9
     |
  38 | #[tokio::main]
     | -------------- this function should return `Result` or `Option` to accept `?`
  39 | async fn question_mark_operator_with_invalid_option() -> Option<()> {
  40 |     None?;
     |         ^ cannot use the `?` operator in an async block that returns `()`
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:40:5
     |
  39 | async fn question_mark_operator_with_invalid_option() -> Option<()> {
     |                                                          ---------- expected `Option<()>` because of return type
  40 |     None?;
     |     ^^^^^^ expected `Option<()>`, found `()`
     |
     = note:   expected enum `Option<()>`
             found unit type `()`
  help: try adding an expression at the end of the block
     |
  40 ~     None?;;
  41 +     None
     |
  40 ~     None?;;
  41 +     Some(())
     |
  
  error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
    --> tests/fail/macros_type_mismatch.rs:57:11
     |
  55 | #[tokio::main]
     | -------------- this function should return `Result` or `Option` to accept `?`
  56 | async fn question_mark_operator_with_invalid_result() -> Result<(), ()> {
  57 |     Ok(())?;
     |           ^ cannot use the `?` operator in an async block that returns `()`
  
  error[E0[308](https://github.com/tokio-rs/tokio/actions/runs/14593663217/job/40934470982?pr=7280#step:7:309)]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:57:5
     |
  56 | async fn question_mark_operator_with_invalid_result() -> Result<(), ()> {
     |                                                          -------------- expected `Result<(), ()>` because of return type
  57 |     Ok(())?;
     |     ^^^^^^^^ expected `Result<(), ()>`, found `()`
     |
     = note:   expected enum `Result<(), ()>`
             found unit type `()`
  help: try adding an expression at the end of the block
     |
  57 ~     Ok(())?;;
  58 +     Ok(())
     |
  
  error[E0308]: mismatched types
    --> tests/fail/macros_type_mismatch.rs:66:5
     |
  64 | async fn issue_4635() {
     |                      - help: try adding a return type: `-> i32`
  65 |     return 1;
  66 |     ;
     |     ^ expected `()`, found integer
  ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
  note: If the actual output is the correct output you can bless it by rerunning
        your test with the environment variable TRYBUILD=overwrite
  
  
  
  test compile_fail_full ... FAILED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: The continuous integration setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant