-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: more accurate spans on parent templates
- Loading branch information
Showing
13 changed files
with
98 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% extends "extends-wrapper.html.oxip" %} | ||
{% block content -%} | ||
{%- endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
error: Only block statements are allowed here, along with comments and whitespace. | ||
--> tests/broken/extends-extends.rs:4:77 | ||
--> tests/broken/extends-extends.rs:4:68 | ||
| | ||
4 | #[oxiplate_inline = r#"{% extends "extends-wrapper.html.oxip" %}{% extends "extends-wrapper.html.oxip" %}"#] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^ | ||
|
||
error[E0392]: type parameter `F` is never used | ||
--> tests/broken/extends-extends.rs:3:10 | ||
--> tests/broken/extends-extends.rs:4:36 | ||
| | ||
3 | #[derive(Oxiplate)] | ||
| ^^^^^^^^ unused type parameter | ||
4 | #[oxiplate_inline = r#"{% extends "extends-wrapper.html.oxip" %}{% extends "extends-wrapper.html.oxip" %}"#] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ unused type parameter | ||
| | ||
= help: consider removing `F`, referring to it in a field, or using a marker such as `PhantomData` | ||
= note: this error originates in the derive macro `Oxiplate` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use oxiplate_derive::Oxiplate; | ||
|
||
#[derive(Oxiplate)] | ||
#[oxiplate = "extends-with-empty-content.html.oxip"] | ||
struct AbsoluteData {} | ||
|
||
fn main() { | ||
// Intentionally missing the "title" field used by the parent template | ||
let data = AbsoluteData {}; | ||
|
||
panic!("{data}"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0609]: no field `title` on type `&'a AbsoluteData` | ||
--> templates/extends-wrapper.html.oxip | ||
| | ||
| <title>{{ title }}</title> | ||
| ^^^^^ unknown field | ||
| | ||
::: tests/broken/extends/extends.rs:3:10 | ||
| | ||
3 | #[derive(Oxiplate)] | ||
| -------- in this derive macro expansion | ||
| | ||
= note: this error originates in the derive macro `Oxiplate` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.