Skip to content

Commit e1b380a

Browse files
authored
Rollup merge of rust-lang#70798 - estebank:satisfy, r=Centril
"cannot resolve" → "cannot satisfy" CC rust-lang#66523 r? @Centril
2 parents 269eeea + 0cd4c89 commit e1b380a

17 files changed

+23
-23
lines changed

src/librustc_trait_selection/traits/error_reporting/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
13771377
return;
13781378
}
13791379
let mut err = self.need_type_info_err(body_id, span, self_ty, ErrorCode::E0283);
1380-
err.note(&format!("cannot resolve `{}`", predicate));
1380+
err.note(&format!("cannot satisfy `{}`", predicate));
13811381
if let ObligationCauseCode::ItemObligation(def_id) = obligation.cause.code {
13821382
self.suggest_fully_qualified_path(&mut err, def_id, span, trait_ref.def_id());
13831383
} else if let (
@@ -1407,7 +1407,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
14071407
// LL | const fn const_val<T: Sized>() -> usize {
14081408
// | --------- - required by this bound in `Tt::const_val`
14091409
// |
1410-
// = note: cannot resolve `_: Tt`
1410+
// = note: cannot satisfy `_: Tt`
14111411

14121412
err.span_suggestion_verbose(
14131413
span.shrink_to_hi(),
@@ -1457,7 +1457,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
14571457
return;
14581458
}
14591459
let mut err = self.need_type_info_err(body_id, span, self_ty, ErrorCode::E0284);
1460-
err.note(&format!("cannot resolve `{}`", predicate));
1460+
err.note(&format!("cannot satisfy `{}`", predicate));
14611461
err
14621462
}
14631463

@@ -1469,10 +1469,10 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
14691469
self.tcx.sess,
14701470
span,
14711471
E0284,
1472-
"type annotations needed: cannot resolve `{}`",
1472+
"type annotations needed: cannot satisfy `{}`",
14731473
predicate,
14741474
);
1475-
err.span_label(span, &format!("cannot resolve `{}`", predicate));
1475+
err.span_label(span, &format!("cannot satisfy `{}`", predicate));
14761476
err
14771477
}
14781478
};

src/test/ui/associated-const/issue-63496.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | fn f() -> ([u8; A::C], [u8; A::C]);
1010
| cannot infer type
1111
| help: use the fully qualified path to an implementation: `<Type as A>::C`
1212
|
13-
= note: cannot resolve `_: A`
13+
= note: cannot satisfy `_: A`
1414
= note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
1515

1616
error[E0283]: type annotations needed
@@ -25,7 +25,7 @@ LL | fn f() -> ([u8; A::C], [u8; A::C]);
2525
| cannot infer type
2626
| help: use the fully qualified path to an implementation: `<Type as A>::C`
2727
|
28-
= note: cannot resolve `_: A`
28+
= note: cannot satisfy `_: A`
2929
= note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
3030

3131
error: aborting due to 2 previous errors

src/test/ui/associated-item/issue-48027.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LL | fn return_n(&self) -> [u8; Bar::X];
2222
| cannot infer type
2323
| help: use the fully qualified path to an implementation: `<Type as Bar>::X`
2424
|
25-
= note: cannot resolve `_: Bar`
25+
= note: cannot satisfy `_: Bar`
2626
= note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
2727

2828
error: aborting due to 2 previous errors

src/test/ui/associated-types/associated-types-overridden-binding.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | trait Foo: Iterator<Item = i32> {}
66
LL | trait Bar: Foo<Item = u32> {}
77
| ^^^^^^^^^^^^^^^ cannot infer type for type parameter `Self`
88
|
9-
= note: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
9+
= note: cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
1010

1111
error[E0284]: type annotations needed
1212
--> $DIR/associated-types-overridden-binding.rs:7:21
@@ -16,7 +16,7 @@ LL | trait I32Iterator = Iterator<Item = i32>;
1616
LL | trait U32Iterator = I32Iterator<Item = u32>;
1717
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `Self`
1818
|
19-
= note: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
19+
= note: cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
2020

2121
error: aborting due to 2 previous errors
2222

src/test/ui/associated-types/associated-types-unconstrained.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0284]: type annotations needed
44
LL | let x: isize = Foo::bar();
55
| ^^^^^^^^ cannot infer type
66
|
7-
= note: cannot resolve `<_ as Foo>::A == _`
7+
= note: cannot satisfy `<_ as Foo>::A == _`
88

99
error: aborting due to previous error
1010

src/test/ui/error-codes/E0283.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn create() -> u32;
77
LL | let cont: u32 = Generator::create();
88
| ^^^^^^^^^^^^^^^^^ cannot infer type
99
|
10-
= note: cannot resolve `_: Generator`
10+
= note: cannot satisfy `_: Generator`
1111

