Omit suggestions when spans are invalid by jdonszelmann · Pull Request #147849 · rust-lang/rust (original) (raw)

test [crashes] tests/crashes/131406.rs ... ok
test [crashes] tests/crashes/131373.rs ... ok
test [crashes] tests/crashes/131295.rs ... ok
test [crashes] tests/crashes/131534.rs ... ok
2025-10-28T15:56:36.236679Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/131762.rs ... FAILED
test [crashes] tests/crashes/131886.rs ... ok
test [crashes] tests/crashes/131787.rs ... ok
test [crashes] tests/crashes/132126.rs ... ok
test [crashes] tests/crashes/132960.rs ... ok
---

---- [crashes] tests/crashes/131762.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
error[E0061]: this struct takes 1 argument but 3 arguments were supplied
##[error] --> /checkout/tests/crashes/131762.rs:8:63
  |
8 | ...) >= FloatWrapper(size_of::<u8>, size_of::<u16>, size_of::<usize> as fn() -> usize)))
  |         ^^^^^^^^^^^^                --------------  --------------------------------- unexpected argument #3 of type `fn() -> usize`
  |                                     |
  |                                     unexpected argument #2 of type `fn() -> usize {std::mem::size_of::<u16>}`
  |
note: expected `f64`, found fn item
 --> /checkout/tests/crashes/131762.rs:8:5
  |
8 |     assert!((0.0 / 0.0 >= 0.0) == (FloatWrapper(0.0 / 0.0) >= FloatWrapper(size_of::<u8>, size_of::<u16>, size_of::<usize> as fn() -> usize)))
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: expected type `f64`
          found fn item `fn() -> usize {std::mem::size_of::<u8>}`
note: tuple struct defined here
 --> /checkout/tests/crashes/131762.rs:5:8
  |
5 | struct FloatWrapper(f64);
  |        ^^^^^^^^^^^^
rendering error: omitted 1 suggestion that failed to render, likely because of macro expansions

error[E0369]: binary operation `>=` cannot be applied to type `FloatWrapper`
##[error] --> /checkout/tests/crashes/131762.rs:8:60
  |
8 | ....0) == (FloatWrapper(0.0 / 0.0) >= FloatWrapper(size_of::<u8>, size_of::<u16>, size_of::<usize> as fn() -> usize)))
  |            ----------------------- ^^ ------------------------------------------------------------------------------ FloatWrapper
  |            |
  |            FloatWrapper
  |
note: an implementation of `PartialOrd` might be missing for `FloatWrapper`
 --> /checkout/tests/crashes/131762.rs:5:1
  |
5 | struct FloatWrapper(f64);
  | ^^^^^^^^^^^^^^^^^^^ must implement `PartialOrd`
help: consider annotating `FloatWrapper` with `#[derive(PartialEq, PartialOrd)]`
  |
5 + #[derive(PartialEq, PartialOrd)]
6 | struct FloatWrapper(f64);
  |

error: aborting due to 2 previous errors

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

------------------------------------------

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/131762.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
stack backtrace:
   5: __rustc::rust_begin_unwind