about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-07-04 18:13:16 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-07-06 19:09:50 +0900
commit0541b4e03469ea5d3f9ce131a270d49e4a7363ff (patch)
treec10b5130ba7d82c79de9d2eaec2bb5607b89049d /compiler/rustc_trait_selection/src
parent3d1b679a3c3e4b5b0a408e3ba59549bd6c182b1b (diff)
downloadrust-0541b4e03469ea5d3f9ce131a270d49e4a7363ff.tar.gz
rust-0541b4e03469ea5d3f9ce131a270d49e4a7363ff.zip
use `named_span` in case of tuple variant
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/specialize/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
index ff24ea63c0b..0617a0a54cf 100644
--- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
@@ -341,7 +341,7 @@ fn report_negative_positive_conflict(
     positive_impl_def_id: DefId,
     sg: &mut specialization_graph::Graph,
 ) {
-    let impl_span = tcx.span_of_impl(local_impl_def_id.to_def_id()).unwrap();
+    let impl_span = tcx.def_span(local_impl_def_id);
 
     let mut err = struct_span_err!(
         tcx.sess,