Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
fc1b45f
constify DoubleEndedIterator
Randl Jan 31, 2026
bf5adeb
Add reference link for HIR ID validator
reddevilmidzy Mar 12, 2026
8e932ed
Use convergent attribute to funcs for GPU targets
Flakebi Dec 4, 2025
df4242f
Document AST lowering implementation
reddevilmidzy Mar 19, 2026
126c923
new on_unimplemented match values
malezjaa Mar 21, 2026
2c09d28
start paragraph with upper case
tshepang Mar 23, 2026
8662d07
Merge pull request #2804 from rust-lang/tshepang/fix
tshepang Mar 23, 2026
6a4a3b3
Update information about adding unit tests
Nokel81 Mar 26, 2026
04cec1e
Tweak wording of adding new tests guide
Nokel81 Mar 26, 2026
ea73452
Merge pull request #2806 from Nokel81/patch-1
jyn514 Mar 26, 2026
c9d6463
Mention GPU notification group
apiraino Mar 26, 2026
6eb9ff6
Explain how nested generic args are represented
khyperia Mar 28, 2026
99f0fd9
reflow sentence regarding early bounds
tshepang Mar 28, 2026
66067c6
Merge pull request #2805 from rust-lang/tshepang-patch-1
tshepang Mar 28, 2026
74b3d55
Fix rustc_hir::Crate links
reddevilmidzy Mar 29, 2026
6071f4d
Merge pull request #2810 from reddevilmidzy/hir-crate
reddevilmidzy Mar 29, 2026
bb21934
Add explanation of default flags for UI tests
reddevilmidzy Mar 30, 2026
5cbbc61
Merge pull request #2811 from rust-lang/ui
jyn514 Mar 30, 2026
10d2822
add chapter on projection vs trait split
lcnr Mar 30, 2026
ee44565
Merge pull request #2812 from lcnr/main
lcnr Mar 30, 2026
4ffd0b5
reword `Self` parameter bullet point
BoxyUwU Mar 30, 2026
9b073a0
Merge pull request #2809 from khyperia/fix-2776
BoxyUwU Mar 30, 2026
dab7d0a
cleanup
lcnr Mar 30, 2026
c29def2
Merge pull request #2813 from lcnr/main
lcnr Mar 30, 2026
20ce0f0
Fix rustc-pull CI workflow
Kobzol Apr 1, 2026
c11636c
Merge pull request #2815 from Kobzol/ci-pr-author
Kobzol Apr 1, 2026
9a01adc
Change 'ConstValue::ByRef' to 'ConstValue::Indirect'
gurry Apr 2, 2026
8616930
Merge pull request #2817 from gurry/patch-1
tshepang Apr 2, 2026
972b088
Merge pull request #2807 from apiraino/add-gpu-target
apiraino Apr 2, 2026
938b564
Extend and tweak the glossary
fmease Nov 4, 2024
4b81ebf
Merge pull request #2818 from fmease/extend-glossary
fmease Apr 2, 2026
9e06819
Update hir::Crate link
reddevilmidzy Apr 3, 2026
004a414
Merge pull request #2820 from reddevilmidzy/hir
reddevilmidzy Apr 3, 2026
48db8c7
Update docs to use `TyCtxtEnsureOk::typeck`
reddevilmidzy Apr 3, 2026
20f89a5
Merge pull request #2819 from reddevilmidzy/typeck
reddevilmidzy Apr 4, 2026
28c9494
Prepare for merging from rust-lang/rust
invalid-email-address Apr 6, 2026
1b2376b
Merge ref '9602bda1dd0c' from rust-lang/rust
invalid-email-address Apr 6, 2026
069e5e0
Merge pull request #2823 from rust-lang/rustc-pull
reddevilmidzy Apr 6, 2026
f9430bb
Don't store `pattern_ty` in `TestableCase`
Zalathar Apr 6, 2026
05320a2
Add getters for `rustc_pattern_analysis::constructor::Slice` fields
ChayimFriedman2 Apr 7, 2026
b400f22
Show the guard exhaustivity note only when it's the guards alone that…
jakubadamw Apr 7, 2026
db8ce5f
Update results for tests affected by the change
jakubadamw Apr 7, 2026
89a4742
Fix ICE in next-solver dyn-compatibility check
cijiugechu Apr 7, 2026
975761c
Use derived impl for `GappedRange` subdiagnostic
mejrs Apr 7, 2026
ef9b7c2
replace span_look_ahead with span_followed_by
chenyukang Apr 3, 2026
ca69168
missing pause
tshepang Apr 8, 2026
8b7de24
Merge pull request #2801 from malezjaa/new-on-unimplemented-match-values
tshepang Apr 8, 2026
1b09ce5
Prepare for merging from rust-lang/rust
invalid-email-address Apr 8, 2026
444452b
Merge ref '30d0309fa821' from rust-lang/rust
invalid-email-address Apr 8, 2026
fdb83d4
Merge pull request #2824 from rust-lang/rustc-pull
tshepang Apr 8, 2026
f803c18
Merge pull request #2800 from reddevilmidzy/ast-low
tshepang Apr 8, 2026
97eb1be
sembr src/appendix/code-index.md
tshepang Apr 8, 2026
49b1d75
re-wrap
tshepang Apr 8, 2026
91cfd3b
sembr src/const-eval/interpret.md
tshepang Apr 8, 2026
238aabb
whitespace
tshepang Apr 8, 2026
67ce02b
sembr src/traits/separate-projection-bounds.md
tshepang Apr 8, 2026
66bf17e
slight improvements
tshepang Apr 8, 2026
425b2b3
skipped by sembr tool (due to "e.g.")
tshepang Apr 8, 2026
b03b12e
sembr src/ty-module/generic-arguments.md
tshepang Apr 8, 2026
7440567
re-wrap
tshepang Apr 8, 2026
2554c21
sembr src/hir.md
tshepang Apr 8, 2026
9634bb7
re-wrap
tshepang Apr 8, 2026
d82e7c1
sembr src/rustdoc-internals.md
tshepang Apr 8, 2026
9c0a072
re-wrap
tshepang Apr 8, 2026
da97a7f
sembr src/tests/adding.md
tshepang Apr 8, 2026
050110d
re-flow
tshepang Apr 8, 2026
5f86947
Merge pull request #2826 from rust-lang/tshepang/nits
tshepang Apr 8, 2026
ee33056
Merge pull request #2825 from rust-lang/tshepang/sembr
tshepang Apr 8, 2026
df86b6a
Rollup merge of #153995 - Flakebi:gpu-use-convergent, r=nnethercote
JonathanBrouwer Apr 8, 2026
2aeb020
Rollup merge of #151898 - Randl:const-double-iter, r=oli-obk
JonathanBrouwer Apr 8, 2026
a277155
Rollup merge of #154745 - chenyukang:yukang-fix-span-api, r=nnethercote
JonathanBrouwer Apr 8, 2026
3a58837
Rollup merge of #154879 - Zalathar:pattern-ty, r=Nadrieril
JonathanBrouwer Apr 8, 2026
3109e1e
Rollup merge of #154923 - cijiugechu:fix-ice-unsafe-binders-next-solv…
JonathanBrouwer Apr 8, 2026
90ed162
Rollup merge of #154934 - ChayimFriedman2:export-pat-slice, r=Nadrieril
JonathanBrouwer Apr 8, 2026
b932b6f
Rollup merge of #154938 - jakubadamw:issue-104653, r=Nadrieril
JonathanBrouwer Apr 8, 2026
4d295d0
Rollup merge of #154961 - mejrs:yeet_the_fixme, r=Nadrieril
JonathanBrouwer Apr 8, 2026
26d18b8
Rollup merge of #154980 - tshepang:rdg-sync, r=tshepang
JonathanBrouwer Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions compiler/rustc_codegen_llvm/src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ fn create_wrapper_function(
None
};

