summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4d4cbb8b..0dc42152 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -75,7 +75,11 @@ pub fn compile(world: &(dyn World + 'static), source: &Source) -> SourceResult<D
#[comemo::track]
pub trait World {
/// The path relative to which absolute paths are.
- fn root(&self) -> &Path;
+ ///
+ /// Defaults to the empty path.
+ fn root(&self) -> &Path {
+ Path::new("")
+ }
/// The standard library.
fn library(&self) -> &Prehashed<Library>;