Skip to content

Commit 7923080

Browse files
---
yaml --- r: 223644 b: refs/heads/beta c: 05fcb2e h: refs/heads/master v: v3
1 parent 3bac7f3 commit 7923080

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 7160d9220fd3df46e17e11fd25ac2e0665ed2507
26+
refs/heads/beta: 05fcb2e9bc679d689a92122f4803977c83b878aa
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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)