Commit eeb7283
committed
Account for fully-qualified path case of conflicting crate versions
When encountering the following, mention the precense of conflicting crates:
```
error[E0599]: no function or associated item named `get_decoded` found for struct `HpkeConfig` in the current scope
--> src/main.rs:7:17
|
7 | HpkeConfig::get_decoded(&foo);
| ^^^^^^^^^^^ function or associated item not found in `HpkeConfig`
|
note: if you're trying to build a new `HpkeConfig`, consider using `HpkeConfig::new` which returns `HpkeConfig`
--> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/janus_messages-0.3.1/src/lib.rs:908:5
|
908 | / pub fn new(
909 | | id: HpkeConfigId,
910 | | kem_id: HpkeKemId,
911 | | kdf_id: HpkeKdfId,
912 | | aead_id: HpkeAeadId,
913 | | public_key: HpkePublicKey,
914 | | ) -> HpkeConfig {
| |___________________^
note: there are multiple different versions of crate `prio` in the dependency graph
--> src/main.rs:1:5
|
1 | use prio::codec::Decode;
| ^^^^^^^^^^^^^^^^^^^ `prio` imported here doesn't correspond to the right crate version
|
::: ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prio-0.9.1/src/codec.rs:35:1
|
35 | pub trait Decode: Sized {
| ----------------------- this is the trait that was imported
|
::: ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prio-0.10.3/src/codec.rs:35:1
|
35 | pub trait Decode: Sized {
| ----------------------- this is the trait that is needed
...
43 | fn get_decoded(bytes: &[u8]) -> Result<Self, CodecError> {
| -------------------------------------------------------- the method is available for `HpkeConfig` here
help: there is an associated function `decode` with a similar name
|
7 | HpkeConfig::decode(&foo);
| ~~~~~~
```1 parent 5c427b4 commit eeb7283
1 file changed
+40
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3494 | 3494 | | |
3495 | 3495 | | |
3496 | 3496 | | |
3497 | | - | |
| 3497 | + | |
| 3498 | + | |
3498 | 3499 | | |
3499 | 3500 | | |
3500 | 3501 | | |
| |||
3684 | 3685 | | |
3685 | 3686 | | |
3686 | 3687 | | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
3687 | 3712 | | |
3688 | 3713 | | |
3689 | 3714 | | |
| |||
4052 | 4077 | | |
4053 | 4078 | | |
4054 | 4079 | | |
4055 | | - | |
| 4080 | + | |
| 4081 | + | |
4056 | 4082 | | |
4057 | 4083 | | |
4058 | 4084 | | |
4059 | | - | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
4060 | 4088 | | |
4061 | 4089 | | |
4062 | | - | |
4063 | | - | |
| 4090 | + | |
| 4091 | + | |
4064 | 4092 | | |
4065 | | - | |
| 4093 | + | |
4066 | 4094 | | |
4067 | 4095 | | |
4068 | | - | |
4069 | | - | |
| 4096 | + | |
| 4097 | + | |
4070 | 4098 | | |
4071 | 4099 | | |
4072 | 4100 | | |
4073 | 4101 | | |
4074 | 4102 | | |
4075 | 4103 | | |
4076 | 4104 | | |
4077 | | - | |
4078 | | - | |
| 4105 | + | |
| 4106 | + | |
4079 | 4107 | | |
4080 | 4108 | | |
4081 | 4109 | | |
4082 | 4110 | | |
4083 | 4111 | | |
4084 | 4112 | | |
4085 | 4113 | | |
4086 | | - | |
| 4114 | + | |
4087 | 4115 | | |
4088 | 4116 | | |
4089 | 4117 | | |
4090 | | - | |
| 4118 | + | |
4091 | 4119 | | |
4092 | 4120 | | |
4093 | 4121 | | |
| |||
0 commit comments