Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7f442f8

Browse files
committedAug 31, 2022
Auto merge of #101220 - JohnTitor:rollup-ov7upr7, r=JohnTitor
Rollup of 10 pull requests Successful merges: - #100804 (Fix search results color on hover for ayu theme) - #100892 (Add `AsFd` implementations for stdio types on WASI.) - #100927 (Adding new Fuchsia rustup docs... reworking walkthrough) - #101088 (Set DebuginfoKind::Pdb in msvc_base) - #101159 (add tracking issue number to const_slice_split_at_not_mut) - #101192 (Remove path string) - #101193 (Avoid zeroing large stack buffers in stdio on Windows) - #101197 (:arrow_up: rust-analyzer) - #101200 (Add test for issue #85872) - #101219 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents f07d6e8 + 0cbc589 commit 7f442f8

File tree

88 files changed

+2576
-1001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2576
-1001
lines changed
 

‎compiler/rustc_infer/src/infer/error_reporting/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,22 +2055,22 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
20552055
(exp_found.expected.kind(), exp_found.found.kind())
20562056
{
20572057
if let ty::Adt(found_def, found_substs) = *found_ty.kind() {
2058-
let path_str = format!("{:?}", exp_def);
20592058
if exp_def == &found_def {
2060-
let opt_msg = "you can convert from `&Option<T>` to `Option<&T>` using \
2061-
`.as_ref()`";
2062-
let result_msg = "you can convert from `&Result<T, E>` to \
2063-
`Result<&T, &E>` using `.as_ref()`";
20642059
let have_as_ref = &[
2065-
("std::option::Option", opt_msg),
2066-
("core::option::Option", opt_msg),
2067-
("std::result::Result", result_msg),
2068-
("core::result::Result", result_msg),
2060+
(
2061+
sym::Option,
2062+
"you can convert from `&Option<T>` to `Option<&T>` using \
2063+
`.as_ref()`",
2064+
),
2065+
(
2066+
sym::Result,
2067+
"you can convert from `&Result<T, E>` to \
2068+
`Result<&T, &E>` using `.as_ref()`",
2069+
),
20692070
];
2070-
if let Some(msg) = have_as_ref
2071-
.iter()
2072-
.find_map(|(path, msg)| (&path_str == path).then_some(msg))
2073-
{
2071+
if let Some(msg) = have_as_ref.iter().find_map(|(name, msg)| {
2072+
self.tcx.is_diagnostic_item(*name, exp_def.did()).then_some(msg)
2073+
}) {
20742074
let mut show_suggestion = true;
20752075
for (exp_ty, found_ty) in
20762076
iter::zip(exp_substs.types(), found_substs.types())

‎compiler/rustc_target/src/spec/msvc_base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::{LinkerFlavor, LldFlavor, SplitDebuginfo, TargetOptions};
1+
use crate::spec::{DebuginfoKind, LinkerFlavor, LldFlavor, SplitDebuginfo, TargetOptions};
22
use std::borrow::Cow;
33

44
pub fn opts() -> TargetOptions {
@@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions {
2020
// where `*.pdb` files show up next to the final artifact.
2121
split_debuginfo: SplitDebuginfo::Packed,
2222
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Packed]),
23+
debuginfo_kind: DebuginfoKind::Pdb,
2324

2425
..Default::default()
2526
}

0 commit comments

Comments
 (0)
Please sign in to comment.