@@ -1901,20 +1901,17 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1901
1901
orig. registry_index . as_ref ( ) ,
1902
1902
) {
1903
1903
( Some ( _git) , _, Some ( _registry) , _) | ( Some ( _git) , _, _, Some ( _registry) ) => bail ! (
1904
- "dependency ({}) specification is ambiguous. \
1904
+ "dependency ({name_in_toml }) specification is ambiguous. \
1905
1905
Only one of `git` or `registry` is allowed.",
1906
- name_in_toml
1907
1906
) ,
1908
1907
( _, _, Some ( _registry) , Some ( _registry_index) ) => bail ! (
1909
- "dependency ({}) specification is ambiguous. \
1908
+ "dependency ({name_in_toml }) specification is ambiguous. \
1910
1909
Only one of `registry` or `registry-index` is allowed.",
1911
- name_in_toml
1912
1910
) ,
1913
1911
( Some ( _git) , Some ( _path) , None , None ) => {
1914
1912
bail ! (
1915
- "dependency ({}) specification is ambiguous. \
1913
+ "dependency ({name_in_toml }) specification is ambiguous. \
1916
1914
Only one of `git` or `path` is allowed.",
1917
- name_in_toml
1918
1915
) ;
1919
1916
}
1920
1917
( Some ( git) , None , None , None ) => {
@@ -1925,9 +1922,8 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1925
1922
1926
1923
if n_details > 1 {
1927
1924
bail ! (
1928
- "dependency ({}) specification is ambiguous. \
1925
+ "dependency ({name_in_toml }) specification is ambiguous. \
1929
1926
Only one of `branch`, `tag` or `rev` is allowed.",
1930
- name_in_toml
1931
1927
) ;
1932
1928
}
1933
1929
@@ -1942,12 +1938,11 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1942
1938
1943
1939
if let Some ( fragment) = loc. fragment ( ) {
1944
1940
let msg = format ! (
1945
- "URL fragment `#{}` in git URL is ignored for dependency ({}). \
1941
+ "URL fragment `#{fragment }` in git URL is ignored for dependency ({name_in_toml }). \
1946
1942
If you were trying to specify a specific git revision, \
1947
- use `rev = \" {}\" ` in the dependency declaration.",
1948
- fragment, name_in_toml, fragment
1943
+ use `rev = \" {fragment}\" ` in the dependency declaration.",
1949
1944
) ;
1950
- manifest_ctx. warnings . push ( msg)
1945
+ manifest_ctx. warnings . push ( msg) ;
1951
1946
}
1952
1947
1953
1948
SourceId :: for_git ( & loc, reference) ?
0 commit comments