forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a span for one of the test cases
- Loading branch information
Showing
2 changed files
with
15 additions
and
29 deletions.
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
...tic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
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,22 +1,20 @@ | ||
#![feature(diagnostic_namespace)] | ||
|
||
#[diagnostic::on_unimplemented( | ||
if(Self = "()"), | ||
//~^WARN malformed `on_unimplemented` attribute | ||
//~|WARN malformed `on_unimplemented` attribute | ||
if(Self = ()), | ||
message = "not used yet", | ||
label = "not used yet", | ||
note = "not used yet" | ||
message = "custom message", | ||
note = "custom note" | ||
)] | ||
#[diagnostic::on_unimplemented(message = "fallback!!")] | ||
#[diagnostic::on_unimplemented(label = "fallback label")] | ||
#[diagnostic::on_unimplemented(note = "fallback note")] | ||
#[diagnostic::on_unimplemented(message = "fallback2!!")] | ||
trait Foo {} | ||
|
||
fn takes_foo(_: impl Foo) {} | ||
|
||
fn main() { | ||
takes_foo(()); | ||
//~^ERROR fallback!! | ||
//~^ERROR custom message | ||
} |
34 changes: 11 additions & 23 deletions
34
...namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
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