|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> mismatch.rs:5:25 |
| 3 | + | |
| 4 | +5 | uses_hashbrown::foo(hashbrown::HashMap::default()) |
| 5 | + | ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `HashMap<_, _>`, found `HashMap<_, _, _, _>` |
| 6 | + | | |
| 7 | + | arguments to this function are incorrect |
| 8 | + | |
| 9 | + = note: `hashbrown::HashMap<_, _, _, _>` and `hashbrown::HashMap<_, _>` have similar names, but are actually distinct types |
| 10 | +note: `hashbrown::HashMap<_, _, _, _>` is defined in crate `hashbrown` |
| 11 | + --> CARGO_REGISTRY/hashbrown-VERSION/src/map.rs:190:1 |
| 12 | + | |
| 13 | +190 | pub struct HashMap<K, V, S = DefaultHashBuilder, A: Allocator = Global> { |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 15 | + = note: `hashbrown` was loaded from BUILD_DIR/HOST/stageN/lib/rustlib/TARGET/lib/libhashbrown.rlib |
| 16 | +note: `hashbrown::HashMap<_, _>` is defined in crate `hashbrown` |
| 17 | + --> TEST_DIR/type-mismatch-sysroot-crate/hashbrown.rs:3:1 |
| 18 | + | |
| 19 | +3 | pub struct HashMap<T, U>(PhantomData<(T, U)>); |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 21 | + = note: `hashbrown` was loaded from BUILD_DIR/HOST/test/run-make/type-mismatch-sysroot-crate/type-mismatch-sysroot-crate/libhashbrown.rlib |
| 22 | + = note: perhaps two different versions of crate `hashbrown` are being used? |
| 23 | +note: function defined here |
| 24 | + --> TEST_DIR/type-mismatch-sysroot-crate/uses-hashbrown.rs:2:8 |
| 25 | + | |
| 26 | +2 | pub fn foo<T, U>(_: hashbrown::HashMap<T, U>) {} |
| 27 | + | ^^^ |
| 28 | + |
| 29 | +error: aborting due to previous error |
| 30 | + |
| 31 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments