about summary refs log tree commit diff
path: root/src/test/ui/methods
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-07-01 16:47:26 -0700
committerEsteban Küber <esteban@kuber.com.ar>2022-07-07 12:15:12 -0700
commitaf10a456c19c447ff2bff585537d52a8d532bd86 (patch)
treedfb4e9c247c42c7c495430f03b9bdda1013e749f /src/test/ui/methods
parentd5642acfe689ca704b8572ea8ca88e43aeb70a11 (diff)
downloadrust-af10a456c19c447ff2bff585537d52a8d532bd86.tar.gz
rust-af10a456c19c447ff2bff585537d52a8d532bd86.zip
Track implicit `Sized` obligations in type params
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting
the HIR Generics. (Fix #98539)
Diffstat (limited to 'src/test/ui/methods')
-rw-r--r--src/test/ui/methods/method-call-err-msg.stderr4
-rw-r--r--src/test/ui/methods/method-not-found-generic-arg-elision.stderr14
2 files changed, 9 insertions, 9 deletions
diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr
index 4be588fe7f9..690fe8fa7af 100644
--- a/src/test/ui/methods/method-call-err-msg.stderr
+++ b/src/test/ui/methods/method-call-err-msg.stderr
@@ -51,8 +51,8 @@ error[E0599]: `Foo` is not an iterator
    |
 LL | pub struct Foo;
    | --------------
-   | |          |
-   | |          method `take` not found for this struct
+   | |
+   | method `take` not found for this struct
    | doesn't satisfy `Foo: Iterator`
 ...
 LL |      .take()
diff --git a/src/test/ui/methods/method-not-found-generic-arg-elision.stderr b/src/test/ui/methods/method-not-found-generic-arg-elision.stderr
index 492d480e13e..4cbda4048a8 100644
--- a/src/test/ui/methods/method-not-found-generic-arg-elision.stderr
+++ b/src/test/ui/methods/method-not-found-generic-arg-elision.stderr
@@ -2,7 +2,7 @@ error[E0599]: no method named `distance` found for struct `Point<i32>` in the cu
   --> $DIR/method-not-found-generic-arg-elision.rs:82:23
    |
 LL | struct Point<T> {
-   |        ----- method `distance` not found for this struct
+   | --------------- method `distance` not found for this struct
 ...
 LL |     let d = point_i32.distance();
    |                       ^^^^^^^^ method not found in `Point<i32>`
@@ -14,7 +14,7 @@ error[E0599]: no method named `other` found for struct `Point` in the current sc
   --> $DIR/method-not-found-generic-arg-elision.rs:84:23
    |
 LL | struct Point<T> {
-   |        ----- method `other` not found for this struct
+   | --------------- method `other` not found for this struct
 ...
 LL |     let d = point_i32.other();
    |                       ^^^^^ method not found in `Point<i32>`
@@ -29,7 +29,7 @@ error[E0599]: no method named `method` found for struct `Wrapper<bool>` in the c
   --> $DIR/method-not-found-generic-arg-elision.rs:90:13
    |
 LL | struct Wrapper<T>(T);
-   |        ------- method `method` not found for this struct
+   | ----------------- method `method` not found for this struct
 ...
 LL |     wrapper.method();
    |             ^^^^^^ method not found in `Wrapper<bool>`
@@ -45,7 +45,7 @@ error[E0599]: no method named `other` found for struct `Wrapper` in the current
   --> $DIR/method-not-found-generic-arg-elision.rs:92:13
    |
 LL | struct Wrapper<T>(T);
-   |        ------- method `other` not found for this struct
+   | ----------------- method `other` not found for this struct
 ...
 LL |     wrapper.other();
    |             ^^^^^ method not found in `Wrapper<bool>`
@@ -54,7 +54,7 @@ error[E0599]: no method named `method` found for struct `Wrapper2<'_, bool, 3_us
   --> $DIR/method-not-found-generic-arg-elision.rs:96:13
    |
 LL | struct Wrapper2<'a, T, const C: usize> {
-   |        -------- method `method` not found for this struct
+   | -------------------------------------- method `method` not found for this struct
 ...
 LL |     wrapper.method();
    |             ^^^^^^ method not found in `Wrapper2<'_, bool, 3_usize>`
@@ -68,7 +68,7 @@ error[E0599]: no method named `other` found for struct `Wrapper2` in the current
   --> $DIR/method-not-found-generic-arg-elision.rs:98:13
    |
 LL | struct Wrapper2<'a, T, const C: usize> {
-   |        -------- method `other` not found for this struct
+   | -------------------------------------- method `other` not found for this struct
 ...
 LL |     wrapper.other();
    |             ^^^^^ method not found in `Wrapper2<'_, bool, 3_usize>`
@@ -83,7 +83,7 @@ error[E0599]: the method `method` exists for struct `Struct<f64>`, but its trait
   --> $DIR/method-not-found-generic-arg-elision.rs:104:7
    |
 LL | struct Struct<T>{
-   |        ------ method `method` not found for this struct
+   | ---------------- method `method` not found for this struct
 ...
 LL |     s.method();
    |       ^^^^^^ method cannot be called on `Struct<f64>` due to unsatisfied trait bounds