]> git.lizzy.rs Git - rust.git/commitdiff
"cannot resolve" → "cannot satisfy"
authorEsteban Küber <esteban@kuber.com.ar>
Sun, 5 Apr 2020 02:47:50 +0000 (19:47 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Sun, 5 Apr 2020 17:14:04 +0000 (10:14 -0700)
17 files changed:
src/librustc_trait_selection/traits/error_reporting/mod.rs
src/test/ui/associated-const/issue-63496.stderr
src/test/ui/associated-item/issue-48027.stderr
src/test/ui/associated-types/associated-types-overridden-binding.stderr
src/test/ui/associated-types/associated-types-unconstrained.stderr
src/test/ui/error-codes/E0283.stderr
src/test/ui/issues/issue-12028.stderr
src/test/ui/issues/issue-21974.stderr
src/test/ui/issues/issue-24424.stderr
src/test/ui/issues/issue-29147.stderr
src/test/ui/issues/issue-54954.stderr
src/test/ui/issues/issue-58022.stderr
src/test/ui/question-mark-type-infer.stderr
src/test/ui/traits/trait-static-method-generic-inference.stderr
src/test/ui/type/type-annotation-needed.rs
src/test/ui/type/type-annotation-needed.stderr
src/test/ui/type/type-check/issue-40294.stderr

index 5a9a96887f66a31f41a4b737d677d2d4b24c006e..f0a157b377076e82ea1bbad22a3b3524f8e86f22 100644 (file)
@@ -1377,7 +1377,7 @@ fn maybe_report_ambiguity(
                     return;
                 }
                 let mut err = self.need_type_info_err(body_id, span, self_ty, ErrorCode::E0283);
-                err.note(&format!("cannot resolve `{}`", predicate));
+                err.note(&format!("cannot satisfy `{}`", predicate));
                 if let ObligationCauseCode::ItemObligation(def_id) = obligation.cause.code {
                     self.suggest_fully_qualified_path(&mut err, def_id, span, trait_ref.def_id());
                 } else if let (
@@ -1407,7 +1407,7 @@ fn maybe_report_ambiguity(
                         // LL |     const fn const_val<T: Sized>() -> usize {
                         //    |              --------- - required by this bound in `Tt::const_val`
                         //    |
-                        //    = note: cannot resolve `_: Tt`
+                        //    = note: cannot satisfy `_: Tt`
 
                         err.span_suggestion_verbose(
                             span.shrink_to_hi(),
@@ -1457,7 +1457,7 @@ fn maybe_report_ambiguity(
                     return;
                 }
                 let mut err = self.need_type_info_err(body_id, span, self_ty, ErrorCode::E0284);
-                err.note(&format!("cannot resolve `{}`", predicate));
+                err.note(&format!("cannot satisfy `{}`", predicate));
                 err
             }
 
@@ -1469,10 +1469,10 @@ fn maybe_report_ambiguity(
                     self.tcx.sess,
                     span,
                     E0284,
-                    "type annotations needed: cannot resolve `{}`",
+                    "type annotations needed: cannot satisfy `{}`",
                     predicate,
                 );
-                err.span_label(span, &format!("cannot resolve `{}`", predicate));
+                err.span_label(span, &format!("cannot satisfy `{}`", predicate));
                 err
             }
         };
index 3a70e7d43c25ef96bc7dd859b2e635aef659af06..34e947030a072ff8b693e7bdc83492721c489c10 100644 (file)
@@ -10,7 +10,7 @@ LL |     fn f() -> ([u8; A::C], [u8; A::C]);
    |                     cannot infer type
    |                     help: use the fully qualified path to an implementation: `<Type as A>::C`
    |
-   = note: cannot resolve `_: A`
+   = note: cannot satisfy `_: A`
    = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
 
 error[E0283]: type annotations needed
@@ -25,7 +25,7 @@ LL |     fn f() -> ([u8; A::C], [u8; A::C]);
    |                                 cannot infer type
    |                                 help: use the fully qualified path to an implementation: `<Type as A>::C`
    |
-   = note: cannot resolve `_: A`
+   = note: cannot satisfy `_: A`
    = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
 
 error: aborting due to 2 previous errors
index 62a380732a8bb8e127d62deed0b7517553961538..98b545c6e0e78de9106c794338dcdc997faabade 100644 (file)
@@ -22,7 +22,7 @@ LL |     fn return_n(&self) -> [u8; Bar::X];
    |                                cannot infer type
    |                                help: use the fully qualified path to an implementation: `<Type as Bar>::X`
    |
-   = note: cannot resolve `_: Bar`
+   = note: cannot satisfy `_: Bar`
    = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
 
 error: aborting due to 2 previous errors
index 9e10ed7b7295203acfb21c42e523afe179cefe6d..683a2ab21d9c8e3cf258b61ae11c2c4f922adeba 100644 (file)
@@ -6,7 +6,7 @@ LL | trait Foo: Iterator<Item = i32> {}
 LL | trait Bar: Foo<Item = u32> {}
    |            ^^^^^^^^^^^^^^^ cannot infer type for type parameter `Self`
    |
-   = note: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
+   = note: cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
 
 error[E0284]: type annotations needed
   --> $DIR/associated-types-overridden-binding.rs:7:21
@@ -16,7 +16,7 @@ LL | trait I32Iterator = Iterator<Item = i32>;
 LL | trait U32Iterator = I32Iterator<Item = u32>;
    |                     ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Self`
    |
-   = note: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
+   = note: cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
 
 error: aborting due to 2 previous errors
 
index 14ce4836f97f8253f5f33b89d4991431116d4f26..2914a7f868b2b2891fab601449013c178952007d 100644 (file)
@@ -4,7 +4,7 @@ error[E0284]: type annotations needed
 LL |     let x: isize = Foo::bar();
    |                    ^^^^^^^^ cannot infer type
    |
-   = note: cannot resolve `<_ as Foo>::A == _`
+   = note: cannot satisfy `<_ as Foo>::A == _`
 
 error: aborting due to previous error
 
index ae5b7c3ae8f67a3e462d9a5e7ec6e0b48b7eb3fc..e95583c91a72f79cf2fb262360cd3557588ce408 100644 (file)
@@ -7,7 +7,7 @@ LL |     fn create() -> u32;
 LL |     let cont: u32 = Generator::create();
    |                     ^^^^^^^^^^^^^^^^^ cannot infer type
    |
-   = note: cannot resolve `_: Generator`
+   = note: cannot satisfy `_: Generator`
 
 error: aborting due to previous error
 
index fe7e8f89f7f1adc7514fa750d3d9ed6a10776246..434c5de2874e00b85d987e25c8ba2580992fe856 100644 (file)
@@ -4,7 +4,7 @@ error[E0284]: type annotations needed
 LL |         self.input_stream(&mut stream);
    |              ^^^^^^^^^^^^ cannot infer type for type parameter `H` declared on the trait `StreamHash`
    |
-   = note: cannot resolve `<_ as StreamHasher>::S == <H as StreamHasher>::S`
+   = note: cannot satisfy `<_ as StreamHasher>::S == <H as StreamHasher>::S`
 
 error: aborting due to previous error
 
index 19823499066eb44699358bde582506017ca550e4..d36d0dad4a196c7fc03bd2692e4932305ddeeec1 100644 (file)
@@ -7,7 +7,7 @@ LL | trait Foo {
 LL |     where &'a T : Foo,
    |                   ^^^ cannot infer type for reference `&'a T`
    |
-   = note: cannot resolve `&'a T: Foo`
+   = note: cannot satisfy `&'a T: Foo`
 
 error: aborting due to previous error
 
index 538d44c3b2ef3b5efc34e7b8650802fad1cb0460..f9338981408b743bb7f291cdd2c1880d6c67f58f 100644 (file)
@@ -7,7 +7,7 @@ LL |
 LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
    |                                                         ^^^^^^^^^^^ cannot infer type for type parameter `T0`
    |
-   = note: cannot resolve `T0: Trait0<'l0>`
+   = note: cannot satisfy `T0: Trait0<'l0>`
 
 error: aborting due to previous error
 
index 1efedb45cace7944d07f5fcc6918401406b3896b..94aff5963544c59dd8d1cf566976ba31cebe8866 100644 (file)
@@ -7,7 +7,7 @@ LL | trait Foo { fn xxx(&self); }
 LL |     let _ = <S5<_>>::xxx;
    |             ^^^^^^^^^^^^ cannot infer type for struct `S5<_>`
    |
-   = note: cannot resolve `S5<_>: Foo`
+   = note: cannot satisfy `S5<_>: Foo`
 
 error: aborting due to previous error
 
index 4967b82216e46bb689e89e50f20786ff598074b0..ca5439e290b75242d1c5e188a2250e622b792a18 100644 (file)
@@ -13,7 +13,7 @@ LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
 LL |     const fn const_val<T: Sized>() -> usize {
    |              --------- - required by this bound in `Tt::const_val`
    |
-   = note: cannot resolve `_: Tt`
+   = note: cannot satisfy `_: Tt`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/issue-54954.rs:13:15
index 70a7c38b8342582b2930ff035e31b474645add44..fb31467ec47fa356adc951b8c6ece17c7d8bc380 100644 (file)
@@ -16,7 +16,7 @@ LL |     fn new(slice: &[u8; Foo::SIZE]) -> Self;
    |                         cannot infer type
    |                         help: use the fully qualified path to an implementation: `<Type as Foo>::SIZE`
    |
-   = note: cannot resolve `_: Foo`
+   = note: cannot satisfy `_: Foo`
    = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
 
 error: aborting due to 2 previous errors
index 262344fba59999be0d93aada8a8dbb72b127d16b..64d8f685637fb140f6e26fdc3181db028ba74be6 100644 (file)
@@ -4,7 +4,7 @@ error[E0284]: type annotations needed
 LL |     l.iter().map(f).collect()?
    |                     ^^^^^^^ cannot infer type
    |
-   = note: cannot resolve `<_ as std::ops::Try>::Ok == _`
+   = note: cannot satisfy `<_ as std::ops::Try>::Ok == _`
 help: consider specifying the type argument in the method call
    |
 LL |     l.iter().map(f).collect::<B>()?
index f9718dac3547d79ac4538dc96c96e6f607a3c90a..8f20cc5093e114228497435531bced100a68fc16 100644 (file)
@@ -7,7 +7,7 @@ LL |         fn new() -> T;
 LL |     let _f: base::Foo = base::HasNew::new();
    |                         ^^^^^^^^^^^^^^^^^ cannot infer type
    |
-   = note: cannot resolve `_: base::HasNew<base::Foo>`
+   = note: cannot satisfy `_: base::HasNew<base::Foo>`
 
 error: aborting due to previous error
 
index a420515be496d2545fa99d85a91ebe8e68673324..b9bf6d79b1c8922b04e873725a043e4fdee2accb 100644 (file)
@@ -6,5 +6,5 @@ fn main() {
     foo(42);
     //~^ ERROR type annotations needed
     //~| NOTE cannot infer type
-    //~| NOTE cannot resolve
+    //~| NOTE cannot satisfy
 }
index df7d73d7a7c1d221b47c7e614e96e3be6c348bd1..e6cd7ac3880916b263d5a0d5a4053eb9623faaa9 100644 (file)
@@ -7,7 +7,7 @@ LL | fn foo<T: Into<String>>(x: i32) {}
 LL |     foo(42);
    |     ^^^ cannot infer type for type parameter `T` declared on the function `foo`
    |
-   = note: cannot resolve `_: std::convert::Into<std::string::String>`
+   = note: cannot satisfy `_: std::convert::Into<std::string::String>`
 help: consider specifying the type argument in the function call
    |
 LL |     foo::<T>(42);
index 2c889b6c2ca0ae97320a2302fe6729c1181f3675..7d81e0ce10c709f7f1d5a9747ab725fa7c252081 100644 (file)
@@ -7,7 +7,7 @@ LL | trait Foo: Sized {
 LL |     where &'a T : Foo,
    |                   ^^^ cannot infer type for reference `&'a T`
    |
-   = note: cannot resolve `&'a T: Foo`
+   = note: cannot satisfy `&'a T: Foo`
 
 error: aborting due to previous error