minor changes to make method lookup diagnostic code easier to read#103937
minor changes to make method lookup diagnostic code easier to read#103937bors merged 1 commit intorust-lang:masterfrom
Conversation
|
@bors r+ |
| match self.tcx.hir().get_if_local(impl_def_id) { | ||
| // Unmet obligation comes from a `derive` macro, point at it once to | ||
| // avoid multiple span labels pointing at the same place. | ||
| Some(Node::Item(hir::Item { |
There was a problem hiding this comment.
I'm pretty convinced that this code will never be triggered, but if it is, someone will report it as an ICE 😅
There was a problem hiding this comment.
For this to be triggered, we need to have a nested obligation of a trait be reported as an unsatisfied predicate for a method to be applicable. We only construct nested trait obligations with ImplDerivedObligation causes for auto traits, which have no methods.
There was a problem hiding this comment.
#105732 is here,
maybe we should add an delay_span_bug here for match with Some(node)?
@compiler-errors
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#103367 (Remove std's transitive dependency on cfg-if 0.1) - rust-lang#103397 (Port `dead_code` lints to be translatable.) - rust-lang#103681 (libtest: run all tests in their own thread, if supported by the host) - rust-lang#103792 (Migrate `codegen_ssa` to diagnostics structs - [Part 2]) - rust-lang#103897 (asm: Work around LLVM bug on AArch64) - rust-lang#103937 (minor changes to make method lookup diagnostic code easier to read) - rust-lang#103958 (Test tidy should not count untracked paths towards entries limit) - rust-lang#103964 (Give a specific lint for unsafety not being inherited) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
| @@ -248,7 +248,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | |||
|
|
|||
| match error { | |||
| MethodError::NoMatch(NoMatchData { | |||
There was a problem hiding this comment.
This block is tooo long, about 800 lines of code!
Is it worth to extract to a seperate sub-methods?
@compiler-errors
The end result of around 4 days of trying to understand this 1000+ line long function- a bunch of tiny nitpicks
r? @compiler-errors