fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: ambiguous `+` in a type 2 --> $DIR/trait-object-delimiters.rs:3:13 3 | 4LL | fn foo1(_: &dyn Drop + AsRef<str>) {} 5 | ^^^^^^^^^^^^^^^^^^^^^ help: use parentheses to disambiguate: `(dyn Drop + AsRef<str>)` 6 7error: incorrect parentheses around trait bounds 8 --> $DIR/trait-object-delimiters.rs:6:17 9 | 10LL | fn foo2(_: &dyn (Drop + AsRef<str>)) {} 11 | ^ ^ 12 | 13help: fix the parentheses 14 | 15LL - fn foo2(_: &dyn (Drop + AsRef<str>)) {} 16LL + fn foo2(_: &(dyn Drop + AsRef<str>)) {} 17 | 18 19error: incorrect parentheses around trait bounds 20 --> $DIR/trait-object-delimiters.rs:8:25 21 | 22LL | fn foo2_no_space(_: &dyn(Drop + AsRef<str>)) {} 23 | ^ ^ 24 | 25help: fix the parentheses 26 | 27LL - fn foo2_no_space(_: &dyn(Drop + AsRef<str>)) {} 28LL + fn foo2_no_space(_: &(dyn Drop + AsRef<str>)) {} 29 | 30 31error: expected parameter name, found `{` 32 --> $DIR/trait-object-delimiters.rs:10:17 33 | 34LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {} 35 | ^ expected parameter name 36 37error: expected one of `!`, `(`, `)`, `*`, `,`, `?`, `for`, `~`, lifetime, or path, found `{` 38 --> $DIR/trait-object-delimiters.rs:10:17 39 | 40LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {} 41 | -^ expected one of 10 possible tokens 42 | | 43 | help: missing `,` 44 45error: expected identifier, found `<` 46 --> $DIR/trait-object-delimiters.rs:14:17 47 | 48LL | fn foo4(_: &dyn <Drop + AsRef<str>>) {} 49 | ^ expected identifier 50 51error: invalid `dyn` keyword 52 --> $DIR/trait-object-delimiters.rs:16:25 53 | 54LL | fn foo5(_: &(dyn Drop + dyn AsRef<str>)) {} 55 | ^^^ help: remove this keyword 56 | 57 = help: `dyn` is only needed at the start of a trait `+`-separated list 58 59error[E0225]: only auto traits can be used as additional traits in a trait object 60 --> $DIR/trait-object-delimiters.rs:3:24 61 | 62LL | fn foo1(_: &dyn Drop + AsRef<str>) {} 63 | ---- ^^^^^^^^^^ additional non-auto trait 64 | | 65 | first non-auto trait 66 | 67 = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Drop + AsRef<str> {}` 68 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits> 69 70error[E0224]: at least one trait is required for an object type 71 --> $DIR/trait-object-delimiters.rs:10:13 72 | 73LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {} 74 | ^^^ 75 76error[E0225]: only auto traits can be used as additional traits in a trait object 77 --> $DIR/trait-object-delimiters.rs:16:29 78 | 79LL | fn foo5(_: &(dyn Drop + dyn AsRef<str>)) {} 80 | ---- ^^^^^^^^^^ additional non-auto trait 81 | | 82 | first non-auto trait 83 | 84 = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Drop + AsRef<str> {}` 85 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits> 86 87error: aborting due to 10 previous errors 88 89Some errors have detailed explanations: E0224, E0225. 90For more information about an error, try `rustc --explain E0224`.