Skip to content

Commit

Permalink
make Program public and make traits private
Browse files Browse the repository at this point in the history
  • Loading branch information
brasswood committed Nov 25, 2024
1 parent 70daa43 commit c8e6a2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/run-pass/assembly_ast_dyn_type_param_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ extern crate peg;
use peg::parser;

// C++ in Rust
pub trait Operation<'a>: std::fmt::Debug {}
pub trait Operand<'a>: std::fmt::Debug + AsDynOperand<'a> {}
pub trait Location<'a>: Operand<'a> {}
trait Operation<'a>: std::fmt::Debug {}
trait Operand<'a>: std::fmt::Debug + AsDynOperand<'a> {}
trait Location<'a>: Operand<'a> {}
impl<'a, T: ?Sized + Location<'a>> Operand<'a> for T {}

pub trait AsDynOperand<'a> {
trait AsDynOperand<'a> {
fn as_dyn_operand(self: Box<Self>) -> Box<dyn Operand<'a> + 'a>;
}

Expand All @@ -20,7 +20,7 @@ impl<'a, T: /* Sized + */ Operand<'a> + 'a> AsDynOperand<'a> for T {


#[derive(Debug)]
struct Program<'a>(Vec<Box<dyn Operation<'a> + 'a>>);
pub struct Program<'a>(Vec<Box<dyn Operation<'a> + 'a>>);

#[derive(Debug)]
struct Add<'a> {
Expand Down

0 comments on commit c8e6a2c

Please sign in to comment.