Auto merge of #97892 - klensy:fix-spaces, r=oli-obk

diagnostics: remove trailing spaces

Remove few occurrences of trailing spaces and drive by fix of needless alloc of const string.
This commit is contained in:
bors 2022-06-17 17:30:16 +00:00
commit 0cb9899e78
275 changed files with 737 additions and 733 deletions

View file

@ -771,8 +771,12 @@ impl EmitterWriter {
self self
} }
fn maybe_anonymized(&self, line_num: usize) -> String { fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> {
if self.ui_testing { ANONYMIZED_LINE_NUM.to_string() } else { line_num.to_string() } if self.ui_testing {
Cow::Borrowed(ANONYMIZED_LINE_NUM)
} else {
Cow::Owned(line_num.to_string())
}
} }
fn draw_line( fn draw_line(
@ -819,7 +823,7 @@ impl EmitterWriter {
} }
buffer.puts(line_offset, 0, &self.maybe_anonymized(line_index), Style::LineNumber); buffer.puts(line_offset, 0, &self.maybe_anonymized(line_index), Style::LineNumber);
draw_col_separator(buffer, line_offset, width_offset - 2); draw_col_separator_no_space(buffer, line_offset, width_offset - 2);
} }
fn render_source_line( fn render_source_line(
@ -1929,7 +1933,7 @@ impl EmitterWriter {
// Only show an underline in the suggestions if the suggestion is not the // Only show an underline in the suggestions if the suggestion is not the
// entirety of the code being shown and the displayed code is not multiline. // entirety of the code being shown and the displayed code is not multiline.
if let DisplaySuggestion::Diff | DisplaySuggestion::Underline = show_code_change { if let DisplaySuggestion::Diff | DisplaySuggestion::Underline = show_code_change {
draw_col_separator(&mut buffer, row_num, max_line_num_len + 1); draw_col_separator_no_space(&mut buffer, row_num, max_line_num_len + 1);
for part in parts { for part in parts {
let span_start_pos = sm.lookup_char_pos(part.span.lo()).col_display; let span_start_pos = sm.lookup_char_pos(part.span.lo()).col_display;
let span_end_pos = sm.lookup_char_pos(part.span.hi()).col_display; let span_end_pos = sm.lookup_char_pos(part.span.hi()).col_display;

View file

@ -68,7 +68,7 @@ help: to link to the macro, add an exclamation mark
| |
LL - /// Link to [derive@m] LL - /// Link to [derive@m]
LL + /// Link to [m!] LL + /// Link to [m!]
| |
error: unresolved link to `m` error: unresolved link to `m`
--> $DIR/disambiguator-mismatch.rs:46:14 --> $DIR/disambiguator-mismatch.rs:46:14
@ -124,7 +124,7 @@ help: to link to the constant, prefix with `const@`
| |
LL - /// Link to [c()] LL - /// Link to [c()]
LL + /// Link to [const@c] LL + /// Link to [const@c]
| |
error: incompatible link kind for `f` error: incompatible link kind for `f`
--> $DIR/disambiguator-mismatch.rs:72:14 --> $DIR/disambiguator-mismatch.rs:72:14
@ -136,7 +136,7 @@ help: to link to the function, add parentheses
| |
LL - /// Link to [const@f] LL - /// Link to [const@f]
LL + /// Link to [f()] LL + /// Link to [f()]
| |
error: unresolved link to `std` error: unresolved link to `std`
--> $DIR/disambiguator-mismatch.rs:77:14 --> $DIR/disambiguator-mismatch.rs:77:14

View file

@ -98,7 +98,7 @@ help: to link to the associated function, add parentheses
| |
LL - /// [type@Vec::into_iter] LL - /// [type@Vec::into_iter]
LL + /// [Vec::into_iter()] LL + /// [Vec::into_iter()]
| |
error: unresolved link to `S` error: unresolved link to `S`
--> $DIR/errors.rs:68:6 --> $DIR/errors.rs:68:6
@ -110,7 +110,7 @@ help: to link to the struct, prefix with `struct@`
| |
LL - /// [S!] LL - /// [S!]
LL + /// [struct@S] LL + /// [struct@S]
| |
error: unresolved link to `S::h` error: unresolved link to `S::h`
--> $DIR/errors.rs:78:6 --> $DIR/errors.rs:78:6
@ -122,7 +122,7 @@ help: to link to the associated function, add parentheses
| |
LL - /// [type@S::h] LL - /// [type@S::h]
LL + /// [S::h()] LL + /// [S::h()]
| |
error: unresolved link to `T::g` error: unresolved link to `T::g`
--> $DIR/errors.rs:86:6 --> $DIR/errors.rs:86:6
@ -134,7 +134,7 @@ help: to link to the associated function, add parentheses
| |
LL - /// [type@T::g] LL - /// [type@T::g]
LL + /// [T::g()] LL + /// [T::g()]
| |
error: unresolved link to `T::h` error: unresolved link to `T::h`
--> $DIR/errors.rs:91:6 --> $DIR/errors.rs:91:6

View file

@ -3,7 +3,7 @@ error[E0428]: the name `f` is defined multiple times
| |
6 | pub fn f() {} 6 | pub fn f() {}
| ---------- previous definition of the value `f` here | ---------- previous definition of the value `f` here
7 | 7 |
8 | pub fn f() {} 8 | pub fn f() {}
| ^^^^^^^^^^ `f` redefined here | ^^^^^^^^^^ `f` redefined here
| |

View file

@ -16,7 +16,7 @@ help: consider removing the ``
| |
LL - foo(&&A, B, C, D, E, F, G); LL - foo(&&A, B, C, D, E, F, G);
LL + foo(&&A, B, C, D, E, F, G); LL + foo(&&A, B, C, D, E, F, G);
| |
help: remove the extra arguments help: remove the extra arguments
| |
LL | foo(&&A, D, {&E}, G); LL | foo(&&A, D, {&E}, G);

View file

@ -58,7 +58,7 @@ help: consider removing the borrow
| |
LL - asm!("{}", const &0); LL - asm!("{}", const &0);
LL + asm!("{}", const 0); LL + asm!("{}", const 0);
| |
error: invalid asm output error: invalid asm output
--> $DIR/type-check-1.rs:15:29 --> $DIR/type-check-1.rs:15:29

View file

@ -9,7 +9,7 @@ help: the clause will not be checked when the type alias is used, and should be
| |
LL - type _TaWhere1<T> where T: Iterator<Item: Copy> = T; LL - type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
LL + type _TaWhere1<T> = T; LL + type _TaWhere1<T> = T;
| |
warning: where clauses are not enforced in type aliases warning: where clauses are not enforced in type aliases
--> $DIR/type-alias.rs:6:25 --> $DIR/type-alias.rs:6:25
@ -21,7 +21,7 @@ help: the clause will not be checked when the type alias is used, and should be
| |
LL - type _TaWhere2<T> where T: Iterator<Item: 'static> = T; LL - type _TaWhere2<T> where T: Iterator<Item: 'static> = T;
LL + type _TaWhere2<T> = T; LL + type _TaWhere2<T> = T;
| |
warning: where clauses are not enforced in type aliases warning: where clauses are not enforced in type aliases
--> $DIR/type-alias.rs:7:25 --> $DIR/type-alias.rs:7:25
@ -33,7 +33,7 @@ help: the clause will not be checked when the type alias is used, and should be
| |
LL - type _TaWhere3<T> where T: Iterator<Item: 'static> = T; LL - type _TaWhere3<T> where T: Iterator<Item: 'static> = T;
LL + type _TaWhere3<T> = T; LL + type _TaWhere3<T> = T;
| |
warning: where clauses are not enforced in type aliases warning: where clauses are not enforced in type aliases
--> $DIR/type-alias.rs:8:25 --> $DIR/type-alias.rs:8:25
@ -45,7 +45,7 @@ help: the clause will not be checked when the type alias is used, and should be
| |
LL - type _TaWhere4<T> where T: Iterator<Item: 'static + Copy + Send> = T; LL - type _TaWhere4<T> where T: Iterator<Item: 'static + Copy + Send> = T;
LL + type _TaWhere4<T> = T; LL + type _TaWhere4<T> = T;
| |
warning: where clauses are not enforced in type aliases warning: where clauses are not enforced in type aliases
--> $DIR/type-alias.rs:9:25 --> $DIR/type-alias.rs:9:25
@ -57,7 +57,7 @@ help: the clause will not be checked when the type alias is used, and should be
| |
LL - type _TaWhere5<T> where T: Iterator<Item: for<'a> Into<&'a u8>> = T; LL - type _TaWhere5<T> where T: Iterator<Item: for<'a> Into<&'a u8>> = T;
LL + type _TaWhere5<T> = T; LL + type _TaWhere5<T> = T;
| |
warning: where clauses are not enforced in type aliases warning: where clauses are not enforced in type aliases
--> $DIR/type-alias.rs:10:25 --> $DIR/type-alias.rs:10:25
@ -69,7 +69,7 @@ help: the clause will not be checked when the type alias is used, and should be
| |
LL - type _TaWhere6<T> where T: Iterator<Item: Iterator<Item: Copy>> = T; LL - type _TaWhere6<T> where T: Iterator<Item: Iterator<Item: Copy>> = T;
LL + type _TaWhere6<T> = T; LL + type _TaWhere6<T> = T;
| |
warning: bounds on generic parameters are not enforced in type aliases warning: bounds on generic parameters are not enforced in type aliases
--> $DIR/type-alias.rs:12:20 --> $DIR/type-alias.rs:12:20
@ -81,7 +81,7 @@ help: the bound will not be checked when the type alias is used, and should be r
| |
LL - type _TaInline1<T: Iterator<Item: Copy>> = T; LL - type _TaInline1<T: Iterator<Item: Copy>> = T;
LL + type _TaInline1<T> = T; LL + type _TaInline1<T> = T;
| |
warning: bounds on generic parameters are not enforced in type aliases warning: bounds on generic parameters are not enforced in type aliases
--> $DIR/type-alias.rs:13:20 --> $DIR/type-alias.rs:13:20
@ -93,7 +93,7 @@ help: the bound will not be checked when the type alias is used, and should be r
| |
LL - type _TaInline2<T: Iterator<Item: 'static>> = T; LL - type _TaInline2<T: Iterator<Item: 'static>> = T;
LL + type _TaInline2<T> = T; LL + type _TaInline2<T> = T;
| |
warning: bounds on generic parameters are not enforced in type aliases warning: bounds on generic parameters are not enforced in type aliases
--> $DIR/type-alias.rs:14:20 --> $DIR/type-alias.rs:14:20
@ -105,7 +105,7 @@ help: the bound will not be checked when the type alias is used, and should be r
| |
LL - type _TaInline3<T: Iterator<Item: 'static>> = T; LL - type _TaInline3<T: Iterator<Item: 'static>> = T;
LL + type _TaInline3<T> = T; LL + type _TaInline3<T> = T;
| |
warning: bounds on generic parameters are not enforced in type aliases warning: bounds on generic parameters are not enforced in type aliases
--> $DIR/type-alias.rs:15:20 --> $DIR/type-alias.rs:15:20
@ -117,7 +117,7 @@ help: the bound will not be checked when the type alias is used, and should be r
| |
LL - type _TaInline4<T: Iterator<Item: 'static + Copy + Send>> = T; LL - type _TaInline4<T: Iterator<Item: 'static + Copy + Send>> = T;
LL + type _TaInline4<T> = T; LL + type _TaInline4<T> = T;
| |
warning: bounds on generic parameters are not enforced in type aliases warning: bounds on generic parameters are not enforced in type aliases
--> $DIR/type-alias.rs:16:20 --> $DIR/type-alias.rs:16:20
@ -129,7 +129,7 @@ help: the bound will not be checked when the type alias is used, and should be r
| |
LL - type _TaInline5<T: Iterator<Item: for<'a> Into<&'a u8>>> = T; LL - type _TaInline5<T: Iterator<Item: for<'a> Into<&'a u8>>> = T;
LL + type _TaInline5<T> = T; LL + type _TaInline5<T> = T;
| |
warning: bounds on generic parameters are not enforced in type aliases warning: bounds on generic parameters are not enforced in type aliases
--> $DIR/type-alias.rs:17:20 --> $DIR/type-alias.rs:17:20
@ -141,7 +141,7 @@ help: the bound will not be checked when the type alias is used, and should be r
| |
LL - type _TaInline6<T: Iterator<Item: Iterator<Item: Copy>>> = T; LL - type _TaInline6<T: Iterator<Item: Iterator<Item: Copy>>> = T;
LL + type _TaInline6<T> = T; LL + type _TaInline6<T> = T;
| |
warning: 12 warnings emitted warning: 12 warnings emitted

View file

@ -30,7 +30,7 @@ error[E0053]: method `make` has an incompatible type for trait
| |
LL | default type Ty = bool; LL | default type Ty = bool;
| ----------------------- expected this associated type | ----------------------- expected this associated type
LL | LL |
LL | fn make() -> bool { true } LL | fn make() -> bool { true }
| ^^^^ | ^^^^
| | | |
@ -50,7 +50,7 @@ error[E0308]: mismatched types
| |
LL | type Ty = u8; LL | type Ty = u8;
| ------------- associated type defaults can't be assumed inside the trait defining them | ------------- associated type defaults can't be assumed inside the trait defining them
LL | LL |
LL | fn make() -> Self::Ty { LL | fn make() -> Self::Ty {
| -------- expected `<Self as Tr>::Ty` because of return type | -------- expected `<Self as Tr>::Ty` because of return type
LL | 0u8 LL | 0u8
@ -77,7 +77,7 @@ error[E0308]: mismatched types
| |
LL | default type Ty = bool; LL | default type Ty = bool;
| ----------------------- expected this associated type | ----------------------- expected this associated type
LL | LL |
LL | fn make() -> Self::Ty { true } LL | fn make() -> Self::Ty { true }
| -------- ^^^^ expected associated type, found `bool` | -------- ^^^^ expected associated type, found `bool`
| | | |

View file

@ -5,7 +5,7 @@ LL | / trait Sub<Rhs=Self> {
LL | | type Output; LL | | type Output;
LL | | } LL | | }
| |_- type parameter `Rhs` must be specified for this | |_- type parameter `Rhs` must be specified for this
LL | LL |
LL | type Test = dyn Add + Sub; LL | type Test = dyn Add + Sub;
| ^^^ help: set the type parameter to the desired type: `Sub<Rhs>` | ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
| |

View file

@ -8,7 +8,7 @@ help: try removing the `+`
| |
LL - 2 + +2; LL - 2 + +2;
LL + 2 + 2; LL + 2 + 2;
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -3,7 +3,7 @@ error[E0515]: cannot return value referencing local variable `s`
| |
LL | let b = &s[..]; LL | let b = &s[..];
| - `s` is borrowed here | - `s` is borrowed here
LL | LL |
LL | Err(b)?; LL | Err(b)?;
| ^^^^^^^ returns a value referencing data owned by the current function | ^^^^^^^ returns a value referencing data owned by the current function

View file

@ -31,7 +31,7 @@ help: remove the `.await`
| |
LL - [1; ().await]; LL - [1; ().await];
LL + [1; ()]; LL + [1; ()];
| |
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View file

@ -9,7 +9,7 @@ help: remove these parentheses
| |
LL - fn main() { let _a = (async { }); } LL - fn main() { let _a = (async { }); }
LL + fn main() { let _a = async { }; } LL + fn main() { let _a = async { }; }
| |
warning: 1 warning emitted warning: 1 warning emitted

View file

@ -37,7 +37,7 @@ help: remove the `.await`
| |
LL - (|_| 2333).await; LL - (|_| 2333).await;
LL + (|_| 2333); LL + (|_| 2333);
| |
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View file

@ -13,7 +13,7 @@ help: remove the `.await`
| |
LL - boo().await; LL - boo().await;
LL + boo(); LL + boo();
| |
help: alternatively, consider making `fn boo` asynchronous help: alternatively, consider making `fn boo` asynchronous
| |
LL | async fn boo() {} LL | async fn boo() {}

View file

@ -3,7 +3,7 @@ error[E0255]: the name `foo` is defined multiple times
| |
LL | mod foo { pub mod foo { } } LL | mod foo { pub mod foo { } }
| ------- previous definition of the module `foo` here | ------- previous definition of the module `foo` here
LL | LL |
LL | use foo::foo; LL | use foo::foo;
| ^^^^^^^^ `foo` reimported here | ^^^^^^^^ `foo` reimported here
| |

View file

@ -12,7 +12,7 @@ help: consider removing the borrow
| |
LL - &panic!() LL - &panic!()
LL + panic!() LL + panic!()
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -3,10 +3,10 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
| |
LL | let y = &x; LL | let y = &x;
| -- immutable borrow occurs here | -- immutable borrow occurs here
LL | LL |
LL | let q = &raw mut x; LL | let q = &raw mut x;
| ^^^^^^^^^^ mutable borrow occurs here | ^^^^^^^^^^ mutable borrow occurs here
LL | LL |
LL | drop(y); LL | drop(y);
| - immutable borrow later used here | - immutable borrow later used here
@ -15,7 +15,7 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta
| |
LL | let y = &mut x; LL | let y = &mut x;
| ------ mutable borrow occurs here | ------ mutable borrow occurs here
LL | LL |
LL | let p = &raw const x; LL | let p = &raw const x;
| ^^^^^^^^^^^^ immutable borrow occurs here | ^^^^^^^^^^^^ immutable borrow occurs here
... ...
@ -30,7 +30,7 @@ LL | let y = &mut x;
... ...
LL | let q = &raw mut x; LL | let q = &raw mut x;
| ^^^^^^^^^^ second mutable borrow occurs here | ^^^^^^^^^^ second mutable borrow occurs here
LL | LL |
LL | drop(y); LL | drop(y);
| - first borrow later used here | - first borrow later used here

View file

@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
| |
LL | let x = &0; LL | let x = &0;
| -- help: consider changing this to be a mutable reference: `&mut 0` | -- help: consider changing this to be a mutable reference: `&mut 0`
LL | LL |
LL | let q = &raw mut *x; LL | let q = &raw mut *x;
| ^^^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable | ^^^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
@ -12,7 +12,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer
| |
LL | let x = &0 as *const i32; LL | let x = &0 as *const i32;
| -- help: consider changing this to be a mutable pointer: `&mut 0` | -- help: consider changing this to be a mutable pointer: `&mut 0`
LL | LL |
LL | let q = &raw mut *x; LL | let q = &raw mut *x;
| ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable | ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable

View file

@ -5,7 +5,7 @@ LL | let r = &x.0;
| ---- borrow of `x.0` occurs here | ---- borrow of `x.0` occurs here
LL | let y = x; LL | let y = x;
| ^ move out of `x` occurs here | ^ move out of `x` occurs here
LL | LL |
LL | r.use_ref(); LL | r.use_ref();
| ----------- borrow later used here | ----------- borrow later used here

View file

@ -3,10 +3,10 @@ error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immuta
| |
LL | let q: &isize = &p[0]; LL | let q: &isize = &p[0];
| - immutable borrow occurs here | - immutable borrow occurs here
LL | LL |
LL | p[0] = 5; LL | p[0] = 5;
| ^ mutable borrow occurs here | ^ mutable borrow occurs here
LL | LL |
LL | println!("{}", *q); LL | println!("{}", *q);
| -- immutable borrow later used here | -- immutable borrow later used here

View file

@ -3,7 +3,7 @@ error[E0503]: cannot use `p` because it was mutably borrowed
| |
LL | let q = &mut p; LL | let q = &mut p;
| ------ borrow of `p` occurs here | ------ borrow of `p` occurs here
LL | LL |
LL | p + 3; LL | p + 3;
| ^ use of borrowed `p` | ^ use of borrowed `p`
... ...
@ -18,7 +18,7 @@ LL | let q = &mut p;
... ...
LL | p.times(3); LL | p.times(3);
| ^^^^^^^^^^ immutable borrow occurs here | ^^^^^^^^^^ immutable borrow occurs here
LL | LL |
LL | *q + 3; // OK to use the new alias `q` LL | *q + 3; // OK to use the new alias `q`
| -- mutable borrow later used here | -- mutable borrow later used here

View file

@ -18,7 +18,7 @@ LL | let l = &mut p;
| ------ mutable borrow occurs here | ------ mutable borrow occurs here
LL | p.impurem(); LL | p.impurem();
| ^^^^^^^^^^^ immutable borrow occurs here | ^^^^^^^^^^^ immutable borrow occurs here
LL | LL |
LL | l.x += 1; LL | l.x += 1;
| -------- mutable borrow later used here | -------- mutable borrow later used here

View file

@ -3,7 +3,7 @@ error[E0505]: cannot move out of `*a` because it is borrowed
| |
LL | let b = &a; LL | let b = &a;
| -- borrow of `a` occurs here | -- borrow of `a` occurs here
LL | LL |
LL | let z = *a; LL | let z = *a;
| ^^ move out of `*a` occurs here | ^^ move out of `*a` occurs here
LL | b.use_ref(); LL | b.use_ref();

View file

@ -3,7 +3,7 @@ error[E0382]: use of moved value: `t`
| |
LL | let t: Box<_> = Box::new(3); LL | let t: Box<_> = Box::new(3);
| - move occurs because `t` has type `Box<isize>`, which does not implement the `Copy` trait | - move occurs because `t` has type `Box<isize>`, which does not implement the `Copy` trait
LL | LL |
LL | call_f(move|| { *t + 1 }); LL | call_f(move|| { *t + 1 });
| ------ -- variable moved due to use in closure | ------ -- variable moved due to use in closure
| | | |

View file

@ -3,7 +3,7 @@ error[E0505]: cannot move out of `s` because it is borrowed
| |
LL | let rs = &mut s; LL | let rs = &mut s;
| ------ borrow of `s` occurs here | ------ borrow of `s` occurs here
LL | LL |
LL | println!("{}", f[s]); LL | println!("{}", f[s]);
| ^ move out of `s` occurs here | ^ move out of `s` occurs here
... ...

View file

@ -23,7 +23,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
| |
LL | let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s; LL | let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s;
| ------------- immutable borrow occurs here | ------------- immutable borrow occurs here
LL | LL |
LL | let [_, _, ref mut from_begin2, ..] = *s; LL | let [_, _, ref mut from_begin2, ..] = *s;
| ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here | ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
LL | nop(&[from_begin2, from_end1, from_end3, from_end4]); LL | nop(&[from_begin2, from_end1, from_end3, from_end4]);
@ -45,7 +45,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
| |
LL | let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s; LL | let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s;
| --------------- immutable borrow occurs here | --------------- immutable borrow occurs here
LL | LL |
LL | let [.., ref mut from_end3, _, _] = *s; LL | let [.., ref mut from_end3, _, _] = *s;
| ^^^^^^^^^^^^^^^^^ mutable borrow occurs here | ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
LL | nop(&[from_begin0, from_begin1, from_begin3, from_end3]); LL | nop(&[from_begin0, from_begin1, from_begin3, from_end3]);

View file

@ -99,7 +99,7 @@ LL | let ra = &mut u.a;
| -------- borrow of `u.a` occurs here | -------- borrow of `u.a` occurs here
LL | let b = u.b; LL | let b = u.b;
| ^^^ use of borrowed `u.a` | ^^^ use of borrowed `u.a`
LL | LL |
LL | drop(ra); LL | drop(ra);
| -- borrow later used here | -- borrow later used here

View file

@ -3,7 +3,7 @@ error[E0382]: borrow of moved value: `helpers`
| |
LL | let helpers = [vec![], vec![]]; LL | let helpers = [vec![], vec![]];
| ------- move occurs because `helpers` has type `[Vec<&i64>; 2]`, which does not implement the `Copy` trait | ------- move occurs because `helpers` has type `[Vec<&i64>; 2]`, which does not implement the `Copy` trait
LL | LL |
LL | HelperStruct { helpers, is_empty: helpers[0].is_empty() } LL | HelperStruct { helpers, is_empty: helpers[0].is_empty() }
| ------- ^^^^^^^^^^^^^^^^^^^^^ value borrowed here after move | ------- ^^^^^^^^^^^^^^^^^^^^^ value borrowed here after move
| | | |

View file

@ -5,7 +5,7 @@ LL | let res = (|| (|| &greeting)())();
| -- -------- borrow occurs due to use in closure | -- -------- borrow occurs due to use in closure
| | | |
| borrow of `greeting` occurs here | borrow of `greeting` occurs here
LL | LL |
LL | greeting = "DEALLOCATED".to_string(); LL | greeting = "DEALLOCATED".to_string();
| ^^^^^^^^ assignment to borrowed `greeting` occurs here | ^^^^^^^^ assignment to borrowed `greeting` occurs here
... ...

View file

@ -13,7 +13,7 @@ help: try removing `&mut` here
| |
LL - h(&mut b); LL - h(&mut b);
LL + h(b); LL + h(b);
| |
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
--> $DIR/mut-borrow-of-mut-ref.rs:11:12 --> $DIR/mut-borrow-of-mut-ref.rs:11:12
@ -30,7 +30,7 @@ help: try removing `&mut` here
| |
LL - g(&mut &mut b); LL - g(&mut &mut b);
LL + g(&mut b); LL + g(&mut b);
| |
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
--> $DIR/mut-borrow-of-mut-ref.rs:18:12 --> $DIR/mut-borrow-of-mut-ref.rs:18:12
@ -47,7 +47,7 @@ help: try removing `&mut` here
| |
LL - h(&mut &mut b); LL - h(&mut &mut b);
LL + h(&mut b); LL + h(&mut b);
| |
error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
--> $DIR/mut-borrow-of-mut-ref.rs:35:5 --> $DIR/mut-borrow-of-mut-ref.rs:35:5

View file

@ -3,7 +3,7 @@ error[E0503]: cannot use `i` because it was mutably borrowed
| |
LL | /*1*/ let p = &mut i; // (reservation of `i` starts here) LL | /*1*/ let p = &mut i; // (reservation of `i` starts here)
| ------ borrow of `i` occurs here | ------ borrow of `i` occurs here
LL | LL |
LL | /*2*/ let j = i; // OK: `i` is only reserved here LL | /*2*/ let j = i; // OK: `i` is only reserved here
| ^ use of borrowed `i` | ^ use of borrowed `i`
... ...

View file

@ -3,7 +3,7 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immuta
| |
LL | let shared = &v; LL | let shared = &v;
| -- immutable borrow occurs here | -- immutable borrow occurs here
LL | LL |
LL | v.extend(shared); LL | v.extend(shared);
| ^^------^^^^^^^^ | ^^------^^^^^^^^
| | | | | |

View file

@ -5,7 +5,7 @@ LL | v[0].push_str({
| - -------- first borrow later used by call | - -------- first borrow later used by call
| | | |
| first mutable borrow occurs here | first mutable borrow occurs here
LL | LL |
LL | v.push(format!("foo")); LL | v.push(format!("foo"));
| ^^^^^^^^^^^^^^^^^^^^^^ second mutable borrow occurs here | ^^^^^^^^^^^^^^^^^^^^^^ second mutable borrow occurs here

View file

@ -8,7 +8,7 @@ help: consider borrowing the value
| |
LL - let _reference: &'static i32 = unsafe { pointer as *const i32 as &'static i32 }; LL - let _reference: &'static i32 = unsafe { pointer as *const i32 as &'static i32 };
LL + let _reference: &'static i32 = unsafe { &*(pointer as *const i32) }; LL + let _reference: &'static i32 = unsafe { &*(pointer as *const i32) };
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -3,7 +3,7 @@ error[E0596]: cannot borrow `**ref_mref_x` as mutable, as it is behind a `&` ref
| |
LL | let ref_mref_x = &mref_x; LL | let ref_mref_x = &mref_x;
| ------- help: consider changing this to be a mutable reference: `&mut mref_x` | ------- help: consider changing this to be a mutable reference: `&mut mref_x`
LL | LL |
LL | let c = || { LL | let c = || {
| ^^ `ref_mref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable | ^^ `ref_mref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
LL | LL |

View file

@ -5,7 +5,7 @@ LL | let sq = || { *x * *x };
| -- -- borrow occurs due to use in closure | -- -- borrow occurs due to use in closure
| | | |
| borrow of `x` occurs here | borrow of `x` occurs here
LL | LL |
LL | twice(x); LL | twice(x);
| ^ move out of `x` occurs here | ^ move out of `x` occurs here
LL | invoke(sq); LL | invoke(sq);

View file

@ -3,7 +3,7 @@ error[E0596]: cannot borrow `c` as mutable, as it is not declared as mutable
| |
LL | let c = |a, b, c, d| {}; LL | let c = |a, b, c, d| {};
| - help: consider changing this to be mutable: `mut c` | - help: consider changing this to be mutable: `mut c`
LL | LL |
LL | A.f(participant_name, &mut c); LL | A.f(participant_name, &mut c);
| ^^^^^^ cannot borrow as mutable | ^^^^^^ cannot borrow as mutable

View file

@ -3,7 +3,7 @@ error[E0751]: found both positive and negative implementation of trait `std::mar
| |
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {} LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
| ------------------------------------------------------ positive implementation here | ------------------------------------------------------ positive implementation here
LL | LL |
LL | impl<T: MyTrait> !Send for TestType<T> {} LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here

View file

@ -3,7 +3,7 @@ error: conflicting implementations of trait `Trait` for type `for<'a, 'b> fn(&'a
| |
LL | impl Trait for for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32 {} LL | impl Trait for for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32 {}
| ------------------------------------------------------------------ first implementation here | ------------------------------------------------------------------ first implementation here
LL | LL |
LL | impl Trait for for<'c> fn(&'c &'c u32, &'c &'c u32) -> &'c u32 { LL | impl Trait for for<'c> fn(&'c &'c u32, &'c &'c u32) -> &'c u32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32`
| |

View file

@ -3,7 +3,7 @@ error: conflicting implementations of trait `TheTrait` for type `fn(&u8)`
| |
LL | impl<'a> TheTrait for fn(&'a u8) {} LL | impl<'a> TheTrait for fn(&'a u8) {}
| -------------------------------- first implementation here | -------------------------------- first implementation here
LL | LL |
LL | impl TheTrait for fn(&u8) { LL | impl TheTrait for fn(&u8) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&u8)` | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&u8)`
| |

View file

@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`
| |
LL | impl Foo<i32> for i32 { } LL | impl Foo<i32> for i32 { }
| --------------------- first implementation here | --------------------- first implementation here
LL | LL |
LL | impl<A:Iterator> Foo<A::Item> for A { } LL | impl<A:Iterator> Foo<A::Item> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
| |

View file

@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::optio
| |
LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {} LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {}
| ---------------------------------------- first implementation here | ---------------------------------------- first implementation here
LL | LL |
LL | impl<T, U> Foo<T> for Option<U> { } LL | impl<T, U> Foo<T> for Option<U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>`

View file

@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`
| |
LL | impl Foo<i32> for i32 { } LL | impl Foo<i32> for i32 { }
| --------------------- first implementation here | --------------------- first implementation here
LL | LL |
LL | impl<A:Bar> Foo<A::Output> for A { } LL | impl<A:Bar> Foo<A::Output> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`

View file

@ -3,7 +3,7 @@ warning: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> f
| |
LL | impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {} LL | impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}
| ---------------------------------------------------------- first implementation here | ---------------------------------------------------------- first implementation here
LL | LL |
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 { LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
| |

View file

@ -12,7 +12,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
| |
LL - pub struct AtLeastByte<T: ?Sized> { LL - pub struct AtLeastByte<T: ?Sized> {
LL + pub struct AtLeastByte<T> { LL + pub struct AtLeastByte<T> {
| |
help: borrowed types always have a statically known size help: borrowed types always have a statically known size
| |
LL | value: &T, LL | value: &T,

View file

@ -21,7 +21,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
| |
LL - pub struct AtLeastByte<T: ?Sized> { LL - pub struct AtLeastByte<T: ?Sized> {
LL + pub struct AtLeastByte<T> { LL + pub struct AtLeastByte<T> {
| |
help: borrowed types always have a statically known size help: borrowed types always have a statically known size
| |
LL | value: &T, LL | value: &T,

View file

@ -8,7 +8,7 @@ help: the `const` keyword is only needed in the definition of the type
| |
LL - impl Foo<const 3> for Bar { LL - impl Foo<const 3> for Bar {
LL + impl Foo<3> for Bar { LL + impl Foo<3> for Bar {
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -8,7 +8,7 @@ help: the `const` keyword is only needed in the definition of the type
| |
LL - impl Foo<N = const 3> for Bar { LL - impl Foo<N = const 3> for Bar {
LL + impl Foo<N = 3> for Bar { LL + impl Foo<N = 3> for Bar {
| |
error[E0658]: associated const equality is incomplete error[E0658]: associated const equality is incomplete
--> $DIR/issue-89013.rs:9:10 --> $DIR/issue-89013.rs:9:10

View file

@ -13,7 +13,7 @@ help: remove these braces
| |
LL - let _: A<{ 7 }>; LL - let _: A<{ 7 }>;
LL + let _: A<7>; LL + let _: A<7>;
| |
warning: 1 warning emitted warning: 1 warning emitted

View file

@ -21,7 +21,7 @@ help: you can use the `?` operator instead
| |
LL - Ok(try!(Ok(()))) LL - Ok(try!(Ok(())))
LL + Ok(Ok(())?) LL + Ok(Ok(())?)
| |
help: alternatively, you can still access the deprecated `try!()` macro using the "raw identifier" syntax help: alternatively, you can still access the deprecated `try!()` macro using the "raw identifier" syntax
| |
LL | Ok(r#try!(Ok(()))) LL | Ok(r#try!(Ok(())))

View file

@ -23,7 +23,7 @@ error[E0599]: the method `use_eq` exists for struct `Object<NoDerives>`, but its
| |
LL | pub struct NoDerives; LL | pub struct NoDerives;
| --------------------- doesn't satisfy `NoDerives: Eq` | --------------------- doesn't satisfy `NoDerives: Eq`
LL | LL |
LL | struct Object<T>(T); LL | struct Object<T>(T);
| -------------------- method `use_eq` not found for this | -------------------- method `use_eq` not found for this
... ...
@ -42,7 +42,7 @@ error[E0599]: the method `use_ord` exists for struct `Object<NoDerives>`, but it
| |
LL | pub struct NoDerives; LL | pub struct NoDerives;
| --------------------- doesn't satisfy `NoDerives: Ord` | --------------------- doesn't satisfy `NoDerives: Ord`
LL | LL |
LL | struct Object<T>(T); LL | struct Object<T>(T);
| -------------------- method `use_ord` not found for this | -------------------- method `use_ord` not found for this
... ...
@ -64,7 +64,7 @@ LL | pub struct NoDerives;
| | | |
| doesn't satisfy `NoDerives: Ord` | doesn't satisfy `NoDerives: Ord`
| doesn't satisfy `NoDerives: PartialOrd` | doesn't satisfy `NoDerives: PartialOrd`
LL | LL |
LL | struct Object<T>(T); LL | struct Object<T>(T);
| -------------------- method `use_ord_and_partial_ord` not found for this | -------------------- method `use_ord_and_partial_ord` not found for this
... ...

View file

@ -30,7 +30,7 @@ help: consider removing `&` from the pattern
| |
LL - let &&x = &1isize as &dyn T; LL - let &&x = &1isize as &dyn T;
LL + let &x = &1isize as &dyn T; LL + let &x = &1isize as &dyn T;
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/destructure-trait-ref.rs:36:11 --> $DIR/destructure-trait-ref.rs:36:11
@ -46,7 +46,7 @@ help: consider removing `&` from the pattern
| |
LL - let &&&x = &(&1isize as &dyn T); LL - let &&&x = &(&1isize as &dyn T);
LL + let &&x = &(&1isize as &dyn T); LL + let &&x = &(&1isize as &dyn T);
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/destructure-trait-ref.rs:40:13 --> $DIR/destructure-trait-ref.rs:40:13

View file

@ -71,7 +71,7 @@ help: try removing this `?`
| |
LL - c()? LL - c()?
LL + c() LL + c()
| |
help: try adding an expression at the end of the block help: try adding an expression at the end of the block
| |
LL ~ c()?; LL ~ c()?;

View file

@ -13,7 +13,7 @@ help: try removing `&mut` here
| |
LL - self.run(&mut self); LL - self.run(&mut self);
LL + self.run(self); LL + self.run(self);
| |
error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
--> $DIR/issue-34126.rs:6:18 --> $DIR/issue-34126.rs:6:18

View file

@ -11,7 +11,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
| |
LL - fn test1<T: ?Sized + Foo>(t: &T) { LL - fn test1<T: ?Sized + Foo>(t: &T) {
LL + fn test1<T: Foo>(t: &T) { LL + fn test1<T: Foo>(t: &T) {
| |
error[E0277]: the size for values of type `T` cannot be known at compilation time error[E0277]: the size for values of type `T` cannot be known at compilation time
--> $DIR/dst-object-from-unsized-type.rs:13:23 --> $DIR/dst-object-from-unsized-type.rs:13:23
@ -26,7 +26,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
| |
LL - fn test2<T: ?Sized + Foo>(t: &T) { LL - fn test2<T: ?Sized + Foo>(t: &T) {
LL + fn test2<T: Foo>(t: &T) { LL + fn test2<T: Foo>(t: &T) {
| |
error[E0277]: the size for values of type `str` cannot be known at compilation time error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/dst-object-from-unsized-type.rs:18:28 --> $DIR/dst-object-from-unsized-type.rs:18:28

View file

@ -15,7 +15,7 @@ help: use `dyn`
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) { LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
| |
error: trait objects without an explicit `dyn` are deprecated error: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-2018-edition-lint.rs:4:35 --> $DIR/dyn-2018-edition-lint.rs:4:35
@ -29,7 +29,7 @@ help: use `dyn`
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) { LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
| |
error: trait objects without an explicit `dyn` are deprecated error: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-2018-edition-lint.rs:17:14 --> $DIR/dyn-2018-edition-lint.rs:17:14
@ -43,7 +43,7 @@ help: use `dyn`
| |
LL - let _x: &SomeTrait = todo!(); LL - let _x: &SomeTrait = todo!();
LL + let _x: &dyn SomeTrait = todo!(); LL + let _x: &dyn SomeTrait = todo!();
| |
error: trait objects without an explicit `dyn` are deprecated error: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-2018-edition-lint.rs:4:17 --> $DIR/dyn-2018-edition-lint.rs:4:17
@ -57,7 +57,7 @@ help: use `dyn`
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) { LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
| |
error: trait objects without an explicit `dyn` are deprecated error: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-2018-edition-lint.rs:4:17 --> $DIR/dyn-2018-edition-lint.rs:4:17
@ -71,7 +71,7 @@ help: use `dyn`
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) { LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
| |
error: trait objects without an explicit `dyn` are deprecated error: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-2018-edition-lint.rs:4:35 --> $DIR/dyn-2018-edition-lint.rs:4:35
@ -85,7 +85,7 @@ help: use `dyn`
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) { LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
| |
error: trait objects without an explicit `dyn` are deprecated error: trait objects without an explicit `dyn` are deprecated
--> $DIR/dyn-2018-edition-lint.rs:4:35 --> $DIR/dyn-2018-edition-lint.rs:4:35
@ -99,7 +99,7 @@ help: use `dyn`
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) { LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
| |
error: aborting due to 7 previous errors error: aborting due to 7 previous errors

View file

@ -8,7 +8,7 @@ help: add `dyn` keyword before this trait
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) { LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
| |
error[E0782]: trait objects must include the `dyn` keyword error[E0782]: trait objects must include the `dyn` keyword
--> $DIR/dyn-2021-edition-error.rs:3:35 --> $DIR/dyn-2021-edition-error.rs:3:35
@ -20,7 +20,7 @@ help: add `dyn` keyword before this trait
| |
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) { LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) { LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
| |
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -15,7 +15,7 @@ help: use `dyn`
| |
LL - <fmt::Debug>::fmt(self, f) LL - <fmt::Debug>::fmt(self, f)
LL + <dyn fmt::Debug>::fmt(self, f) LL + <dyn fmt::Debug>::fmt(self, f)
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -24,7 +24,7 @@ help: `E::Empty4` is a unit variant, you need to write it without the parenthese
| |
LL - let e4 = E::Empty4(); LL - let e4 = E::Empty4();
LL + let e4 = E::Empty4; LL + let e4 = E::Empty4;
| |
error[E0618]: expected function, found `empty_struct::XEmpty2` error[E0618]: expected function, found `empty_struct::XEmpty2`
--> $DIR/empty-struct-unit-expr.rs:18:15 --> $DIR/empty-struct-unit-expr.rs:18:15
@ -46,7 +46,7 @@ help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthe
| |
LL - let xe4 = XE::XEmpty4(); LL - let xe4 = XE::XEmpty4();
LL + let xe4 = XE::XEmpty4; LL + let xe4 = XE::XEmpty4;
| |
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View file

@ -10,7 +10,7 @@ help: primitive type `u32` doesn't have generic parameters
| |
LL - type X = u32<i32>; LL - type X = u32<i32>;
LL + type X = u32; LL + type X = u32;
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -10,7 +10,7 @@ help: primitive type `u32` doesn't have generic parameters
| |
LL - type X = u32<'static>; LL - type X = u32<'static>;
LL + type X = u32; LL + type X = u32;
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -3,7 +3,7 @@ error[E0255]: the name `foo` is defined multiple times
| |
LL | use bar::foo; LL | use bar::foo;
| -------- previous import of the value `foo` here | -------- previous import of the value `foo` here
LL | LL |
LL | fn foo() {} LL | fn foo() {}
| ^^^^^^^^ `foo` redefined here | ^^^^^^^^ `foo` redefined here
| |

View file

@ -3,7 +3,7 @@ error[E0259]: the name `alloc` is defined multiple times
| |
LL | extern crate alloc; LL | extern crate alloc;
| ------------------- previous import of the extern crate `alloc` here | ------------------- previous import of the extern crate `alloc` here
LL | LL |
LL | extern crate libc as alloc; LL | extern crate libc as alloc;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `alloc` reimported here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `alloc` reimported here
| |

View file

@ -3,7 +3,7 @@ error[E0260]: the name `alloc` is defined multiple times
| |
LL | extern crate alloc; LL | extern crate alloc;
| ------------------- previous import of the extern crate `alloc` here | ------------------- previous import of the extern crate `alloc` here
LL | LL |
LL | mod alloc { LL | mod alloc {
| ^^^^^^^^^ `alloc` redefined here | ^^^^^^^^^ `alloc` redefined here
| |

View file

@ -3,7 +3,7 @@ error[E0393]: the type parameter `T` must be explicitly specified
| |
LL | trait A<T=Self> {} LL | trait A<T=Self> {}
| ------------------ type parameter `T` must be specified for this | ------------------ type parameter `T` must be specified for this
LL | LL |
LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {} LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
| ^ help: set the type parameter to the desired type: `A<T>` | ^ help: set the type parameter to the desired type: `A<T>`
| |

View file

@ -31,7 +31,7 @@ error[E0423]: expected function, tuple struct or tuple variant, found struct `Fo
| |
LL | struct Foo { a: bool }; LL | struct Foo { a: bool };
| ---------------------- `Foo` defined here | ---------------------- `Foo` defined here
LL | LL |
LL | let f = Foo(); LL | let f = Foo();
| ^^^^^ | ^^^^^
... ...

View file

@ -8,7 +8,7 @@ help: consider importing the module directly
| |
LL - use std::fmt::self; LL - use std::fmt::self;
LL + use std::fmt; LL + use std::fmt;
| |
help: alternatively, use the multi-path `use` syntax to import `self` help: alternatively, use the multi-path `use` syntax to import `self`
| |
LL | use std::fmt::{self}; LL | use std::fmt::{self};

View file

@ -3,7 +3,7 @@ error[E0446]: private type `Bar` in public interface
| |
LL | struct Bar(u32); LL | struct Bar(u32);
| ---------------- `Bar` declared as private | ---------------- `Bar` declared as private
LL | LL |
LL | pub fn bar() -> Bar { LL | pub fn bar() -> Bar {
| ^^^^^^^^^^^^^^^^^^^ can't leak private type | ^^^^^^^^^^^^^^^^^^^ can't leak private type

View file

@ -3,7 +3,7 @@ error[E0453]: allow(non_snake_case) incompatible with previous forbid
| |
LL | #![forbid(non_snake_case)] LL | #![forbid(non_snake_case)]
| -------------- `forbid` level set here | -------------- `forbid` level set here
LL | LL |
LL | #[allow(non_snake_case)] LL | #[allow(non_snake_case)]
| ^^^^^^^^^^^^^^ overruled by previous forbid | ^^^^^^^^^^^^^^ overruled by previous forbid
@ -12,7 +12,7 @@ error[E0453]: allow(non_snake_case) incompatible with previous forbid
| |
LL | #![forbid(non_snake_case)] LL | #![forbid(non_snake_case)]
| -------------- `forbid` level set here | -------------- `forbid` level set here
LL | LL |
LL | #[allow(non_snake_case)] LL | #[allow(non_snake_case)]
| ^^^^^^^^^^^^^^ overruled by previous forbid | ^^^^^^^^^^^^^^ overruled by previous forbid

View file

@ -3,7 +3,7 @@ error[E0505]: cannot move out of `fancy_num` because it is borrowed
| |
LL | let fancy_ref = &fancy_num; LL | let fancy_ref = &fancy_num;
| ---------- borrow of `fancy_num` occurs here | ---------- borrow of `fancy_num` occurs here
LL | LL |
LL | let x = move || { LL | let x = move || {
| ^^^^^^^ move out of `fancy_num` occurs here | ^^^^^^^ move out of `fancy_num` occurs here
LL | println!("child function: {}", fancy_num.num); LL | println!("child function: {}", fancy_num.num);

View file

@ -5,7 +5,7 @@ LL | let fancy_ref = &fancy_num;
| ---------- borrow of `fancy_num` occurs here | ---------- borrow of `fancy_num` occurs here
LL | fancy_num = FancyNum { num: 6 }; LL | fancy_num = FancyNum { num: 6 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `fancy_num` occurs here
LL | LL |
LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num); LL | println!("Num: {}, Ref: {}", fancy_num.num, fancy_ref.num);
| ------------- borrow later used here | ------------- borrow later used here

View file

@ -14,7 +14,7 @@ help: consider borrowing the value
| |
LL - v as &u8; LL - v as &u8;
LL + &*v; LL + &*v;
| |
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -13,7 +13,7 @@ help: `X::Entry` is a unit variant, you need to write it without the parentheses
| |
LL - X::Entry(); LL - X::Entry();
LL + X::Entry; LL + X::Entry;
| |
error[E0618]: expected function, found `i32` error[E0618]: expected function, found `i32`
--> $DIR/E0618.rs:9:5 --> $DIR/E0618.rs:9:5

View file

@ -30,7 +30,7 @@ help: consider removing the borrow
| |
LL - if &true {} LL - if &true {}
LL + if true {} LL + if true {}
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/if-no-match-bindings.rs:21:8 --> $DIR/if-no-match-bindings.rs:21:8
@ -42,7 +42,7 @@ help: consider removing the borrow
| |
LL - if &mut true {} LL - if &mut true {}
LL + if true {} LL + if true {}
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/if-no-match-bindings.rs:24:11 --> $DIR/if-no-match-bindings.rs:24:11
@ -76,7 +76,7 @@ help: consider removing the borrow
| |
LL - while &true {} LL - while &true {}
LL + while true {} LL + while true {}
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/if-no-match-bindings.rs:27:11 --> $DIR/if-no-match-bindings.rs:27:11
@ -88,7 +88,7 @@ help: consider removing the borrow
| |
LL - while &mut true {} LL - while &mut true {}
LL + while true {} LL + while true {}
| |
error: aborting due to 8 previous errors error: aborting due to 8 previous errors

View file

@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `&_`
| |
LL | impl<T: std::ops::DerefMut> Foo for T { } LL | impl<T: std::ops::DerefMut> Foo for T { }
| ------------------------------------- first implementation here | ------------------------------------- first implementation here
LL | LL |
LL | impl<T> Foo for &T { } LL | impl<T> Foo for &T { }
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_` | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`

View file

@ -93,7 +93,7 @@ error: invalid format string: expected `'}'` but string was terminated
| |
LL | { LL | {
| - because of this opening brace | - because of this opening brace
LL | LL |
LL | "###); LL | "###);
| ^ expected `'}'` in format string | ^ expected `'}'` in format string
| |

View file

@ -9,7 +9,7 @@ help: if `Iterator::Item` is an associated type you're trying to set, use the as
| |
LL - fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 { LL - fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
LL + fn sum<I: Iterator<Item = (), Item = i32>>(i: I) -> i32 where { LL + fn sum<I: Iterator<Item = (), Item = i32>>(i: I) -> i32 where {
| |
error: equality constraints are not yet supported in `where` clauses error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:5:41 --> $DIR/equality-bound.rs:5:41
@ -22,7 +22,7 @@ help: if `Iterator::Item` is an associated type you're trying to set, use the as
| |
LL - fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 { LL - fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
LL + fn sum2<I: Iterator<Item = i32>>(i: I) -> i32 where { LL + fn sum2<I: Iterator<Item = i32>>(i: I) -> i32 where {
| |
error: equality constraints are not yet supported in `where` clauses error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:9:41 --> $DIR/equality-bound.rs:9:41

View file

@ -3,10 +3,10 @@ error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as
| |
LL | let (_, thing) = my_stuff.iter().next().unwrap(); LL | let (_, thing) = my_stuff.iter().next().unwrap();
| --------------- immutable borrow occurs here | --------------- immutable borrow occurs here
LL | LL |
LL | my_stuff.clear(); LL | my_stuff.clear();
| ^^^^^^^^^^^^^^^^ mutable borrow occurs here | ^^^^^^^^^^^^^^^^ mutable borrow occurs here
LL | LL |
LL | println!("{}", *thing); LL | println!("{}", *thing);
| ------ immutable borrow later used here | ------ immutable borrow later used here

View file

@ -11,7 +11,7 @@ help: try removing the generic parameter and using `impl Trait` instead
| |
LL - fn foo<U: Debug>(&self, _: &U) { } LL - fn foo<U: Debug>(&self, _: &U) { }
LL + fn foo(&self, _: &impl Debug) { } LL + fn foo(&self, _: &impl Debug) { }
| |
error[E0643]: method `bar` has incompatible signature for trait error[E0643]: method `bar` has incompatible signature for trait
--> $DIR/impl-generic-mismatch.rs:17:23 --> $DIR/impl-generic-mismatch.rs:17:23

View file

@ -3,7 +3,7 @@ error[E0720]: cannot resolve opaque type
| |
LL | fn id<T>(t: T) -> impl Sized { t } LL | fn id<T>(t: T) -> impl Sized { t }
| ---------- returning this opaque type `impl Sized` | ---------- returning this opaque type `impl Sized`
LL | LL |
LL | fn recursive_id() -> impl Sized { LL | fn recursive_id() -> impl Sized {
| ^^^^^^^^^^ recursive opaque type | ^^^^^^^^^^ recursive opaque type
LL | id(recursive_id2()) LL | id(recursive_id2())
@ -25,7 +25,7 @@ error[E0720]: cannot resolve opaque type
| |
LL | fn wrap<T>(t: T) -> impl Sized { (t,) } LL | fn wrap<T>(t: T) -> impl Sized { (t,) }
| ---------- returning this opaque type `impl Sized` | ---------- returning this opaque type `impl Sized`
LL | LL |
LL | fn recursive_wrap() -> impl Sized { LL | fn recursive_wrap() -> impl Sized {
| ^^^^^^^^^^ recursive opaque type | ^^^^^^^^^^ recursive opaque type
LL | wrap(recursive_wrap2()) LL | wrap(recursive_wrap2())

View file

@ -14,7 +14,7 @@ help: consider importing the module directly
| |
LL - use foo::self; LL - use foo::self;
LL + use foo; LL + use foo;
| |
help: alternatively, use the multi-path `use` syntax to import `self` help: alternatively, use the multi-path `use` syntax to import `self`
| |
LL | use foo::{self}; LL | use foo::{self};

View file

@ -9,7 +9,7 @@ help: a macro with this name exists at the root of the crate
| |
LL - use issue_59764::foo::{baz, makro}; LL - use issue_59764::foo::{baz, makro};
LL + use issue_59764::{makro, foo::{baz}}; LL + use issue_59764::{makro, foo::{baz}};
| |
error[E0432]: unresolved import `issue_59764::foo::makro` error[E0432]: unresolved import `issue_59764::foo::makro`
--> $DIR/issue-59764.rs:21:9 --> $DIR/issue-59764.rs:21:9
@ -52,7 +52,7 @@ help: a macro with this name exists at the root of the crate
| |
LL - use issue_59764::foo::{baz, makro, foobar}; LL - use issue_59764::foo::{baz, makro, foobar};
LL + use issue_59764::{makro, foo::{baz, foobar}}; LL + use issue_59764::{makro, foo::{baz, foobar}};
| |
error[E0432]: unresolved import `issue_59764::foo::makro` error[E0432]: unresolved import `issue_59764::foo::makro`
--> $DIR/issue-59764.rs:40:9 --> $DIR/issue-59764.rs:40:9
@ -97,7 +97,7 @@ help: a macro with this name exists at the root of the crate
| |
LL - use issue_59764::{foobaz, foo::makro}; LL - use issue_59764::{foobaz, foo::makro};
LL + use issue_59764::{makro, foobaz}; LL + use issue_59764::{makro, foobaz};
| |
error[E0432]: unresolved import `issue_59764::foo::makro` error[E0432]: unresolved import `issue_59764::foo::makro`
--> $DIR/issue-59764.rs:59:42 --> $DIR/issue-59764.rs:59:42
@ -110,7 +110,7 @@ help: a macro with this name exists at the root of the crate
| |
LL - use issue_59764::{foobaz, foo::{baz, makro}}; LL - use issue_59764::{foobaz, foo::{baz, makro}};
LL + use issue_59764::{makro, foobaz, foo::{baz}}; LL + use issue_59764::{makro, foobaz, foo::{baz}};
| |
error[E0432]: unresolved import `issue_59764::foo::makro` error[E0432]: unresolved import `issue_59764::foo::makro`
--> $DIR/issue-59764.rs:68:13 --> $DIR/issue-59764.rs:68:13
@ -155,7 +155,7 @@ help: a macro with this name exists at the root of the crate
| |
LL - use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}}; LL - use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}};
LL + use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}}; LL + use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}};
| |
error[E0432]: unresolved import `issue_59764::foo::makro` error[E0432]: unresolved import `issue_59764::foo::makro`
--> $DIR/issue-59764.rs:93:13 --> $DIR/issue-59764.rs:93:13
@ -196,7 +196,7 @@ help: a macro with this name exists at the root of the crate
| |
LL - use issue_59764::foo::{baz, makro as foobar}; LL - use issue_59764::foo::{baz, makro as foobar};
LL + use issue_59764::{makro as foobar, foo::{baz}}; LL + use issue_59764::{makro as foobar, foo::{baz}};
| |
error[E0432]: unresolved import `issue_59764::foo::makro` error[E0432]: unresolved import `issue_59764::foo::makro`
--> $DIR/issue-59764.rs:120:17 --> $DIR/issue-59764.rs:120:17

View file

@ -48,7 +48,7 @@ help: consider removing the borrow
| |
LL - foo(&"aaa".to_owned()); LL - foo(&"aaa".to_owned());
LL + foo("aaa".to_owned()); LL + foo("aaa".to_owned());
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/deref-suggestion.rs:32:9 --> $DIR/deref-suggestion.rs:32:9
@ -67,7 +67,7 @@ help: consider removing the borrow
| |
LL - foo(&mut "aaa".to_owned()); LL - foo(&mut "aaa".to_owned());
LL + foo("aaa".to_owned()); LL + foo("aaa".to_owned());
| |
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/deref-suggestion.rs:2:20 --> $DIR/deref-suggestion.rs:2:20

View file

@ -7,7 +7,7 @@ LL | let mut f = || v.push(2);
| borrow of `v` occurs here | borrow of `v` occurs here
LL | let _w = v; LL | let _w = v;
| ^ move out of `v` occurs here | ^ move out of `v` occurs here
LL | LL |
LL | f(); LL | f();
| - borrow later used here | - borrow later used here

View file

@ -3,7 +3,7 @@ error[E0393]: the type parameter `T` must be explicitly specified
| |
LL | trait A<T=Self> {} LL | trait A<T=Self> {}
| ------------------ type parameter `T` must be specified for this | ------------------ type parameter `T` must be specified for this
LL | LL |
LL | fn f(a: &dyn A) {} LL | fn f(a: &dyn A) {}
| ^ help: set the type parameter to the desired type: `A<T>` | ^ help: set the type parameter to the desired type: `A<T>`
| |

View file

@ -3,7 +3,7 @@ error[E0428]: the name `foo` is defined multiple times
| |
LL | fn foo(); LL | fn foo();
| --------- previous definition of the value `foo` here | --------- previous definition of the value `foo` here
LL | LL |
LL | / pub LL | / pub
LL | | fn foo(); LL | | fn foo();
| |___________^ `foo` redefined here | |___________^ `foo` redefined here

View file

@ -8,7 +8,7 @@ help: consider borrowing the value
| |
LL - let _q: &isize = p as &isize; LL - let _q: &isize = p as &isize;
LL + let _q: &isize = &*p; LL + let _q: &isize = &*p;
| |
error: aborting due to previous error error: aborting due to previous error

View file

@ -3,7 +3,7 @@ error[E0428]: the name `A` is defined multiple times
| |
LL | enum A { B, C } LL | enum A { B, C }
| ------ previous definition of the type `A` here | ------ previous definition of the type `A` here
LL | LL |
LL | enum A { D, E } LL | enum A { D, E }
| ^^^^^^ `A` redefined here | ^^^^^^ `A` redefined here
| |

View file

@ -3,7 +3,7 @@ error[E0428]: the name `a` is defined multiple times
| |
LL | pub mod a {} LL | pub mod a {}
| --------- previous definition of the module `a` here | --------- previous definition of the module `a` here
LL | LL |
LL | pub mod a {} LL | pub mod a {}
| ^^^^^^^^^ `a` redefined here | ^^^^^^^^^ `a` redefined here
| |

View file

@ -3,7 +3,7 @@ error[E0308]: mismatched types
| |
LL | struct Foo(u32); LL | struct Foo(u32);
| ---------------- fn(u32) -> Foo {Foo} defined here | ---------------- fn(u32) -> Foo {Foo} defined here
LL | LL |
LL | fn test() -> Foo { Foo } LL | fn test() -> Foo { Foo }
| --- ^^^ expected struct `Foo`, found fn item | --- ^^^ expected struct `Foo`, found fn item
| | | |

View file

@ -3,7 +3,7 @@ error: captured variable cannot escape `FnMut` closure body
| |
LL | let mut x: Box<()> = Box::new(()); LL | let mut x: Box<()> = Box::new(());
| ----- variable defined here | ----- variable defined here
LL | LL |
LL | || { LL | || {
| - inferred to be a `FnMut` closure | - inferred to be a `FnMut` closure
LL | &mut x LL | &mut x

View file

@ -3,7 +3,7 @@ error: captured variable cannot escape `FnMut` closure body
| |
LL | let mut x: Vec<()> = Vec::new(); LL | let mut x: Vec<()> = Vec::new();
| ----- variable defined here | ----- variable defined here
LL | LL |
LL | || { LL | || {
| - inferred to be a `FnMut` closure | - inferred to be a `FnMut` closure
LL | / || { LL | / || {

View file

@ -5,7 +5,7 @@ LL | / fn bar() {
LL | | Foo { baz: 0 }.bar(); LL | | Foo { baz: 0 }.bar();
LL | | } LL | | }
| |_____- previous definition of `bar` here | |_____- previous definition of `bar` here
LL | LL |
LL | / fn bar() { LL | / fn bar() {
LL | | } LL | | }
| |_____^ duplicate definition | |_____^ duplicate definition

View file

@ -3,7 +3,7 @@ error[E0502]: cannot borrow `heap` as immutable because it is also borrowed as m
| |
LL | let borrow = heap.peek_mut(); LL | let borrow = heap.peek_mut();
| --------------- mutable borrow occurs here | --------------- mutable borrow occurs here
LL | LL |
LL | match (borrow, ()) { LL | match (borrow, ()) {
| ------------ a temporary with access to the mutable borrow is created here ... | ------------ a temporary with access to the mutable borrow is created here ...
LL | (Some(_), ()) => { LL | (Some(_), ()) => {

View file

@ -11,7 +11,7 @@ help: move the `..` to the end of the field list
| |
LL - let Point { .., y, } = p; LL - let Point { .., y, } = p;
LL + let Point { y, .. } = p; LL + let Point { y, .. } = p;
| |
error: expected `}`, found `,` error: expected `}`, found `,`
--> $DIR/issue-49257.rs:11:19 --> $DIR/issue-49257.rs:11:19
@ -26,7 +26,7 @@ help: move the `..` to the end of the field list
| |
LL - let Point { .., y } = p; LL - let Point { .., y } = p;
LL + let Point { y , .. } = p; LL + let Point { y , .. } = p;
| |
error: expected `}`, found `,` error: expected `}`, found `,`
--> $DIR/issue-49257.rs:12:19 --> $DIR/issue-49257.rs:12:19

View file

@ -11,7 +11,7 @@ help: try removing this `?`
| |
LL - missing_discourses()? LL - missing_discourses()?
LL + missing_discourses() LL + missing_discourses()
| |
help: try wrapping the expression in `Ok` help: try wrapping the expression in `Ok`
| |
LL | Ok(missing_discourses()?) LL | Ok(missing_discourses()?)

View file

@ -3,7 +3,7 @@ error[E0423]: expected function, tuple struct or tuple variant, found struct `X`
| |
LL | struct X {} LL | struct X {}
| ----------- `X` defined here | ----------- `X` defined here
LL | LL |
LL | const Y: X = X("ö"); LL | const Y: X = X("ö");
| ^^^^^^ help: use struct literal syntax instead: `X {}` | ^^^^^^ help: use struct literal syntax instead: `X {}`

View file

@ -27,7 +27,7 @@ help: use `dyn`
| |
LL - eq::<dyn, Foo> LL - eq::<dyn, Foo>
LL + eq::<dyn, dyn Foo> LL + eq::<dyn, dyn Foo>
| |
error[E0107]: missing generics for trait `Foo` error[E0107]: missing generics for trait `Foo`
--> $DIR/issue-86756.rs:5:15 --> $DIR/issue-86756.rs:5:15

View file

@ -59,7 +59,7 @@ help: or remove `.into_iter()` to iterate by value
| |
LL - for _ in [1, 2, 3].into_iter() {} LL - for _ in [1, 2, 3].into_iter() {}
LL + for _ in [1, 2, 3] {} LL + for _ in [1, 2, 3] {}
| |
warning: 5 warnings emitted warning: 5 warnings emitted

Some files were not shown because too many files have changed in this diff Show more