about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/closures/closure-expected.stderr4
-rw-r--r--src/test/ui/closures/coerce-unsafe-to-closure.stderr4
-rw-r--r--src/test/ui/expr/malformed_closure/ruby_style_closure.stderr4
-rw-r--r--src/test/ui/issues/issue-47706-trait.stderr4
-rw-r--r--src/test/ui/issues/issue-47706.stderr4
-rw-r--r--src/test/ui/suggestions/as-ref-2.stderr4
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::<T>::or_else`
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL |     pub fn or_else<F: FnOnce() -> Option<T>>(self, f: F) -> Option<T> {
-   |                       ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::or_else`
+LL |         F: ~const FnOnce() -> Option<T>,
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::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::<T>::map`
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL |     pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
-   |                      ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
+LL |         F: ~const FnOnce(T) -> U,
+   |            ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::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::<T>::and_then`
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL |     pub fn and_then<U, F: FnOnce(T) -> Option<U>>(self, f: F) -> Option<U> {
-   |                           ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::and_then`
+LL |         F: ~const FnOnce(T) -> Option<U>,
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::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::<T>::map`
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL |     pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
-   |                      ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
+LL |         F: ~const FnOnce(T) -> U,
+   |            ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::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::<T>::map`
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL |     pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
-   |                      ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
+LL |         F: ~const FnOnce(T) -> U,
+   |            ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::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, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
-   |                                      ^^^^
+LL |     pub const fn map<U, F>(self, f: F) -> Option<U>
+   |                            ^^^^
 help: consider calling `.as_ref()` to borrow the type's contents
    |
 LL |     let _x: Option<Struct> = foo.as_ref().map(|s| bar(&s));