]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/similar_paths.stderr
Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
[rust.git] / tests / 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 note: enum `Option` is defined in the current crate
13   --> $DIR/similar_paths.rs:1:1
14    |
15 LL | enum Option<T> {
16    | ^^^^^^^^^^^^^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0308`.