]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/deref-suggestion.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / deref-suggestion.stderr
index 53bc3212a7fb01f7b44f52be5f0747585c9d68d1..433bab77189174963e519f56b222178d312a1f08 100644 (file)
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     foo(s);
    |         ^
    |         |
-   |         expected struct `std::string::String`, found reference
+   |         expected struct `std::string::String`, found &std::string::String
    |         help: try using a conversion method: `s.to_string()`
-   |
-   = note: expected struct `std::string::String`
-           found reference `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:14:10
@@ -18,9 +15,6 @@ LL |     foo3(u);
    |          |
    |          expected u32, found &u32
    |          help: consider dereferencing the borrow: `*u`
-   |
-   = note:   expected type `u32`
-           found reference `&u32`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:30:9
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |     foo(&"aaa".to_owned());
    |         ^^^^^^^^^^^^^^^^^
    |         |
-   |         expected struct `std::string::String`, found reference
+   |         expected struct `std::string::String`, found &std::string::String
    |         help: consider removing the borrow: `"aaa".to_owned()`
-   |
-   = note: expected struct `std::string::String`
-           found reference `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:32:9
@@ -40,11 +31,8 @@ error[E0308]: mismatched types
 LL |     foo(&mut "aaa".to_owned());
    |         ^^^^^^^^^^^^^^^^^^^^^
    |         |
-   |         expected struct `std::string::String`, found mutable reference
+   |         expected struct `std::string::String`, found &mut std::string::String
    |         help: consider removing the borrow: `"aaa".to_owned()`
-   |
-   = note:         expected struct `std::string::String`
-           found mutable reference `&mut std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:2:20
@@ -54,9 +42,6 @@ LL |     ($x:expr) => { &$x }
 ...
 LL |     foo3(borrow!(0));
    |          ---------- in this macro invocation
-   |
-   = note:   expected type `u32`
-           found reference `&{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:36:5
@@ -64,8 +49,6 @@ error[E0308]: mismatched types
 LL |     assert_eq!(3i32, &3i32);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found &i32
    |
-   = note:   expected type `i32`
-           found reference `&i32`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error[E0308]: mismatched types
@@ -76,9 +59,6 @@ LL |     let s = S { u };
    |                 |
    |                 expected &u32, found integer
    |                 help: consider borrowing here: `u: &u`
-   |
-   = note: expected reference `&u32`
-                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:41:20
@@ -88,9 +68,6 @@ LL |     let s = S { u: u };
    |                    |
    |                    expected &u32, found integer
    |                    help: consider borrowing here: `&u`
-   |
-   = note: expected reference `&u32`
-                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:44:17
@@ -100,9 +77,6 @@ LL |     let r = R { i };
    |                 |
    |                 expected u32, found &{integer}
    |                 help: consider dereferencing the borrow: `i: *i`
-   |
-   = note:   expected type `u32`
-           found reference `&{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:46:20
@@ -112,9 +86,6 @@ LL |     let r = R { i: i };
    |                    |
    |                    expected u32, found &{integer}
    |                    help: consider dereferencing the borrow: `*i`
-   |
-   = note:   expected type `u32`
-           found reference `&{integer}`
 
 error: aborting due to 10 previous errors