From 5bc0e0e188dbb1f15018305f066dbe088d0f79ca Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 19 Apr 2018 09:40:46 -0700 Subject: [PATCH] Add a comment advertising `NullTrapSink`. --- lib/codegen/src/binemit/memorysink.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/codegen/src/binemit/memorysink.rs b/lib/codegen/src/binemit/memorysink.rs index 6871dc0942..fa4aacc233 100644 --- a/lib/codegen/src/binemit/memorysink.rs +++ b/lib/codegen/src/binemit/memorysink.rs @@ -68,6 +68,9 @@ pub trait RelocSink { } /// A trait for receiving trap codes and offsets. +/// +/// If you don't need information about possible traps, you can use the +/// [`NullTrapSink`](binemit/trait.TrapSink.html) implementation. pub trait TrapSink { /// Add trap information for a specific offset. fn trap(&mut self, CodeOffset, SourceLoc, TrapCode);