]> git.proxmox.com Git - rustc.git/blame - src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-trivial_bounds.stderr
CommitLineData
94b46f34 1error[E0277]: the trait bound `i32: Foo` is not satisfied
0731742a 2 --> $DIR/feature-gate-trivial_bounds.rs:10:1
94b46f34 3 |
532ac7d7 4LL | enum E where i32: Foo { V }
94b46f34
XL
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
6 |
7 = help: see issue #48214
416331ca 8 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34
XL
9
10error[E0277]: the trait bound `i32: Foo` is not satisfied
0731742a 11 --> $DIR/feature-gate-trivial_bounds.rs:12:1
94b46f34 12 |
532ac7d7 13LL | struct S where i32: Foo;
94b46f34
XL
14 | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
15 |
16 = help: see issue #48214
416331ca 17 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34
XL
18
19error[E0277]: the trait bound `i32: Foo` is not satisfied
0731742a 20 --> $DIR/feature-gate-trivial_bounds.rs:14:1
94b46f34 21 |
532ac7d7 22LL | trait T where i32: Foo {}
94b46f34
XL
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
24 |
25 = help: see issue #48214
416331ca 26 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34
XL
27
28error[E0277]: the trait bound `i32: Foo` is not satisfied
0731742a 29 --> $DIR/feature-gate-trivial_bounds.rs:16:1
94b46f34 30 |
532ac7d7 31LL | union U where i32: Foo { f: i32 }
94b46f34
XL
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
33 |
34 = help: see issue #48214
416331ca 35 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34
XL
36
37error[E0277]: the trait bound `i32: Foo` is not satisfied
0731742a 38 --> $DIR/feature-gate-trivial_bounds.rs:20:1
94b46f34 39 |
532ac7d7 40LL | / impl Foo for () where i32: Foo {
94b46f34
XL
41LL | | fn test(&self) {
42LL | | 3i32.test();
43LL | | Foo::test(&4i32);
44LL | | generic_function(5i32);
45LL | | }
46LL | | }
47 | |_^ the trait `Foo` is not implemented for `i32`
48 |
49 = help: see issue #48214
416331ca 50 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34
XL
51
52error[E0277]: the trait bound `i32: Foo` is not satisfied
0731742a 53 --> $DIR/feature-gate-trivial_bounds.rs:28:1
94b46f34 54 |
532ac7d7 55LL | / fn f() where i32: Foo
94b46f34
XL
56LL | | {
57LL | | let s = S;
58LL | | 3i32.test();
59LL | | Foo::test(&4i32);
60LL | | generic_function(5i32);
61LL | | }
62 | |_^ the trait `Foo` is not implemented for `i32`
63 |
64 = help: see issue #48214
416331ca 65 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34 66
1b1a35ee 67error[E0277]: the trait bound `String: Neg` is not satisfied
0731742a 68 --> $DIR/feature-gate-trivial_bounds.rs:36:1
94b46f34 69 |
532ac7d7 70LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
94b46f34
XL
71LL | | -s
72LL | | }
1b1a35ee 73 | |_^ the trait `Neg` is not implemented for `String`
94b46f34
XL
74 |
75 = help: see issue #48214
416331ca 76 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34 77
0bf4aa26 78error[E0277]: `i32` is not an iterator
0731742a 79 --> $DIR/feature-gate-trivial_bounds.rs:40:1
94b46f34 80 |
532ac7d7 81LL | / fn use_for() where i32: Iterator {
94b46f34
XL
82LL | | for _ in 2i32 {}
83LL | | }
0bf4aa26 84 | |_^ `i32` is not an iterator
94b46f34 85 |
1b1a35ee 86 = help: the trait `Iterator` is not implemented for `i32`
0bf4aa26 87 = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
94b46f34 88 = help: see issue #48214
416331ca 89 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34 90
8faf50e0 91error[E0277]: the size for values of type `str` cannot be known at compilation time
0731742a 92 --> $DIR/feature-gate-trivial_bounds.rs:52:1
94b46f34 93 |
532ac7d7 94LL | struct TwoStrs(str, str) where str: Sized;
8faf50e0 95 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
94b46f34 96 |
1b1a35ee 97 = help: the trait `Sized` is not implemented for `str`
94b46f34 98 = help: see issue #48214
416331ca 99 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34 100
8faf50e0 101error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
0731742a 102 --> $DIR/feature-gate-trivial_bounds.rs:55:1
94b46f34 103 |
dc9dc135
XL
104LL | / fn unsized_local() where Dst<dyn A>: Sized {
105LL | | let x: Dst<dyn A> = *(Box::new(Dst { x: 1 }) as Box<Dst<dyn A>>);
94b46f34 106LL | | }
8faf50e0 107 | |_^ doesn't have a size known at compile-time
94b46f34 108 |
1b1a35ee 109 = help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
8faf50e0 110 = note: required because it appears within the type `Dst<(dyn A + 'static)>`
94b46f34 111 = help: see issue #48214
416331ca 112 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34 113
8faf50e0 114error[E0277]: the size for values of type `str` cannot be known at compilation time
0731742a 115 --> $DIR/feature-gate-trivial_bounds.rs:59:1
94b46f34 116 |
532ac7d7 117LL | / fn return_str() -> str where str: Sized {
94b46f34
XL
118LL | | *"Sized".to_string().into_boxed_str()
119LL | | }
8faf50e0 120 | |_^ doesn't have a size known at compile-time
94b46f34 121 |
1b1a35ee 122 = help: the trait `Sized` is not implemented for `str`
94b46f34 123 = help: see issue #48214
416331ca 124 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
94b46f34
XL
125
126error: aborting due to 11 previous errors
127
128For more information about this error, try `rustc --explain E0277`.