rust/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_...

64 lines
2.4 KiB
Plaintext

warning: malformed `on_unimplemented` attribute
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:2:5
|
LL | if(Self = "()"),
| ^^^^^^^^^^^^^^^ invalid option found here
|
= help: only `message`, `note` and `label` are allowed as options
= note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
warning: `message` is ignored due to previous definition of `message`
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:8:32
|
LL | message = "custom message",
| -------------------------- `message` is first declared here
...
LL | #[diagnostic::on_unimplemented(message = "fallback!!")]
| ^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here
warning: malformed `on_unimplemented` attribute
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:2:5
|
LL | if(Self = "()"),
| ^^^^^^^^^^^^^^^ invalid option found here
|
= help: only `message`, `note` and `label` are allowed as options
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
warning: `message` is ignored due to previous definition of `message`
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:8:32
|
LL | message = "custom message",
| -------------------------- `message` is first declared here
...
LL | #[diagnostic::on_unimplemented(message = "fallback!!")]
| ^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: custom message
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:18:15
|
LL | takes_foo(());
| --------- ^^ fallback label
| |
| required by a bound introduced by this call
|
= help: the trait `Foo` is not implemented for `()`
= note: custom note
= note: fallback note
help: this trait has no implementations, consider adding one
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:13:1
|
LL | trait Foo {}
| ^^^^^^^^^
note: required by a bound in `takes_foo`
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:22
|
LL | fn takes_foo(_: impl Foo) {}
| ^^^ required by this bound in `takes_foo`
error: aborting due to 1 previous error; 4 warnings emitted
For more information about this error, try `rustc --explain E0277`.