Skip to content

Commit 0f64dd9

Browse files
committed
---
yaml --- r: 232409 b: refs/heads/try c: 26cca1c h: refs/heads/master i: 232407: 12f02c2 v: v3
1 parent 91515f2 commit 0f64dd9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
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: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: e859498d1ca45f2719542f505eb0ba8b944e5668
4+
refs/heads/try: 26cca1c258a8946bfcd6d900077642d5f2be708c
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: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2365,6 +2365,25 @@ struct Bar<S, T> { x: Foo<S, T> }
23652365
```
23662366
"##,
23672367

2368+
E0248: r##"
2369+
This error indicates an attempt to use a value where a type is expected. For
2370+
example:
2371+
2372+
```
2373+
enum Foo {
2374+
Bar(u32)
2375+
}
2376+
2377+
fn do_something(x: Foo::Bar) { }
2378+
```
2379+
2380+
In this example, we're attempting to take a type of `Foo::Bar` in the
2381+
do_something function. This is not legal: `Foo::Bar` is a value of type `Foo`,
2382+
not a distinct static type. Likewise, it's not legal to attempt to
2383+
`impl Foo::Bar`: instead, you must `impl Foo` and then pattern match to specify
2384+
behaviour for specific enum variants.
2385+
"##,
2386+
23682387
E0249: r##"
23692388
This error indicates a constant expression for the array length was found, but
23702389
it was not an integer (signed or unsigned) expression.
@@ -2756,7 +2775,6 @@ register_diagnostics! {
27562775
E0245, // not a trait
27572776
E0246, // invalid recursive type
27582777
E0247, // found module name used as a type
2759-
E0248, // found value name used as a type
27602778
E0319, // trait impls for defaulted traits allowed just for structs/enums
27612779
E0320, // recursive overflow during dropck
27622780
E0321, // extended coherence rules for defaulted traits violated

0 commit comments

Comments
 (0)