parent
eb4ef2f969
commit
b86ba7af85
3 changed files with 15 additions and 2 deletions
13
maud/tests/absolute_paths.rs
Normal file
13
maud/tests/absolute_paths.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
// Make sure `std` is available but the prelude isn't
|
||||
#![no_std]
|
||||
extern crate std;
|
||||
|
||||
use maud::html;
|
||||
|
||||
#[test]
|
||||
fn issue_170() {
|
||||
let number = 42;
|
||||
let _ = html! { (number) };
|
||||
}
|
|
@ -84,7 +84,7 @@ impl Generator {
|
|||
quote!({
|
||||
// Create a local trait alias so that autoref works
|
||||
trait Render: maud::Render {
|
||||
fn __maud_render_to(&self, output_ident: &mut String) {
|
||||
fn __maud_render_to(&self, output_ident: &mut ::std::string::String) {
|
||||
maud::Render::render_to(self, output_ident);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ fn expand(input: TokenStream) -> TokenStream {
|
|||
let stmts = generate::generate(markups, output_ident.clone());
|
||||
quote!({
|
||||
extern crate maud;
|
||||
let mut $output_ident = String::with_capacity($size_hint);
|
||||
let mut $output_ident = ::std::string::String::with_capacity($size_hint);
|
||||
$stmts
|
||||
maud::PreEscaped($output_ident)
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue