rust/tests
Matthias Krüger 78376fd39c
Rollup merge of #150558 - estebank:multiple-dep-versions, r=jieyouxu
Detect cases where `?` is applied on a type that could be coming from a different crate version than expected

```
error[E0277]: `?` couldn't convert the error to `dependency::Error`
  --> replaced
   |
LL | fn main() -> Result<(), Error> {
   |              ----------------- expected `dependency::Error` because of this
...
LL |     Err(Error2)?;
   |     -----------^ the trait `From<Error2>` is not implemented for `dependency::Error`
   |     |
   |     this can't be annotated with `?` because it has type `Result<_, Error2>`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
help: the trait `From<Error2>` is not implemented for `dependency::Error`
      but trait `From<()>` is implemented for it
  --> replaced
   |
LL | impl From<()> for Error {
   | ^^^^^^^^^^^^^^^^^^^^^^^
   = help: for that trait implementation, expected `()`, found `Error2`
   = note: there are multiple different versions of crate `dependency` in the dependency graph
   = help: you can use `cargo tree` to explore your dependency tree
```

The existing checks rely on having access to the actual types/traits that diverged to detect they are called the same, come from different crates with the same name. The new check is less specific, merely looking to see if the crate name the involved type belongs has multiple crates.

CC rust-lang/rust#78552.
2026-01-03 10:09:29 +01:00
..
assembly-llvm Nvptx: Use llbc as default linker 2025-12-19 21:39:48 +01:00
auxiliary Rework c_variadic 2025-12-04 10:51:34 +01:00
codegen-llvm Auto merge of #150606 - JonathanBrouwer:rollup-lue4jqz, r=JonathanBrouwer 2026-01-02 19:45:27 +00:00
codegen-units Don't treat asserts as a call in cross-crate inlining 2025-12-18 19:12:09 -05:00
coverage Create place and value indices on-demand. 2025-12-14 16:33:24 +00:00
coverage-run-rustdoc
crashes Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
debuginfo tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass 2025-12-20 20:35:30 +01:00
incremental Add unsafe to no_mangle incremental tests 2025-12-03 17:00:22 +01:00
mir-opt Rollup merge of #150530 - Zalathar:string-deref-patterns, r=jackh726 2025-12-31 17:32:06 +01:00
pretty Recursive delegation improvements 2025-12-25 14:49:01 +03:00
run-make Rollup merge of #150558 - estebank:multiple-dep-versions, r=jieyouxu 2026-01-03 10:09:29 +01:00
run-make-cargo tests/run-make-cargo/same-crate-name-and-macro-name: New regression test 2025-12-17 11:21:27 +01:00
rustdoc rustdoc: fix duplicate Re-exports sections 2025-12-25 12:31:23 -05:00
rustdoc-gui Fix changes coming from browser-ui-test version update 2026-01-02 20:21:44 +01:00
rustdoc-js Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar 2025-11-27 07:30:25 +00:00
rustdoc-js-std std: Use more unix.rs code on WASI targets 2025-12-08 06:46:28 -08:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Rollup merge of #149949 - JonathanBrouwer:error_cleanup, r=jdonszelmann 2025-12-14 20:04:56 +01:00
ui Rollup merge of #150441 - fee1-dead-contrib:push-smqzpwrpvqll, r=estebank 2026-01-02 23:13:22 +01:00
ui-fulldeps lexer/parser: ensure deps use the same unicode version 2025-12-27 11:20:42 +01:00
COMPILER_TESTS.md