fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
935 B24 linesraw
1error[E0038]: the trait `Bar` cannot be made into an object
2  --> $DIR/issue-19538.rs:17:15
3   |
4LL |     fn foo<T>(&self, val: T);
5   |        --- method `foo` has generic type parameters
6...
7LL |     let test: &mut dyn Bar = &mut thing;
8   |               ^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
9
10error[E0038]: the trait `Bar` cannot be made into an object
11  --> $DIR/issue-19538.rs:17:30
12   |
13LL |     fn foo<T>(&self, val: T);
14   |        --- method `foo` has generic type parameters
15...
16LL |     let test: &mut dyn Bar = &mut thing;
17   |                              ^^^^^^^^^^ the trait `Bar` cannot be made into an object
18   |
19   = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&mut dyn Bar>` for `&mut Thing`
20   = note: required by cast to type `&mut dyn Bar`
21
22error: aborting due to 2 previous errors
23
24For more information about this error, try `rustc --explain E0038`.