Skip to content

Commit 677a7ee

Browse files
---
yaml --- r: 234863 b: refs/heads/stable c: e52b94e h: refs/heads/master i: 234861: db5a900 234859: 41e061b 234855: 81664a9 234847: ca81a1b v: v3
1 parent 630e597 commit 677a7ee

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 67c11b0146d875260ffd7d44184221e42c01186c
32+
refs/heads/stable: e52b94e259b7f416ec584164e6803dcbf038b200
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_typeck/diagnostics.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,15 @@ E0044: r##"
384384
You can't use type parameters on foreign items. Example of erroneous code:
385385
386386
```
387-
extern { fn some_func<T>(); }
387+
extern { fn some_func<T>(x: T); }
388388
```
389389
390-
Just remove the type parameter to make this code works:
390+
To fix this, replace the type parameter with the specializations that you
391+
need:
391392
392393
```
393-
extern { fn some_func(); }
394+
extern { fn some_func_i32(x: i32); }
395+
extern { fn some_func_i64(x: i64); }
394396
```
395397
396398
E0045: r##"
@@ -754,7 +756,7 @@ Example of erroneous code:
754756
enum Foo { f };
755757
756758
let u = Foo::f { value: 0i32 }; // error: Foo:f isn't a structure!
757-
// or even more simple:
759+
// or even simpler:
758760
let u = t { random_field: 0i32 }; //error: t isn't a structure!
759761
```
760762
@@ -772,7 +774,7 @@ enum Foo {
772774
773775
fn main() {
774776
let u = Foo::f(Inner { value: 0i32 });
775-
// or even more simple:
777+
// or even simpler:
776778
let t = Inner { value: 0i32 };
777779
}
778780
```
@@ -1533,9 +1535,6 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
15331535
}
15341536

15351537
register_diagnostics! {
1536-
E0034, // multiple applicable methods in scope
1537-
E0035, // does not take type parameters
1538-
E0036, // incorrect number of type parameters given for this method
15391538
E0068,
15401539
E0074,
15411540
E0075,

0 commit comments

Comments
 (0)