Skip to content

Commit 3936430

Browse files
committed
Add failing test
1 parent 8ad3c1d commit 3936430

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![crate_type = "lib"]
2+
3+
extern crate core;
4+
5+
#[doc(hidden)]
6+
pub mod __private {
7+
pub use core::option::Option::{self, None, Some};
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// aux-build:other_crate.rs
2+
3+
extern crate other_crate;
4+
5+
fn main() {
6+
let x: Option<i32> = 1i32; //~ ERROR 6:26: 6:30: mismatched types [E0308]
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/dont-suggest-doc-hidden-variant-for-enum.rs:6:26
3+
|
4+
LL | let x: Option<i32> = 1i32;
5+
| ----------- ^^^^
6+
| | |
7+
| | expected enum `Option`, found `i32`
8+
| | help: try using a variant of the expected enum: `Some(1i32)`
9+
| expected due to this
10+
|
11+
= note: expected enum `Option<i32>`
12+
found type `i32`
13+
14+
error: aborting due to previous error
15+
16+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)