about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2021-10-23 21:05:03 +0200
committerlcnr <rust@lcnr.de>2021-11-10 15:10:19 +0100
commitf55ff4103f4e75309954cfe93ea0994646430fbb (patch)
tree823e5fd54bdad77d82762245e5a10df0503e4357
parent1296719c061fb4dd594f5c84e223be30d8611d95 (diff)
downloadrust-f55ff4103f4e75309954cfe93ea0994646430fbb.tar.gz
rust-f55ff4103f4e75309954cfe93ea0994646430fbb.zip
don't inline `report_overlap_conflict`
-rw-r--r--compiler/rustc_trait_selection/src/traits/specialize/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
index 96ab399424e..b64c5559227 100644
--- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
@@ -291,6 +291,11 @@ pub(super) fn specialization_graph_provider(
     sg
 }
 
+// This function is only used when
+// encountering errors and inlining
+// it negatively impacts perf.
+#[cold]
+#[inline(never)]
 fn report_overlap_conflict(
     tcx: TyCtxt<'_>,
     overlap: OverlapError,