aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/makefile/command_line.rs2
-rw-r--r--src/makefile/eval_context.rs2
-rw-r--r--src/makefile/lookup_internal.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/makefile/command_line.rs b/src/makefile/command_line.rs
index 52693e0..c75c854 100644
--- a/src/makefile/command_line.rs
+++ b/src/makefile/command_line.rs
@@ -46,7 +46,7 @@ pub struct CommandLine {
}
impl CommandLine {
- pub fn from(line: TokenString) -> Self {
+ pub const fn from(line: TokenString) -> Self {
Self {
execution_line: line,
}
diff --git a/src/makefile/eval_context.rs b/src/makefile/eval_context.rs
index ba5f4a0..87edafd 100644
--- a/src/makefile/eval_context.rs
+++ b/src/makefile/eval_context.rs
@@ -12,7 +12,7 @@ pub struct DeferredEvalContext<'parent, 'args, 'grandparent, R: BufRead> {
impl<'parent, 'args, 'grandparent, R: BufRead>
DeferredEvalContext<'parent, 'args, 'grandparent, R>
{
- pub fn new(parent: &'parent MakefileReader<'args, 'grandparent, R>) -> Self {
+ pub const fn new(parent: &'parent MakefileReader<'args, 'grandparent, R>) -> Self {
Self {
parent,
children: Vec::new(),
diff --git a/src/makefile/lookup_internal.rs b/src/makefile/lookup_internal.rs
index c0fc08b..a497ab4 100644
--- a/src/makefile/lookup_internal.rs
+++ b/src/makefile/lookup_internal.rs
@@ -17,11 +17,11 @@ pub enum LookupInternal<'a> {
}
impl<'a> LookupInternal<'a> {
- pub fn new_partial(targets: &'a Vec<&str>) -> Self {
+ pub const fn new_partial(targets: &'a Vec<&str>) -> Self {
Self::Partial { targets }
}
- pub fn new(
+ pub const fn new(
target: Option<&'a Target>,
get_target: &'a dyn Fn(&str) -> Result<Rc<RefCell<Target>>>,
) -> Self {