]> git.lizzy.rs Git - rust.git/commitdiff
Slight rewording of diagnostic message
authorEsteban Küber <esteban@kuber.com.ar>
Thu, 30 Jan 2020 18:20:47 +0000 (10:20 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Sun, 2 Feb 2020 19:53:10 +0000 (11:53 -0800)
16 files changed:
src/librustc/traits/object_safety.rs
src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr
src/test/ui/feature-gates/feature-gate-object_safe_for_dispatch.stderr
src/test/ui/issues/issue-20692.stderr
src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr
src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr
src/test/ui/object-safety/object-safety-sized-2.curr.stderr
src/test/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr
src/test/ui/object-safety/object-safety-sized.curr.stderr
src/test/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr
src/test/ui/suggestions/object-unsafe-trait-should-use-self.stderr
src/test/ui/traits/trait-object-macro-matcher.stderr
src/test/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
src/test/ui/wf/wf-convert-unsafe-trait-obj.stderr
src/test/ui/wf/wf-fn-where-clause.stderr
src/test/ui/wf/wf-unsafe-trait-obj-match.stderr

index 08b980480c576e987e9bebbed7de1481940264f3..50d355f9d0a0d741c60521c2e9bcdf677cdfd2a5 100644 (file)
@@ -44,7 +44,7 @@ impl ObjectSafetyViolation {
     pub fn error_msg(&self) -> Cow<'static, str> {
         match *self {
             ObjectSafetyViolation::SizedSelf(_) => {
-                "the trait cannot require that `Self : Sized`".into()
+                "traits that require `Self: Sized` cannot be made into an object".into()
             }
             ObjectSafetyViolation::SupertraitSelf => {
                 "the trait cannot use `Self` as a type parameter \
index 8c6c33b11865b38ab114f727ba5e18dc971e3478..070917f2db98a6d28f2c265b05b32c1f009d760c 100644 (file)
@@ -16,7 +16,7 @@ error[E0038]: the trait `std::marker::Copy` cannot be made into an object
 LL |     let _: &Copy + 'static;
    |            ^^^^^ the trait `std::marker::Copy` cannot be made into an object
    |
-   = note: the trait cannot require that `Self : Sized`
+   = note: traits that require `Self: Sized` cannot be made into an object
 
 error: aborting due to 3 previous errors
 
index 237c22d3bf09af04f17fae47557c563a849ac616..ce9830694051264c9de0643c38e2c55505fae9c3 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
   --> $DIR/feature-gate-object_safe_for_dispatch.rs:18:38
    |
 LL | trait NonObjectSafe1: Sized {}
-   |                       ----- the trait cannot require that `Self : Sized`
+   |                       ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL | fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) {
    |                                      ^^^^^^^^^^^^^^^^^^^ the trait `NonObjectSafe1` cannot be made into an object
@@ -38,7 +38,7 @@ error[E0038]: the trait `NonObjectSafe1` cannot be made into an object
   --> $DIR/feature-gate-object_safe_for_dispatch.rs:38:6
    |
 LL | trait NonObjectSafe1: Sized {}
-   |                       ----- the trait cannot require that `Self : Sized`
+   |                       ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL | impl Trait for dyn NonObjectSafe1 {}
    |      ^^^^^ the trait `NonObjectSafe1` cannot be made into an object
index 62efdfb2e91bf5d6373386177d80d608ce24be0e..552b65b36209470b339c25dddf787728759155d5 100644 (file)
@@ -2,9 +2,9 @@ error[E0038]: the trait `Array` cannot be made into an object
   --> $DIR/issue-20692.rs:7:5
    |
 LL | trait Array: Sized + Copy {}
-   |              -----   ---- the trait cannot require that `Self : Sized`
+   |              -----   ---- traits that require `Self: Sized` cannot be made into an object
    |              |
-   |              the trait cannot require that `Self : Sized`
+   |              traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     &dyn Array;
    |     ^^^^^^^^^^ the trait `Array` cannot be made into an object
@@ -13,9 +13,9 @@ error[E0038]: the trait `Array` cannot be made into an object
   --> $DIR/issue-20692.rs:4:13
    |
 LL | trait Array: Sized + Copy {}
-   |              -----   ---- the trait cannot require that `Self : Sized`
+   |              -----   ---- traits that require `Self: Sized` cannot be made into an object
    |              |
-   |              the trait cannot require that `Self : Sized`
+   |              traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let _ = x
    |             ^ the trait `Array` cannot be made into an object
index a0ecca3020e15b6fc1478ac5e364a5c890b2ba7e..728a5ea6faa9ff9b13d44e70c104326710efd475 100644 (file)
@@ -13,7 +13,7 @@ error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/kindck-inherited-copy-bound.rs:28:19
    |
 LL | trait Foo : Copy {
-   |             ---- the trait cannot require that `Self : Sized`
+   |             ---- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let z = &x as &dyn Foo;
    |                   ^^^^^^^^ the trait `Foo` cannot be made into an object
@@ -22,7 +22,7 @@ error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/kindck-inherited-copy-bound.rs:28:13
    |
 LL | trait Foo : Copy {
-   |             ---- the trait cannot require that `Self : Sized`
+   |             ---- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let z = &x as &dyn Foo;
    |             ^^ the trait `Foo` cannot be made into an object
index 5694150ed7cc56cb441d757660ac542f5dfa72a4..b4fba9706bc0db0cb6dbaae12b3e4d328012842e 100644 (file)
@@ -13,7 +13,7 @@ error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/kindck-inherited-copy-bound.rs:28:13
    |
 LL | trait Foo : Copy {
-   |             ---- the trait cannot require that `Self : Sized`
+   |             ---- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let z = &x as &dyn Foo;
    |             ^^ the trait `Foo` cannot be made into an object
index 1ab33261111f83249b62b994089d11fe2710b012..49f98e008508254355339a37648e6f9bb62b3213 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-sized-2.rs:14:30
    |
 LL |     where Self : Sized
-   |                  ----- the trait cannot require that `Self : Sized`
+   |                  ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                              ^^^^^^^^ the trait `Bar` cannot be made into an object
index fa1c89575198c8d6a530cf7a0c5d1541fc71bb83..9b189c48f9301f63f0408ceeeabe7a29cf6a9de7 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-sized-2.rs:16:5
    |
 LL |     where Self : Sized
-   |                  ----- the trait cannot require that `Self : Sized`
+   |                  ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     t
    |     ^ the trait `Bar` cannot be made into an object
index 473c8f8e6faaf74c149ad61479a30fcf44c52dcc..3b588034e3322099a53f5c35458d6fa60228d992 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-sized.rs:12:30
    |
 LL | trait Bar : Sized {
-   |             ----- the trait cannot require that `Self : Sized`
+   |             ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
    |                              ^^^^^^^^ the trait `Bar` cannot be made into an object
index 217e2aa00da16523f97ade5ddf5ccbb726385367..6b60eef30d3d31cbd9b095f9cfaeaa1295e3385d 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/object-safety-sized.rs:14:5
    |
 LL | trait Bar : Sized {
-   |             ----- the trait cannot require that `Self : Sized`
+   |             ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     t
    |     ^ the trait `Bar` cannot be made into an object
index 91fa144032fc96f91ade73db22c2ef08ce5ce687..4a9242b1f4fac5140343592f8f249a5981cdb664 100644 (file)
@@ -15,7 +15,7 @@ error[E0038]: the trait `A` cannot be made into an object
   --> $DIR/object-unsafe-trait-should-use-self.rs:3:13
    |
 LL | trait A: Sized {
-   |          ----- the trait cannot require that `Self : Sized`
+   |          ----- traits that require `Self: Sized` cannot be made into an object
 LL |     fn f(a: A) -> A;
    |             ^ the trait `A` cannot be made into an object
 
index 6b5effaad9bc4e49a73245d035f372f83e23da5f..f41ebf4166d06f2071ea7d45a756d62cb27b5077 100644 (file)
@@ -10,7 +10,7 @@ error[E0038]: the trait `std::marker::Copy` cannot be made into an object
 LL |     m!(dyn Copy + Send + 'static);
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
    |
-   = note: the trait cannot require that `Self : Sized`
+   = note: traits that require `Self: Sized` cannot be made into an object
 
 error: aborting due to 2 previous errors
 
index 461ad97f2f0ac6f859e78de959207ef81d5976d0..7e055d746f67671f651b696beadd8ad1c6b3beb9 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj-box.rs:16:33
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let t_box: Box<dyn Trait> = Box::new(S);
    |                                 ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
@@ -14,7 +14,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj-box.rs:17:15
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     takes_box(Box::new(S));
    |               ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
@@ -26,7 +26,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj-box.rs:15:5
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     Box::new(S) as Box<dyn Trait>;
    |     ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
index 6fc57369b4e7375dfa5ad99c3b3269ff2e83aab2..9e7fe7f3e1dfc02f87e733d8cb3884da5a3b0815 100644 (file)
@@ -2,7 +2,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj.rs:16:25
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let t: &dyn Trait = &S;
    |                         ^^ the trait `Trait` cannot be made into an object
@@ -14,7 +14,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj.rs:17:17
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     takes_trait(&S);
    |                 ^^ the trait `Trait` cannot be made into an object
@@ -26,7 +26,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj.rs:15:5
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     &S as &dyn Trait;
    |     ^^ the trait `Trait` cannot be made into an object
index 3bef38d2fd2c3f791755e702a64f1a46dff31fda..f17391520a32cc80cb174af391dc9b0d3f66ea16 100644 (file)
@@ -25,7 +25,7 @@ error[E0038]: the trait `std::marker::Copy` cannot be made into an object
 LL | fn bar() where Vec<dyn Copy>:, {}
    |                ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
    |
-   = note: the trait cannot require that `Self : Sized`
+   = note: traits that require `Self: Sized` cannot be made into an object
 
 error: aborting due to 3 previous errors
 
index 36c60aefa6bb55cd67fcb495b1cc43ab8c1cc756..452a2a5e58b7fbad87414f09f2e0c0a7191f9acd 100644 (file)
@@ -16,7 +16,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-unsafe-trait-obj-match.rs:26:21
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |         Some(()) => &S,
    |                     ^^ the trait `Trait` cannot be made into an object
@@ -28,7 +28,7 @@ error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-unsafe-trait-obj-match.rs:25:25
    |
 LL | trait Trait: Sized {}
-   |              ----- the trait cannot require that `Self : Sized`
+   |              ----- traits that require `Self: Sized` cannot be made into an object
 ...
 LL |     let t: &dyn Trait = match opt() {
    |                         ^^^^^^^^^^^ the trait `Trait` cannot be made into an object