Skip to content

Commit 0ba2db5

Browse files
Add E0211 error explanation
1 parent ed6940f commit 0ba2db5

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/librustc_typeck/diagnostics.rs

+23-1
Original file line numberDiff line numberDiff line change
@@ -1528,6 +1528,29 @@ impl Copy for &'static Bar { } // error
15281528
```
15291529
"##,
15301530

1531+
E0211: r##"
1532+
You used an intrinsic function which doesn't correspond to its
1533+
definition. Erroneous code example:
1534+
1535+
```
1536+
#![feature(intrinsics)]
1537+
1538+
extern "rust-intrinsic" {
1539+
fn size_of<T>(); // error: intrinsic has wrong type
1540+
}
1541+
```
1542+
1543+
Please check the function definition. Example:
1544+
1545+
```
1546+
#![feature(intrinsics)]
1547+
1548+
extern "rust-intrinsic" {
1549+
fn size_of<T>() -> usize;
1550+
}
1551+
```
1552+
"##,
1553+
15311554
E0243: r##"
15321555
This error indicates that not enough type parameters were found in a type or
15331556
trait.
@@ -1790,7 +1813,6 @@ register_diagnostics! {
17901813
E0208,
17911814
E0209, // builtin traits can only be implemented on structs or enums
17921815
E0210, // type parameter is not constrained by any local type
1793-
E0211,
17941816
E0212, // cannot extract an associated type from a higher-ranked trait bound
17951817
E0213, // associated types are not accepted in this context
17961818
E0214, // parenthesized parameters may only be used with a trait

0 commit comments

Comments
 (0)