From 05ed42193055b6c01cf31f82e782e313e807880e Mon Sep 17 00:00:00 2001 From: Guillem Nieto Date: Wed, 31 Jan 2018 00:09:16 +0100 Subject: [PATCH] Update UI tests --- tests/ui/question_mark.stderr | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/ui/question_mark.stderr diff --git a/tests/ui/question_mark.stderr b/tests/ui/question_mark.stderr new file mode 100644 index 000000000..e97b18698 --- /dev/null +++ b/tests/ui/question_mark.stderr @@ -0,0 +1,22 @@ +error: this block may be rewritten with the `?` operator + --> $DIR/question_mark.rs:2:2 + | +2 | if a.is_none() { + | _____^ +3 | | return None +4 | | } + | |_____^ help: replace_it_with: `a?;` + | + = note: `-D question-mark` implied by `-D warnings` + +error: this block may be rewritten with the `?` operator + --> $DIR/question_mark.rs:37:3 + | +37 | if (self.opt).is_none() { + | _________^ +38 | | return None; +39 | | } + | |_________^ help: replace_it_with: `(self.opt)?;` + +error: aborting due to 2 previous errors +