Skip to content

Commit 1623634

Browse files
committed
Auto merge of rust-lang#113271 - matthiaskrgr:rollup-2ik4vaj, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - rust-lang#113253 (Fixed documentation of from<CString> for Rc<CStr>: Arc -> Rc) - rust-lang#113258 (Migrate GUI colors test to original CSS color format) - rust-lang#113259 (Suggest `x build library` for a custom toolchain that fails to load `core`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d5a7424 + 1366ad3 commit 1623634

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

compiler/rustc_metadata/messages.ftl

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ metadata_conflicting_alloc_error_handler =
2525
metadata_conflicting_global_alloc =
2626
the `#[global_allocator]` in {$other_crate_name} conflicts with global allocator in: {$crate_name}
2727
28+
metadata_consider_adding_std =
29+
consider adding the standard library to the sysroot with `x build library --target {$locator_triple}`
30+
2831
metadata_consider_building_std =
2932
consider building the standard library from source with `cargo build -Zbuild-std`
3033

compiler/rustc_metadata/src/errors.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -646,12 +646,18 @@ impl IntoDiagnostic<'_> for CannotFindCrate {
646646
} else {
647647
diag.note(fluent::metadata_target_no_std_support);
648648
}
649-
// NOTE: this suggests using rustup, even though the user may not have it installed.
650-
// That's because they could choose to install it; or this may give them a hint which
651-
// target they need to install from their distro.
649+
652650
if self.missing_core {
653-
diag.help(fluent::metadata_consider_downloading_target);
651+
if env!("CFG_RELEASE_CHANNEL") == "dev" {
652+
diag.help(fluent::metadata_consider_adding_std);
653+
} else {
654+
// NOTE: this suggests using rustup, even though the user may not have it installed.
655+
// That's because they could choose to install it; or this may give them a hint which
656+
// target they need to install from their distro.
657+
diag.help(fluent::metadata_consider_downloading_target);
658+
}
654659
}
660+
655661
// Suggest using #![no_std]. #[no_core] is unstable and not really supported anyway.
656662
// NOTE: this is a dummy span if `extern crate std` was injected by the compiler.
657663
// If it's not a dummy, that means someone added `extern crate std` explicitly and

library/alloc/src/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ impl From<&CStr> for Arc<CStr> {
888888
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
889889
impl From<CString> for Rc<CStr> {
890890
/// Converts a [`CString`] into an <code>[Rc]<[CStr]></code> by moving the [`CString`]
891-
/// data into a new [`Arc`] buffer.
891+
/// data into a new [`Rc`] buffer.
892892
#[inline]
893893
fn from(s: CString) -> Rc<CStr> {
894894
let rc: Rc<[u8]> = Rc::from(s.into_inner());

tests/rustdoc-gui/notable-trait.goml

+15-15
Original file line numberDiff line numberDiff line change
@@ -175,35 +175,35 @@ call-function: (
175175
"check-colors",
176176
{
177177
"theme": "ayu",
178-
"link_color": "rgb(57, 175, 215)",
179-
"content_color": "rgb(230, 225, 207)",
180-
"header_color": "rgb(255, 255, 255)",
181-
"type_color": "rgb(255, 160, 165)",
182-
"trait_color": "rgb(57, 175, 215)",
178+
"link_color": "#39afd7",
179+
"content_color": "#e6e1cf",
180+
"header_color": "#fff",
181+
"type_color": "#ffa0a5",
182+
"trait_color": "#39afd7",
183183
},
184184
)
185185

186186
call-function: (
187187
"check-colors",
188188
{
189189
"theme": "dark",
190-
"link_color": "rgb(210, 153, 29)",
191-
"content_color": "rgb(221, 221, 221)",
192-
"header_color": "rgb(221, 221, 221)",
193-
"type_color": "rgb(45, 191, 184)",
194-
"trait_color": "rgb(183, 140, 242)",
190+
"link_color": "#d2991d",
191+
"content_color": "#ddd",
192+
"header_color": "#ddd",
193+
"type_color": "#2dbfb8",
194+
"trait_color": "#b78cf2",
195195
},
196196
)
197197

198198
call-function: (
199199
"check-colors",
200200
{
201201
"theme": "light",
202-
"link_color": "rgb(56, 115, 173)",
203-
"content_color": "rgb(0, 0, 0)",
204-
"header_color": "rgb(0, 0, 0)",
205-
"type_color": "rgb(173, 55, 138)",
206-
"trait_color": "rgb(110, 79, 201)",
202+
"link_color": "#3873ad",
203+
"content_color": "black",
204+
"header_color": "black",
205+
"type_color": "#ad378a",
206+
"trait_color": "#6e4fc9",
207207
},
208208
)
209209

0 commit comments

Comments
 (0)