if tcx.sess.target.is_like_gpu {
// Conservatively apply convergent to all functions in case they may call
// a convergent function. Rely on LLVM to optimize away the unnecessary
// convergent attributes.
attributes::apply_to_llfn(
llfn,
llvm::AttributePlace::Function,
&[llvm::AttributeKind::Convergent.create_attr(cx.llcx)],
);
}

let llbb = unsafe { llvm::LLVMAppendBasicBlockInContext(cx.llcx, llfn, c"entry".as_ptr()) };
let mut bx = SBuilder::build(&cx, llbb);

Expand Down
9 changes: 8 additions & 1 deletion compiler/rustc_codegen_llvm/src/declare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use std::borrow::Borrow;

use itertools::Itertools;
use rustc_codegen_ssa::traits::TypeMembershipCodegenMethods;
use rustc_codegen_ssa::traits::{MiscCodegenMethods, TypeMembershipCodegenMethods};
use rustc_data_structures::fx::FxIndexSet;
use rustc_middle::ty::{Instance, Ty};
use rustc_sanitizers::{cfi, kcfi};
Expand Down Expand Up @@ -70,6 +70,13 @@ pub(crate) fn declare_raw_fn<'ll, 'tcx>(

let mut attrs = SmallVec::<[_; 4]>::new();

if cx.sess().target.is_like_gpu {
// Conservatively apply convergent to all functions in case they may call
// a convergent function. Rely on LLVM to optimize away the unnecessary
// convergent attributes.
attrs.push(llvm::AttributeKind::Convergent.create_attr(cx.llcx));
}

if cx.tcx.sess.opts.cg.no_redzone.unwrap_or(cx.tcx.sess.target.disable_redzone) {
attrs.push(llvm::AttributeKind::NoRedZone.create_attr(cx.llcx));
}
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_llvm/src/llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ pub(crate) enum AttributeKind {
CapturesNone = 46,
SanitizeRealtimeNonblocking = 47,
SanitizeRealtimeBlocking = 48,
Convergent = 49,
}

/// LLVMIntPredicate
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ enum class LLVMRustAttributeKind {
CapturesNone = 46,
SanitizeRealtimeNonblocking = 47,
SanitizeRealtimeBlocking = 48,
Convergent = 49,
};

static Attribute::AttrKind fromRust(LLVMRustAttributeKind Kind) {
Expand Down Expand Up @@ -461,6 +462,8 @@ static Attribute::AttrKind fromRust(LLVMRustAttributeKind Kind) {
return Attribute::SanitizeRealtime;
case LLVMRustAttributeKind::SanitizeRealtimeBlocking:
return Attribute::SanitizeRealtimeBlocking;
case LLVMRustAttributeKind::Convergent:
return Attribute::Convergent;
}
report_fatal_error("bad LLVMRustAttributeKind");
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/builder/matches/match_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ impl<'tcx> MatchPairTree<'tcx> {
}

PatKind::Range(ref range) => {
assert_eq!(pattern.ty, range.ty);
if range.is_full_range(cx.tcx) == Some(true) {
None
} else {
Expand Down Expand Up @@ -380,7 +381,6 @@ impl<'tcx> MatchPairTree<'tcx> {
place,
testable_case,
subpairs,
pattern_ty: pattern.ty,
pattern_span: pattern.span,
})
} else {
Expand Down
6 changes: 2 additions & 4 deletions compiler/rustc_mir_build/src/builder/matches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ enum PatConstKind {
/// tested, and a test to perform on that place.
///
/// Each node also has a list of subpairs (possibly empty) that must also match,
/// and a reference to the THIR pattern it represents.
/// and some additional information from the THIR pattern it represents.
#[derive(Debug, Clone)]
pub(crate) struct MatchPairTree<'tcx> {
/// This place...
Expand All @@ -1301,9 +1301,7 @@ pub(crate) struct MatchPairTree<'tcx> {
/// that tests its field for the value `3`.
subpairs: Vec<Self>,

/// Type field of the pattern this node was created from.
pattern_ty: Ty<'tcx>,
/// Span field of the pattern this node was created from.
/// Span field of the THIR pattern this node was created from.
pattern_span: Span,
}

Expand Down
5 changes: 1 addition & 4 deletions compiler/rustc_mir_build/src/builder/matches/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
TestKind::ScalarEq { value }
}

TestableCase::Range(ref range) => {
assert_eq!(range.ty, match_pair.pattern_ty);
TestKind::Range(Arc::clone(range))
}
TestableCase::Range(ref range) => TestKind::Range(Arc::clone(range)),

TestableCase::Slice { len, op } => TestKind::SliceLen { len, op },

Expand Down
20 changes: 16 additions & 4 deletions compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,18 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
| hir::MatchSource::AwaitDesugar
| hir::MatchSource::FormatArgs => None,
};

// Check if the match would be exhaustive if all guards were removed.
// If so, we leave a note that guards don't count towards exhaustivity.
let would_be_exhaustive_without_guards = {
let any_arm_has_guard = tarms.iter().any(|arm| arm.has_guard);
any_arm_has_guard && {
let guardless_arms: Vec<_> =
tarms.iter().map(|arm| MatchArm { has_guard: false, ..*arm }).collect();
rustc_pattern_analysis::rustc::analyze_match(&cx, &guardless_arms, scrut.ty)
.is_ok_and(|report| report.non_exhaustiveness_witnesses.is_empty())
}
};
self.error = Err(report_non_exhaustive_match(
&cx,
self.thir,
Expand All @@ -540,6 +552,7 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
witnesses,
arms,
braces_span,
would_be_exhaustive_without_guards,
));
}
}
Expand Down Expand Up @@ -1100,8 +1113,7 @@ fn report_arm_reachability<'p, 'tcx>(
let arm_span = cx.tcx.hir_span(hir_id);
let whole_arm_span = if is_match_arm {
// If the arm is followed by a comma, extend the span to include it.
let with_whitespace = sm.span_extend_while_whitespace(arm_span);
if let Some(comma) = sm.span_look_ahead(with_whitespace, ",", Some(1)) {
if let Some(comma) = sm.span_followed_by(arm_span, ",") {
Some(arm_span.to(comma))
} else {
Some(arm_span)
Expand Down Expand Up @@ -1154,6 +1166,7 @@ fn report_non_exhaustive_match<'p, 'tcx>(
witnesses: Vec<WitnessPat<'p, 'tcx>>,
arms: &[ArmId],
braces_span: Option<Span>,
would_be_exhaustive_without_guards: bool,
) -> ErrorGuaranteed {
let is_empty_match = arms.is_empty();
let non_empty_enum = match scrut_ty.kind() {
Expand Down Expand Up @@ -1364,8 +1377,7 @@ fn report_non_exhaustive_match<'p, 'tcx>(
},
);

let all_arms_have_guards = arms.iter().all(|arm_id| thir[*arm_id].guard.is_some());
if !is_empty_match && all_arms_have_guards {
if would_be_exhaustive_without_guards {
err.subdiagnostic(NonExhaustiveMatchAllArmsGuarded);
}
if let Some((span, sugg)) = suggestion {
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_pattern_analysis/src/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,15 @@ impl Slice {
other.kind.covers_length(self.arity())
}

// Getters. They are used by rust-analyzer.
pub fn array_len(self) -> Option<usize> {
self.array_len
}

pub fn kind(self) -> SliceKind {
self.kind
}

/// This computes constructor splitting for variable-length slices, as explained at the top of
/// the file.
///
Expand Down
19 changes: 5 additions & 14 deletions compiler/rustc_pattern_analysis/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use rustc_errors::{Diag, EmissionGuarantee, Subdiagnostic};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_middle::ty::Ty;
use rustc_span::Span;
Expand Down Expand Up @@ -99,25 +98,17 @@ pub struct ExclusiveRangeMissingGap {
pub gap_with: Vec<GappedRange>,
}

#[derive(Subdiagnostic)]
#[label(
"this could appear to continue range `{$first_range}`, but `{$gap}` isn't matched by either of them"
)]
pub struct GappedRange {
#[primary_span]
pub span: Span,
pub gap: String, // a printed pattern
pub first_range: String, // a printed pattern
}

impl Subdiagnostic for GappedRange {
fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
let GappedRange { span, gap, first_range } = self;

// FIXME(mejrs) Use `#[subdiagnostic(eager)]` instead
let message = format!(
"this could appear to continue range `{first_range}`, but `{gap}` isn't matched by \
either of them"
);
diag.span_label(span, message);
}
}

#[derive(Diagnostic)]
#[diag("some variants are not matched explicitly")]
#[help("ensure that all variants are matched explicitly by adding the suggested match arms")]
Expand Down
8 changes: 3 additions & 5 deletions compiler/rustc_resolve/src/ident.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1467,11 +1467,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
// `const name: Ty = expr;`. This is a heuristic, it will
// break down in the presence of macros.
let sm = self.tcx.sess.source_map();
let type_span = match sm.span_look_ahead(
original_rib_ident_def.span,
":",
None,
) {
let type_span = match sm
.span_followed_by(original_rib_ident_def.span, ":")
{
None => {
Some(original_rib_ident_def.span.shrink_to_hi())
}
Expand Down
22 changes: 18 additions & 4 deletions compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1989,10 +1989,25 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
// where a brace being opened means a block is being started. Look
// ahead for the next text to see if `span` is followed by a `{`.
let sm = self.r.tcx.sess.source_map();
if let Some(followed_brace_span) = sm.span_look_ahead(span, "{", Some(50)) {
if let Some(open_brace_span) = sm.span_followed_by(span, "{") {
// In case this could be a struct literal that needs to be surrounded
// by parentheses, find the appropriate span.
let close_brace_span = sm.span_look_ahead(followed_brace_span, "}", Some(50));
let close_brace_span =
sm.span_to_next_source(open_brace_span).ok().and_then(|next_source| {
// Find the matching `}` accounting for nested braces.
let mut depth: u32 = 1;
let offset = next_source.char_indices().find_map(|(i, c)| {
match c {
'{' => depth += 1,
'}' if depth == 1 => return Some(i),
'}' => depth -= 1,
_ => {}
}
None
})?;
let start = open_brace_span.hi() + rustc_span::BytePos(offset as u32);
Some(open_brace_span.with_lo(start).with_hi(start + rustc_span::BytePos(1)))
});
let closing_brace = close_brace_span.map(|sp| span.to(sp));
(true, closing_brace)
} else {
Expand Down Expand Up @@ -4110,8 +4125,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
let sugg: String = std::iter::repeat_n(existing_name.as_str(), lt.count)
.intersperse(", ")
.collect();
let is_empty_brackets =
source_map.span_look_ahead(lt.span, ">", Some(50)).is_some();
let is_empty_brackets = source_map.span_followed_by(lt.span, ">").is_some();
let sugg = if is_empty_brackets { sugg } else { format!("{sugg}, ") };
(lt.span.shrink_to_hi(), sugg)
}
Expand Down
22 changes: 7 additions & 15 deletions compiler/rustc_span/src/source_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -964,21 +964,13 @@ impl SourceMap {
Span::new(BytePos(start_of_next_point), end_of_next_point, sp.ctxt, None)
}

/// Check whether span is followed by some specified expected string in limit scope
pub fn span_look_ahead(&self, span: Span, expect: &str, limit: Option<usize>) -> Option<Span> {
let mut sp = span;
for _ in 0..limit.unwrap_or(100_usize) {
sp = self.next_point(sp);
if let Ok(ref snippet) = self.span_to_snippet(sp) {
if snippet == expect {
return Some(sp);
}
if snippet.chars().any(|c| !c.is_whitespace()) {
break;
}
}
}
None
/// Check whether span is followed by some specified target string, ignoring whitespace.
/// *Only suitable for diagnostics.*
pub fn span_followed_by(&self, span: Span, target: &str) -> Option<Span> {
let span = self.span_extend_while_whitespace(span);
self.span_to_next_source(span).ok()?.strip_prefix(target).map(|_| {
Span::new(span.hi(), span.hi() + BytePos(target.len() as u32), span.ctxt(), None)
})
}

/// Finds the width of the character, either before or after the end of provided span,
Expand Down
19 changes: 19 additions & 0 deletions compiler/rustc_span/src/source_map/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,25 @@ fn test_next_point() {
assert!(sm.span_to_snippet(span).is_err());
}

#[test]
fn test_span_followed_by_stops_at_end_of_file() {
let sm = SourceMap::new(FilePathMapping::empty());
sm.new_source_file(filename(&sm, "example.rs"), "x".to_string());

let span = Span::with_root_ctxt(BytePos(0), BytePos(1));
assert_eq!(sm.span_followed_by(span, "y"), None);
}

#[test]
fn test_span_followed_by_skips_whitespace() {
let sm = SourceMap::new(FilePathMapping::empty());
sm.new_source_file(filename(&sm, "example.rs"), "x \n yz".to_string());

let span = Span::with_root_ctxt(BytePos(0), BytePos(1));
let span = sm.span_followed_by(span, "yz").unwrap();
assert_eq!(sm.span_to_snippet(span), Ok("yz".to_string()));
}

#[cfg(target_os = "linux")]
#[test]
fn read_binary_file_handles_lying_stat() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
(cand.self_ty().kind(), main_trait_predicate.self_ty().skip_binder().kind())
{
// Wrap method receivers and `&`-references in parens
let suggestion = if self.tcx.sess.source_map().span_look_ahead(span, ".", Some(50)).is_some() {
let suggestion = if self.tcx.sess.source_map().span_followed_by(span, ".").is_some() {
vec![
(span.shrink_to_lo(), format!("(")),
(span.shrink_to_hi(), format!(" as {})", cand.self_ty())),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ fn receiver_for_self_ty<'tcx>(
/// contained by the trait object, because the object that needs to be coerced is behind
/// a pointer.
///
/// If lowering already produced an error in the receiver type, we conservatively treat it as
/// undispatchable instead of asking the solver.
///
/// In practice, we cannot use `dyn Trait` explicitly in the obligation because it would result in
/// a new check that `Trait` is dyn-compatible, creating a cycle.
/// Instead, we emulate a placeholder by introducing a new type parameter `U` such that
Expand Down Expand Up @@ -630,6 +633,10 @@ fn receiver_is_dispatchable<'tcx>(
) -> bool {
debug!("receiver_is_dispatchable: method = {:?}, receiver_ty = {:?}", method, receiver_ty);

if receiver_ty.references_error() {
return false;
}

let (Some(unsize_did), Some(dispatch_from_dyn_did)) =
(tcx.lang_items().unsize_trait(), tcx.lang_items().dispatch_from_dyn_trait())
else {
Expand Down
Loading
Loading