1212
error: aborting due to previous error
1313

src/test/ui/issues/issue-12028.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0284]: type annotations needed
44
LL | self.input_stream(&mut stream);
55
| ^^^^^^^^^^^^ cannot infer type for type parameter `H` declared on the trait `StreamHash`
66
|
7-
= note: cannot resolve `<_ as StreamHasher>::S == <H as StreamHasher>::S`
7+
= note: cannot satisfy `<_ as StreamHasher>::S == <H as StreamHasher>::S`
88

99
error: aborting due to previous error
1010

src/test/ui/issues/issue-21974.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | trait Foo {
77
LL | where &'a T : Foo,
88
| ^^^ cannot infer type for reference `&'a T`
99
|
10-
= note: cannot resolve `&'a T: Foo`
10+
= note: cannot satisfy `&'a T: Foo`
1111

1212
error: aborting due to previous error
1313

src/test/ui/issues/issue-24424.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL |
77
LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
88
| ^^^^^^^^^^^ cannot infer type for type parameter `T0`
99
|
10-
= note: cannot resolve `T0: Trait0<'l0>`
10+
= note: cannot satisfy `T0: Trait0<'l0>`
1111

1212
error: aborting due to previous error
1313

src/test/ui/issues/issue-29147.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | trait Foo { fn xxx(&self); }
77
LL | let _ = <S5<_>>::xxx;
88
| ^^^^^^^^^^^^ cannot infer type for struct `S5<_>`
99
|
10-
= note: cannot resolve `S5<_>: Foo`
10+
= note: cannot satisfy `S5<_>: Foo`
1111

1212
error: aborting due to previous error
1313

src/test/ui/issues/issue-54954.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
1313
LL | const fn const_val<T: Sized>() -> usize {
1414
| --------- - required by this bound in `Tt::const_val`
1515
|
16-
= note: cannot resolve `_: Tt`
16+
= note: cannot satisfy `_: Tt`
1717

1818
error[E0080]: evaluation of constant value failed
1919
--> $DIR/issue-54954.rs:13:15

src/test/ui/issues/issue-58022.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LL | fn new(slice: &[u8; Foo::SIZE]) -> Self;
1616
| cannot infer type
1717
| help: use the fully qualified path to an implementation: `<Type as Foo>::SIZE`
1818
|
19-
= note: cannot resolve `_: Foo`
19+
= note: cannot satisfy `_: Foo`
2020
= note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
2121

2222
error: aborting due to 2 previous errors

src/test/ui/question-mark-type-infer.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0284]: type annotations needed
44
LL | l.iter().map(f).collect()?
55
| ^^^^^^^ cannot infer type
66
|
7-
= note: cannot resolve `<_ as std::ops::Try>::Ok == _`
7+
= note: cannot satisfy `<_ as std::ops::Try>::Ok == _`
88
help: consider specifying the type argument in the method call
99
|
1010
LL | l.iter().map(f).collect::<B>()?

src/test/ui/traits/trait-static-method-generic-inference.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn new() -> T;
77
LL | let _f: base::Foo = base::HasNew::new();
88
| ^^^^^^^^^^^^^^^^^ cannot infer type
99
|
10-
= note: cannot resolve `_: base::HasNew<base::Foo>`
10+
= note: cannot satisfy `_: base::HasNew<base::Foo>`
1111

1212
error: aborting due to previous error
1313

src/test/ui/type/type-annotation-needed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ fn main() {
66
foo(42);
77
//~^ ERROR type annotations needed
88
//~| NOTE cannot infer type
9-
//~| NOTE cannot resolve
9+
//~| NOTE cannot satisfy
1010
}

src/test/ui/type/type-annotation-needed.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | fn foo<T: Into<String>>(x: i32) {}
77
LL | foo(42);
88
| ^^^ cannot infer type for type parameter `T` declared on the function `foo`
99
|
10-
= note: cannot resolve `_: std::convert::Into<std::string::String>`
10+
= note: cannot satisfy `_: std::convert::Into<std::string::String>`
1111
help: consider specifying the type argument in the function call
1212
|
1313
LL | foo::<T>(42);

src/test/ui/type/type-check/issue-40294.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | trait Foo: Sized {
77
LL | where &'a T : Foo,
88
| ^^^ cannot infer type for reference `&'a T`
99
|
10-
= note: cannot resolve `&'a T: Foo`
10+
= note: cannot satisfy `&'a T: Foo`
1111

1212
error: aborting due to previous error
1313

0 commit comments

Comments
 (0)