Skip to content

Commit f892a15

Browse files
make NOPPrintDecorator non-pub
1 parent bf7b4a6 commit f892a15

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/ir/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub trait PrintDecorator {
5050
}
5151

5252
#[derive(Default)]
53-
pub struct NOPPrintDecorator();
53+
pub(crate) struct NOPPrintDecorator();
5454
impl PrintDecorator for NOPPrintDecorator {}
5555

5656
/// A wrapper around a `FunctionBody` together with some auxiliary

src/ir/func.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use super::{
2-
Block, FunctionBodyDisplay, Local, Module, PrintDecorator, Signature, Type, Value, ValueDef,
2+
Block, FunctionBodyDisplay, Local, Module, NOPPrintDecorator, PrintDecorator, Signature, Type,
3+
Value, ValueDef,
34
};
45
use crate::backend::WasmFuncBackend;
56
use crate::cfg::CFGInfo;
@@ -452,8 +453,8 @@ impl FunctionBody {
452453
&'a self,
453454
indent: &'a str,
454455
module: Option<&'a Module>,
455-
) -> FunctionBodyDisplay<'a, super::NOPPrintDecorator> {
456-
FunctionBodyDisplay {
456+
) -> FunctionBodyDisplay<'a, impl PrintDecorator> {
457+
FunctionBodyDisplay::<NOPPrintDecorator> {
457458
body: self,
458459
indent,
459460
verbose: false,
@@ -488,8 +489,8 @@ impl FunctionBody {
488489
&'a self,
489490
indent: &'a str,
490491
module: Option<&'a Module>,
491-
) -> FunctionBodyDisplay<'a, super::NOPPrintDecorator> {
492-
FunctionBodyDisplay {
492+
) -> FunctionBodyDisplay<'a, impl PrintDecorator> {
493+
FunctionBodyDisplay::<NOPPrintDecorator> {
493494
body: self,
494495
indent,
495496
verbose: true,

src/ir/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ impl<'a> Module<'a> {
330330

331331
/// Return a wrapper that implements Display on this module,
332332
/// pretty-printing it as textual IR.
333-
pub fn display<'b>(&'b self) -> ModuleDisplay<'b, NOPPrintDecorator>
333+
pub fn display<'b>(&'b self) -> ModuleDisplay<'b, impl PrintDecorator>
334334
where
335335
'b: 'a,
336336
{
337-
ModuleDisplay {
337+
ModuleDisplay::<NOPPrintDecorator> {
338338
module: self,
339339
decorators: None,
340340
}

0 commit comments

Comments
 (0)