Skip to content

Commit b090527

Browse files
---
yaml --- r: 228156 b: refs/heads/try c: 05fcb2e h: refs/heads/master v: v3
1 parent d328f55 commit b090527

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 7160d9220fd3df46e17e11fd25ac2e0665ed2507
4+
refs/heads/try: 05fcb2e9bc679d689a92122f4803977c83b878aa
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_typeck/diagnostics.rs

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,8 +1378,8 @@ pub struct Foo<SomeType=SomeType>;
13781378
// identifiers
13791379
```
13801380
1381-
Please verify you used the good type or change the type parameter identifier.
1382-
Example:
1381+
Please verify that a name clash hasn't been accidentally introduced, and rename
1382+
the type parameter if so. Example:
13831383
13841384
```
13851385
pub struct Foo<T=SomeType> {
@@ -1388,6 +1388,35 @@ pub struct Foo<T=SomeType> {
13881388
```
13891389
"##,
13901390

1391+
E0130: r##"
1392+
You declared a pattern as an argument in a foreign function declaration.
1393+
Erroneous code example:
1394+
1395+
```
1396+
extern {
1397+
fn foo((a, b): (u32, u32)); // error: patterns aren't allowed in foreign
1398+
// function declarations
1399+
}
1400+
```
1401+
1402+
Please replace the pattern argument with a regular one. Example:
1403+
1404+
```
1405+
struct SomeStruct {
1406+
a: u32,
1407+
b: u32,
1408+
}
1409+
1410+
extern {
1411+
fn foo(s: SomeStruct); // ok!
1412+
}
1413+
// or
1414+
extern {
1415+
fn foo(a: (u32, u32)); // ok!
1416+
}
1417+
```
1418+
"##,
1419+
13911420
E0131: r##"
13921421
It is not possible to define `main` with type parameters, or even with function
13931422
parameters. When `main` is present, it must take no arguments and return `()`.
@@ -1999,7 +2028,6 @@ register_diagnostics! {
19992028
E0123,
20002029
E0127,
20012030
E0129,
2002-
E0130,
20032031
E0141,
20042032
E0159,
20052033
E0163,

0 commit comments

Comments
 (0)