Created
March 10, 2019 13:46
-
-
Save vickenty/1ea9ea56c97e5e4902f6158a5f2410f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- [ui] ui/associated-const/associated-const-generic-obligations.rs stdout ---- | |
diff of stderr: | |
- error[E0277]: the trait bound `T: Foo` is not satisfied | |
- --> $DIR/associated-const-generic-obligations.rs:14:5 | |
+ error[E0326]: implemented const `FROM` has an incompatible type for trait | |
+ --> $DIR/associated-const-generic-obligations.rs:14:17 | |
3 | | |
+ LL | const FROM: Self::Out; | |
+ | --------- type in trait | |
+ ... | |
4 LL | const FROM: &'static str = "foo"; | |
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `T` | |
+ | ^^^^^^^^^^^^ expected associated type, found reference | |
6 | | |
- = help: consider adding a `where T: Foo` bound | |
+ = note: expected type `<T as Foo>::Out` | |
+ found type `&'static str` | |
8 | |
9 error: aborting due to previous error | |
10 | |
- For more information about this error, try `rustc --explain E0277`. | |
+ For more information about this error, try `rustc --explain E0326`. | |
12 | |
---- [ui] ui/nll/trait-associated-constant.rs stdout ---- | |
diff of stderr: | |
17 LL | impl<'a: 'b, 'b, 'c> Anything<'a, 'b> for FailStruct1 { | |
18 | ^^ | |
19 | |
- error[E0308]: mismatched types | |
- --> $DIR/trait-associated-constant.rs:28:5 | |
- | | |
- LL | const AC: Option<&'a str> = None; | |
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | |
- | | |
- = note: expected type `std::option::Option<&'b str>` | |
- found type `std::option::Option<&'a str>` | |
- note: the lifetime 'a as defined on the impl at 27:6... | |
- --> $DIR/trait-associated-constant.rs:27:6 | |
- | | |
- LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { | |
- | ^^ | |
- note: ...does not necessarily outlive the lifetime 'b as defined on the impl at 27:14 | |
- --> $DIR/trait-associated-constant.rs:27:14 | |
- | | |
- LL | impl<'a: 'b, 'b> Anything<'a, 'b> for FailStruct2 { | |
- | ^^ | |
- | |
- error: aborting due to 2 previous errors | |
+ error: aborting due to previous error | |
40 | |
41 For more information about this error, try `rustc --explain E0308`. | |
42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment