File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ static TOOLCHAIN_CHANNELS: &[&str] = &[
4343 r"\d{1}\.\d{1,3}(?:\.\d{1,2})?" ,
4444] ;
4545
46+ /// Returns a error message indicating that certain [`Component`]s are missing in a toolchain distribution.
47+ ///
48+ /// This message is currently used exclusively in toolchain-wide operations,
49+ /// otherwise [`component_unavailable_msg`](../../errors/fn.component_unavailable_msg.html) will be used.
50+ ///
51+ /// # Panics
52+ /// This function will panic when the collection of unavailable components `cs` is empty.
4653fn components_missing_msg ( cs : & [ Component ] , manifest : & ManifestV2 , toolchain : & str ) -> String {
4754 let mut buf = vec ! [ ] ;
4855 let suggestion = format ! ( " rustup toolchain add {toolchain} --profile minimal" ) ;
Original file line number Diff line number Diff line change @@ -147,6 +147,13 @@ fn suggest_message(suggestion: &Option<String>) -> String {
147147 }
148148}
149149
150+ /// Returns a error message indicating that certain [`Component`]s are unavailable.
151+ ///
152+ /// See also [`component_missing_msg`](../dist/dist/fn.components_missing_msg.html)
153+ /// which generates error messages for component unavailability toolchain-wide operations.
154+ ///
155+ /// # Panics
156+ /// This function will panic when the collection of unavailable components `cs` is empty.
150157fn component_unavailable_msg ( cs : & [ Component ] , manifest : & Manifest , toolchain : & str ) -> String {
151158 let mut buf = vec ! [ ] ;
152159 match cs {
You can’t perform that action at this time.
0 commit comments