diff options
Diffstat (limited to 'tests/ui/methods')
4 files changed, 24 insertions, 4 deletions
diff --git a/tests/ui/methods/inherent-bound-in-probe.stderr b/tests/ui/methods/inherent-bound-in-probe.stderr index ff03a7edb..8d7cc4622 100644 --- a/tests/ui/methods/inherent-bound-in-probe.stderr +++ b/tests/ui/methods/inherent-bound-in-probe.stderr @@ -24,8 +24,7 @@ LL | where LL | &'a T: IntoIterator<Item = &'a u8>, | ------------- unsatisfied trait bound introduced here = note: 126 redundant requirements hidden - = note: required for `&BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<...>>>>>` to implement `IntoIterator` - = note: the full type name has been written to '$TEST_BUILD_DIR/methods/inherent-bound-in-probe/inherent-bound-in-probe.long-type-hash.txt' + = note: required for `&BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<_>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` to implement `IntoIterator` note: required by a bound in `Helper<'a, T>` --> $DIR/inherent-bound-in-probe.rs:25:25 | diff --git a/tests/ui/methods/method-self-arg-2.stderr b/tests/ui/methods/method-self-arg-2.stderr index b98f7a786..946e71ee5 100644 --- a/tests/ui/methods/method-self-arg-2.stderr +++ b/tests/ui/methods/method-self-arg-2.stderr @@ -6,7 +6,7 @@ LL | let y = &mut x; LL | Foo::bar(&x); | ^^ immutable borrow occurs here LL | y.use_mut(); - | ----------- mutable borrow later used here + | - mutable borrow later used here error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/method-self-arg-2.rs:20:14 @@ -16,7 +16,7 @@ LL | let y = &mut x; LL | Foo::baz(&mut x); | ^^^^^^ second mutable borrow occurs here LL | y.use_mut(); - | ----------- first borrow later used here + | - first borrow later used here error: aborting due to 2 previous errors diff --git a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs new file mode 100644 index 000000000..93b7ddf5e --- /dev/null +++ b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs @@ -0,0 +1,6 @@ +// issue: 114131 + +fn main() { + let hello = len(vec![]); + //~^ ERROR cannot find function `len` in this scope +} diff --git a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr new file mode 100644 index 000000000..9694f80ab --- /dev/null +++ b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr @@ -0,0 +1,15 @@ +error[E0425]: cannot find function `len` in this scope + --> $DIR/suggest-method-on-call-with-macro-rcvr.rs:4:17 + | +LL | let hello = len(vec![]); + | ^^^ not found in this scope + | +help: use the `.` operator to call the method `len` on `&Vec<_>` + | +LL - let hello = len(vec![]); +LL + let hello = vec![].len(); + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0425`. |