]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/similar_paths.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / mismatched_types / similar_paths.stderr
1 error[E0308]: mismatched types
2 --> $DIR/similar_paths.rs:7:5
3 |
4 LL | pub fn foo() -> Option<u8> {
5 | ---------- expected `Option<u8>` because of return type
6 LL | Some(42_u8)
7 | ^^^^^^^^^^^ expected enum `Option`, found enum `std::option::Option`
8 |
9 = note: enum `std::option::Option` and enum `Option` have similar names, but are actually distinct types
10 note: enum `std::option::Option` is defined in crate `core`
11 --> $SRC_DIR/core/src/option.rs:LL:COL
12 |
13 LL | pub enum Option<T> {
14 | ^^^^^^^^^^^^^^^^^^
15 note: enum `Option` is defined in the current crate
16 --> $DIR/similar_paths.rs:1:1
17 |
18 LL | enum Option<T> {
19 | ^^^^^^^^^^^^^^
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0308`.