fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB51 linesraw
1error: `?Trait` bounds are only permitted at the point where a type parameter is declared
2  --> $DIR/maybe-bounds-where.rs:1:28
3   |
4LL | struct S1<T>(T) where (T): ?Sized;
5   |                            ^^^^^^
6
7error: `?Trait` bounds are only permitted at the point where a type parameter is declared
8  --> $DIR/maybe-bounds-where.rs:4:27
9   |
10LL | struct S2<T>(T) where u8: ?Sized;
11   |                           ^^^^^^
12
13error: `?Trait` bounds are only permitted at the point where a type parameter is declared
14  --> $DIR/maybe-bounds-where.rs:7:35
15   |
16LL | struct S3<T>(T) where &'static T: ?Sized;
17   |                                   ^^^^^^
18
19error: `?Trait` bounds are only permitted at the point where a type parameter is declared
20  --> $DIR/maybe-bounds-where.rs:12:34
21   |
22LL | struct S4<T>(T) where for<'a> T: ?Trait<'a>;
23   |                                  ^^^^^^^^^^
24
25error: `?Trait` bounds are only permitted at the point where a type parameter is declared
26  --> $DIR/maybe-bounds-where.rs:21:21
27   |
28LL |     fn f() where T: ?Sized {}
29   |                     ^^^^^^
30
31warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
32  --> $DIR/maybe-bounds-where.rs:12:11
33   |
34LL | struct S4<T>(T) where for<'a> T: ?Trait<'a>;
35   |           ^
36
37error[E0203]: type parameter has more than one relaxed default bound, only one is supported
38  --> $DIR/maybe-bounds-where.rs:16:11
39   |
40LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
41   |           ^
42
43warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
44  --> $DIR/maybe-bounds-where.rs:16:11
45   |
46LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
47   |           ^
48
49error: aborting due to 6 previous errors; 2 warnings emitted
50
51For more information about this error, try `rustc --explain E0203`.