From 493cf0c6438d1b55ae3ebf2d407fc5e5e8e5698e Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Fri, 17 Dec 2021 15:38:12 +0800 Subject: [PATCH] Bless ui tests --- src/test/ui/closures/closure-expected.stderr | 4 ++-- src/test/ui/closures/coerce-unsafe-to-closure.stderr | 4 ++-- src/test/ui/expr/malformed_closure/ruby_style_closure.stderr | 4 ++-- src/test/ui/issues/issue-47706-trait.stderr | 4 ++-- src/test/ui/issues/issue-47706.stderr | 4 ++-- src/test/ui/suggestions/as-ref-2.stderr | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/ui/closures/closure-expected.stderr b/src/test/ui/closures/closure-expected.stderr index 8b38d5ff459..7ffe3c1ef95 100644 --- a/src/test/ui/closures/closure-expected.stderr +++ b/src/test/ui/closures/closure-expected.stderr @@ -11,8 +11,8 @@ LL | let y = x.or_else(4); note: required by a bound in `Option::::or_else` --> $SRC_DIR/core/src/option.rs:LL:COL | -LL | pub fn or_else Option>(self, f: F) -> Option { - | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::or_else` +LL | F: ~const FnOnce() -> Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::or_else` error: aborting due to previous error diff --git a/src/test/ui/closures/coerce-unsafe-to-closure.stderr b/src/test/ui/closures/coerce-unsafe-to-closure.stderr index 24db2725347..883348eb98c 100644 --- a/src/test/ui/closures/coerce-unsafe-to-closure.stderr +++ b/src/test/ui/closures/coerce-unsafe-to-closure.stderr @@ -10,8 +10,8 @@ LL | let x: Option<&[u8]> = Some("foo").map(std::mem::transmute); note: required by a bound in `Option::::map` --> $SRC_DIR/core/src/option.rs:LL:COL | -LL | pub fn map U>(self, f: F) -> Option { - | ^^^^^^^^^^^^^^ required by this bound in `Option::::map` +LL | F: ~const FnOnce(T) -> U, + | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::map` error: aborting due to previous error diff --git a/src/test/ui/expr/malformed_closure/ruby_style_closure.stderr b/src/test/ui/expr/malformed_closure/ruby_style_closure.stderr index 53924e24e46..9db9cfc7ff0 100644 --- a/src/test/ui/expr/malformed_closure/ruby_style_closure.stderr +++ b/src/test/ui/expr/malformed_closure/ruby_style_closure.stderr @@ -23,8 +23,8 @@ LL | | }); note: required by a bound in `Option::::and_then` --> $SRC_DIR/core/src/option.rs:LL:COL | -LL | pub fn and_then Option>(self, f: F) -> Option { - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::and_then` +LL | F: ~const FnOnce(T) -> Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::and_then` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-47706-trait.stderr b/src/test/ui/issues/issue-47706-trait.stderr index eb0c80f8f0d..d596b4a69f3 100644 --- a/src/test/ui/issues/issue-47706-trait.stderr +++ b/src/test/ui/issues/issue-47706-trait.stderr @@ -11,8 +11,8 @@ LL | None::<()>.map(Self::f); note: required by a bound in `Option::::map` --> $SRC_DIR/core/src/option.rs:LL:COL | -LL | pub fn map U>(self, f: F) -> Option { - | ^^^^^^^^^^^^^^ required by this bound in `Option::::map` +LL | F: ~const FnOnce(T) -> U, + | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::map` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47706.stderr b/src/test/ui/issues/issue-47706.stderr index 237b2b9e798..0b4f84a330a 100644 --- a/src/test/ui/issues/issue-47706.stderr +++ b/src/test/ui/issues/issue-47706.stderr @@ -12,8 +12,8 @@ LL | self.foo.map(Foo::new) note: required by a bound in `Option::::map` --> $SRC_DIR/core/src/option.rs:LL:COL | -LL | pub fn map U>(self, f: F) -> Option { - | ^^^^^^^^^^^^^^ required by this bound in `Option::::map` +LL | F: ~const FnOnce(T) -> U, + | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::::map` error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/issue-47706.rs:27:9 diff --git a/src/test/ui/suggestions/as-ref-2.stderr b/src/test/ui/suggestions/as-ref-2.stderr index 86a175098c6..3c9d0f72abe 100644 --- a/src/test/ui/suggestions/as-ref-2.stderr +++ b/src/test/ui/suggestions/as-ref-2.stderr @@ -11,8 +11,8 @@ LL | let _y = foo; note: this function takes ownership of the receiver `self`, which moves `foo` --> $SRC_DIR/core/src/option.rs:LL:COL | -LL | pub fn map U>(self, f: F) -> Option { - | ^^^^ +LL | pub const fn map(self, f: F) -> Option + | ^^^^ help: consider calling `.as_ref()` to borrow the type's contents | LL | let _x: Option = foo.as_ref().map(|s| bar(&s));