Skip to content

Commit

Permalink
clippy and doc updates after rust upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vaivaswatha committed Oct 7, 2023
1 parent 4c7e3b4 commit 571b733
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/dialects/builtin/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Verify for ModuleOp {

impl ModuleOp {
/// Create a new [ModuleOp].
/// The underlying [Operation] is not linked to a [BasicBlock](crate::basic_block::BasicBlock).
/// The underlying [Operation] is not linked to a [BasicBlock].
/// The returned module has a single [crate::region::Region] with a single (BasicBlock)[crate::basic_block::BasicBlock].
pub fn new(ctx: &mut Context, name: &str) -> ModuleOp {
let op = Operation::new(ctx, Self::get_opid_static(), vec![], vec![], 1);
Expand Down Expand Up @@ -112,7 +112,7 @@ impl FuncOp {
pub const ATTR_KEY_FUNC_TYPE: &str = "func.type";

/// Create a new [FuncOp].
/// The underlying [Operation] is not linked to a [BasicBlock](crate::basic_block::BasicBlock).
/// The underlying [Operation] is not linked to a [BasicBlock].
/// The returned function has a single region with an empty `entry` block.
pub fn new_unlinked(ctx: &mut Context, name: &str, ty: Ptr<TypeObj>) -> FuncOp {
let ty_attr = TypeAttr::create(ty);
Expand Down Expand Up @@ -230,8 +230,7 @@ impl ConstantOp {
}
}

/// Create a new [ConstantOp]. The underlying [Operation] is not linked to a
/// [BasicBlock](crate::basic_block::BasicBlock).
/// Create a new [ConstantOp]. The underlying [Operation] is not linked to a [BasicBlock].
pub fn new_unlinked(ctx: &mut Context, value: AttrObj) -> ConstantOp {
let result_type = attr_cast::<dyn TypedAttrInterface>(&*value)
.expect("ConstantOp const value must provide TypedAttrInterface")
Expand Down
2 changes: 1 addition & 1 deletion src/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ pub fn type_parse<'a>(
type_parser.parse_stream(state_stream)
}

//// A parser combinator to parse [TypeId] followed by the type's contents.
/// A parser combinator to parse [TypeId] followed by the type's contents.
pub fn type_parser<'a>(
) -> Box<dyn Parser<StateStream<'a>, Output = Ptr<TypeObj>, PartialState = ()> + 'a> {
combine::parser(|parsable_state: &mut StateStream<'a>| type_parse(parsable_state).into_result())
Expand Down

0 comments on commit 571b733

Please sign in to comment.