Skip to content

Commit 8ca3545

Browse files
Fix ui/truncate.rs and ui/filter-invocation-invalid-arguments.rs stderr
1 parent c37b454 commit 8ca3545

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed

testing/tests/ui/filter-invocation-invalid-arguments.stderr

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,16 @@ help: the trait `ValidFilterInvocation` is not implemented for `req1<'_>`
5757
|
5858
12 | #[askama::filter_fn]
5959
| ^^^^^^^^^^^^^^^^^^^^
60-
= help: the trait `ValidFilterInvocation` is implemented for `req1<'_, true>`
60+
help: the trait `ValidFilterInvocation` is implemented for `req1<'_, true>`
61+
--> tests/ui/filter-invocation-invalid-arguments.rs:13:16
62+
|
63+
13 | pub fn req1(
64+
| ________________^
65+
14 | | input: impl std::fmt::Display,
66+
15 | | _env: &dyn askama::Values,
67+
16 | | req1: usize,
68+
17 | | ) -> askama::Result<String> {
69+
| |_____^
6170
= note: this error originates in the derive macro `Template` which comes from the expansion of the attribute macro `askama::filter_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
6271

6372
error[E0599]: no method named `execute` found for struct `req1<'_>` in the current scope
@@ -90,9 +99,13 @@ error[E0277]: Argument at position 1 is invalid on filter req1<'_>. Too many arg
9099
36 | #[derive(Template)]
91100
| ^^^^^^^^ Filter function
92101
|
93-
= help: the trait `ValidArgIdx<1>` is not implemented for `req1<'_>`
94-
but trait `ValidArgIdx<0>` is implemented for it
95-
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
102+
help: the trait `ValidArgIdx<1>` is not implemented for `req1<'_>`
103+
but trait `ValidArgIdx<0>` is implemented for it
104+
--> tests/ui/filter-invocation-invalid-arguments.rs:12:5
105+
|
106+
12 | #[askama::filter_fn]
107+
| ^^^^^^^^^^^^^^^^^^^^
108+
= note: this error originates in the derive macro `Template` which comes from the expansion of the attribute macro `askama::filter_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
96109

97110
error[E0599]: no method named `with_req2` found for struct `req1<'filter, REQUIRED_ARG_FLAG_0>` in the current scope
98111
--> tests/ui/filter-invocation-invalid-arguments.rs:40:10

testing/tests/ui/truncate.stderr

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ error[E0277]: the trait bound `usize: TryFrom<f32>` is not satisfied
2020
9 | #[derive(Template)]
2121
| ^^^^^^^^ the trait `From<f32>` is not implemented for `usize`
2222
|
23-
= help: the following other types implement trait `From<T>`:
24-
`usize` implements `From<bool>`
25-
`usize` implements `From<std::ptr::Alignment>`
26-
`usize` implements `From<u16>`
27-
`usize` implements `From<u8>`
23+
help: the following other types implement trait `From<T>`
24+
--> $RUST/core/src/convert/num.rs
25+
|
26+
= note: `usize` implements `From<bool>`
27+
::: $RUST/core/src/convert/num.rs
28+
|
29+
= note: `usize` implements `From<u8>`
30+
::: $RUST/core/src/convert/num.rs
31+
|
32+
= note: `usize` implements `From<u16>`
33+
--> $RUST/core/src/ptr/alignment.rs
34+
|
35+
= note: `usize` implements `From<std::ptr::Alignment>`
2836
= note: required for `f32` to implement `Into<usize>`
2937
= note: required for `usize` to implement `TryFrom<f32>`
30-
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
38+
= note: this error originates in the derive macro `Template` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info)

0 commit comments

Comments
 (0)