Rocket/core/codegen/tests/ui-fail/uri_display.stderr
Sergio Benitez b7db74144f Parameterize 'UriDisplay' with 'Path' or 'Query'.
This commit introduces the sealed `UriPart` marker trait as well as the
implementing `Path` and `Query` marker types, allowing for parts of a
URI to be distinguished at the type level. Consequently, `UriDisplay`
has been parameterized with `P: UriPart`, creating `UriDisplay<Path>`
and `UriDisplay<Query>`. The effect of this change is improved type
safely for URI rendering as well as the ability to omit rendering values
in query parts via `Option` and `Result`.

The `UriDisplay` derive was replaced by `UriDisplayQuery` and
`UriDisplayPath` which derive implementations for `UriDisplay<Path>`
and `UriDisplay<Query>`, respectively.

This commit also works around a rustdoc visibility issue by creating a
hidden `http::private` module.

Finally, this commit also removes the now vestigial use of the
`rustc_private` feature in codegen.

Fixes #827.
2018-11-27 10:01:47 -06:00

126 lines
2.8 KiB
Plaintext

error: fieldless structs or variants are not supported
--> $DIR/uri_display.rs:4:1
|
4 | struct Foo1;
| ^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:3:10
|
3 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
error: fieldless structs or variants are not supported
--> $DIR/uri_display.rs:8:1
|
8 | struct Foo2();
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:7:10
|
7 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
error: empty enums are not supported
--> $DIR/uri_display.rs:12:1
|
12 | enum Foo3 { }
| ^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:11:10
|
11 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
error: fieldless structs or variants are not supported
--> $DIR/uri_display.rs:17:5
|
17 | Variant,
| ^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:15:10
|
15 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
error: tuple structs or variants must have exactly one field
--> $DIR/uri_display.rs:22:12
|
22 | struct Foo5(String, String);
| ^^^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:21:10
|
21 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
error: invalid value: expected string literal
--> $DIR/uri_display.rs:27:20
|
27 | #[form(field = 123)]
| ^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:25:10
|
25 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
error: struct must have exactly one field
--> $DIR/uri_display.rs:33:12
|
33 | struct Foo7(String, usize);
| ^^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:32:10
|
32 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
error: struct must have exactly one field
--> $DIR/uri_display.rs:37:1
|
37 | struct Foo8;
| ^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:36:10
|
36 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
error: enums are not supported
--> $DIR/uri_display.rs:41:1
|
41 | enum Foo9 { }
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:40:10
|
40 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
error: named structs are not supported
--> $DIR/uri_display.rs:45:1
|
45 | / struct Foo10 {
46 | | //~^ ERROR not supported
47 | | named: usize
48 | | }
| |_^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:44:10
|
44 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
error: aborting due to 10 previous errors