Skip to content

trybuild test failure on nightly. #75

@Anders429

Description

@Anders429

The tests/trybuild/entities/length_not_integer.rs test fails on current nightly rustc:

EXPECTED:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0308]: mismatched types
  --> tests/trybuild/entities/length_not_integer.rs:10:38
   |
10 |     let entities = entities!((A, B); 1.5);
   |                                      ^^^ expected `usize`, found floating-point number
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0308]: mismatched types
    --> tests/trybuild/entities/length_not_integer.rs:10:38
     |
10   |     let entities = entities!((A, B); 1.5);
     |                    ------------------^^^-
     |                    |                 |
     |                    |                 expected `usize`, found floating-point number
     |                    arguments to this function are incorrect
     |
note: function defined here
    --> $RUST/alloc/src/vec/mod.rs
     |
     | pub fn from_elem<T: Clone>(elem: T, n: usize) -> Vec<T> {
     |        ^^^^^^^^^

error[E0308]: mismatched types
    --> tests/trybuild/entities/length_not_integer.rs:10:38
     |
10   |     let entities = entities!((A, B); 1.5);
     |                    ------------------^^^-
     |                    |                 |
     |                    |                 expected `usize`, found floating-point number
     |                    arguments to this function are incorrect
     |
note: function defined here
    --> $RUST/alloc/src/vec/mod.rs
     |
     | pub fn from_elem<T: Clone>(elem: T, n: usize) -> Vec<T> {
     |        ^^^^^^^^^
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

This is caused by a recent change that is currently on nightly. The trybuild expected output should be changed to match this format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions