File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
branches/try/src/librustc_typeck Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 05fcb2e9bc679d689a92122f4803977c83b878aa
4
+ refs/heads/try: 0d1deb521c79207611f4a9b74811535150f4a031
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -1431,6 +1431,30 @@ fn(isize, *const *const u8) -> isize
1431
1431
```
1432
1432
"## ,
1433
1433
1434
+ E0159 : r##"
1435
+ You tried to use a trait as a struct constructor. Erroneous code example:
1436
+
1437
+ ```
1438
+ trait TraitNotAStruct {}
1439
+
1440
+ TraitNotAStruct{ value: 0 }; // error: use of trait `TraitNotAStruct` as a
1441
+ // struct constructor
1442
+ ```
1443
+
1444
+ Please verify you used the correct type name or please implement the trait
1445
+ on a struct and use this struct constructor. Example:
1446
+
1447
+ ```
1448
+ trait TraitNotAStruct {}
1449
+
1450
+ struct Foo {
1451
+ value: i32
1452
+ }
1453
+
1454
+ Foo{ value: 0 }; // ok!
1455
+ ```
1456
+ "## ,
1457
+
1434
1458
E0166 : r##"
1435
1459
This error means that the compiler found a return expression in a function
1436
1460
marked as diverging. A function diverges if it has `!` in the place of the
@@ -2029,7 +2053,6 @@ register_diagnostics! {
2029
2053
E0127 ,
2030
2054
E0129 ,
2031
2055
E0141 ,
2032
- E0159 ,
2033
2056
E0163 ,
2034
2057
E0164 ,
2035
2058
E0167 ,
You can’t perform that action at this time.
0 commit comments