summaryrefslogtreecommitdiff
path: root/src/ir/function.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-07-10 15:16:14 -0700
committerGitHub <noreply@github.com>2017-07-10 15:16:14 -0700
commita00db0446f7296891c2c78bd19cdbff825e1a18f (patch)
tree3ec07ef83d22ceb36d87c626cf64c324949172a7 /src/ir/function.rs
parent02afb5b4b1b1e5d49743d6529bce6871918a49cb (diff)
parent96304f90a4ce8c93f6ae39ee249fd72ab34bcfa4 (diff)
Auto merge of #799 - emilio:comment-indent, r=fitzgen
codegen: Make comments indentation-aware. This commit moves comment processing to a central place (well, two, because of field docs, but that's fine). Also, it makes comments indentation aware, so multiline comments don't appear garbled. Finally, it also fixes an out-of-bounds panic when processing an empty multiline comment.
Diffstat (limited to 'src/ir/function.rs')
-rw-r--r--src/ir/function.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ir/function.rs b/src/ir/function.rs
index 299bd65c..9865997d 100644
--- a/src/ir/function.rs
+++ b/src/ir/function.rs
@@ -1,6 +1,5 @@
//! Intermediate representation for C/C++ functions and methods.
-use super::comment;
use super::context::{BindgenContext, ItemId};
use super::dot::DotAttributes;
use super::item::Item;
@@ -406,7 +405,7 @@ impl ClangSubItemParser for Function {
mangled_name = None;
}
- let comment = cursor.raw_comment().map(comment::preprocess);
+ let comment = cursor.raw_comment();
let function = Self::new(name, mangled_name, sig, comment);
Ok(ParseResult::New(function, Some(cursor)))